pub fn sign_single(transcript: &mut Transcript, privkey: Scalar) -> Signature {
        let X = VerificationKey::from_secret(&privkey); // pubkey

        let mut rng = transcript
            .build_rng()
            .commit_witness_bytes(b"x", &privkey.to_bytes())
            .finalize(&mut rand::thread_rng());

        // Generate ephemeral keypair (r, R). r is a random nonce.
        let r = Scalar::random(&mut rng);
        // R = generator * r
        let R = NonceCommitment::new(RISTRETTO_BASEPOINT_POINT * r);

        let c = {
            transcript.commit_point(b"X", &X.0);
            transcript.commit_point(b"R", &R.compress());
            transcript.challenge_scalar(b"c")
        };

        let s = r + c * privkey;

        Signature { s, R: R.compress() }
    }
/// Creates a signature for a single private key, bypassing the party state transitions
Creates a signature for a single private key, bypassing the party state transitions
Creates a signature for a single private key bypassing the party state transitions
pub fn sign_single(transcript: &mut Transcript, privkey: Scalar) -> Signature {
        let X = VerificationKey::from_secret(&privkey); // pubkey
        let mut rng = transcript
            .build_rng()
            .commit_witness_bytes(b"x", &privkey.to_bytes())
            .finalize(&mut rand::thread_rng());
        // Generate ephemeral keypair (r, R). r is a random nonce.
        let r = Scalar::random(&mut rng);
        // R = generator * r
        let R = NonceCommitment::new(RISTRETTO_BASEPOINT_POINT * r);
        let c = {
            transcript.commit_point(b"X", &X.0);
            transcript.commit_point(b"R", &R.compress());
            transcript.challenge_scalar(b"c")
        };
        let s = r + c * privkey;
        Signature { s, R: R.compress() }
    }
pub fn sign_single ( transcript : & mut Transcript , privkey : Scalar ) -> Signature { let X = VerificationKey :: from_secret ( & privkey ) ; // pubkey let mut rng = transcript . build_rng ( ) . commit_witness_bytes ( b" " , & privkey . to_bytes ( ) ) . finalize ( & mut rand :: thread_rng ( ) ) ; // Generate ephemeral keypair (r, R). r is a random nonce. let r = Scalar :: random ( & mut rng ) ; // R = generator * r let R = NonceCommitment :: new ( RISTRETTO_BASEPOINT_POINT * r ) ; let c = { transcript . commit_point ( b" " , & X . 0 ) ; transcript . commit_point ( b" " , & R . compress ( ) ) ; transcript . challenge_scalar ( b" " ) } ; let s = r + c * privkey ; Signature { s , R : R . compress ( ) } }
Creates a signature for a single private key, bypassing the party state transitions
Creates a signature for a single private key bypassing the party state transitions
transcript
&mut Transcript
privkey
Scalar
transcript
&mut Transcript
privkey
Scalar