Clause Blind Schnorr signatures using Curve25519. More...
Go to the source code of this file.
Functions | |
void | GNUNET_CRYPTO_cs_private_key_generate (struct GNUNET_CRYPTO_CsPrivateKey *priv) |
IMPLEMENTATION NOTICE: More... | |
void | GNUNET_CRYPTO_cs_private_key_get_public (const struct GNUNET_CRYPTO_CsPrivateKey *priv, struct GNUNET_CRYPTO_CsPublicKey *pub) |
Extract the public key of the given private key. More... | |
static void | map_to_scalar_subgroup (struct GNUNET_CRYPTO_Cs25519Scalar *scalar) |
Maps 32 random bytes to a scalar. More... | |
void | GNUNET_CRYPTO_cs_r_derive (const struct GNUNET_CRYPTO_CsSessionNonce *nonce, const char *seed, const struct GNUNET_CRYPTO_CsPrivateKey *lts, struct GNUNET_CRYPTO_CsRSecret r[2]) |
Derive a new secret r pair r0 and r1. More... | |
void | GNUNET_CRYPTO_cs_r_get_public (const struct GNUNET_CRYPTO_CsRSecret *r_priv, struct GNUNET_CRYPTO_CsRPublic *r_pub) |
Extract the public R of the given secret r. More... | |
void | GNUNET_CRYPTO_cs_blinding_secrets_derive (const struct GNUNET_CRYPTO_CsBlindingNonce *blind_seed, struct GNUNET_CRYPTO_CsBlindingSecret bs[2]) |
Derives new random blinding factors. More... | |
static void | cs_full_domain_hash (const struct GNUNET_CRYPTO_CsRPublic *r_dash, const void *msg, size_t msg_len, const struct GNUNET_CRYPTO_CsPublicKey *pub, struct GNUNET_CRYPTO_CsC *c) |
Computes a Hash of (R', m) mapped to a Curve25519 scalar. More... | |
static void | calc_r_dash (const struct GNUNET_CRYPTO_CsBlindingSecret *bs, const struct GNUNET_CRYPTO_CsRPublic *r_pub, const struct GNUNET_CRYPTO_CsPublicKey *pub, struct GNUNET_CRYPTO_CsRPublic *blinded_r_pub) |
calculate R' More... | |
void | GNUNET_CRYPTO_cs_calc_blinded_c (const struct GNUNET_CRYPTO_CsBlindingSecret bs[2], const struct GNUNET_CRYPTO_CsRPublic r_pub[2], const struct GNUNET_CRYPTO_CsPublicKey *pub, const void *msg, size_t msg_len, struct GNUNET_CRYPTO_CsC blinded_c[2], struct GNUNET_CRYPTO_CSPublicRPairP *r_pub_blind) |
Calculate two blinded c's. More... | |
void | GNUNET_CRYPTO_cs_sign_derive (const struct GNUNET_CRYPTO_CsPrivateKey *priv, const struct GNUNET_CRYPTO_CsRSecret r[2], const struct GNUNET_CRYPTO_CsBlindedMessage *bm, struct GNUNET_CRYPTO_CsBlindSignature *cs_blind_sig) |
Sign a blinded c. More... | |
void | GNUNET_CRYPTO_cs_unblind (const struct GNUNET_CRYPTO_CsBlindS *blinded_signature_scalar, const struct GNUNET_CRYPTO_CsBlindingSecret *bs, struct GNUNET_CRYPTO_CsS *signature_scalar) |
Unblind a blind-signed signature using a c that was blinded. More... | |
enum GNUNET_GenericReturnValue | GNUNET_CRYPTO_cs_verify (const struct GNUNET_CRYPTO_CsSignature *sig, const struct GNUNET_CRYPTO_CsPublicKey *pub, const void *msg, size_t msg_len) |
Verify whether the given message corresponds to the given signature and the signature is valid with respect to the given public key. More... | |
Variables | |
static const unsigned char | L_BIG_ENDIAN [32] |
Clause Blind Schnorr signatures using Curve25519.
Definition in file crypto_cs.c.
|
static |
Maps 32 random bytes to a scalar.
This is necessary because libsodium expects scalar to be in the prime order subgroup.
[in,out] | scalar | containing 32 byte char array, is modified to be in prime order subgroup |
Definition at line 69 of file crypto_cs.c.
References GNUNET_CRYPTO_Cs25519Scalar::d.
Referenced by GNUNET_CRYPTO_cs_blinding_secrets_derive(), and GNUNET_CRYPTO_cs_r_derive().
|
static |
Computes a Hash of (R', m) mapped to a Curve25519 scalar.
hash | initial hash of the message to be signed | |
pub | denomination public key (used as salt) | |
[out] | c | C containing scalar |
Definition at line 151 of file crypto_cs.c.
References GNUNET_CRYPTO_Cs25519Scalar::d, GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_kdf_mod_mpi(), GNUNET_CRYPTO_mpi_print_unsigned(), GNUNET_CRYPTO_mpi_scan_unsigned(), L_BIG_ENDIAN, msg, pub, and GNUNET_CRYPTO_CsC::scalar.
Referenced by GNUNET_CRYPTO_cs_calc_blinded_c(), and GNUNET_CRYPTO_cs_verify().
|
static |
calculate R'
bs | blinding secret | |
r_pub | R | |
pub | public key | |
[out] | blinded_r_pub | R' |
Definition at line 209 of file crypto_cs.c.
References GNUNET_CRYPTO_CsBlindingSecret::alpha, GNUNET_CRYPTO_CsBlindingSecret::beta, GNUNET_CRYPTO_Cs25519Scalar::d, GNUNET_assert, GNUNET_CRYPTO_CsRPublic::point, pub, and GNUNET_CRYPTO_Cs25519Point::y.
Referenced by GNUNET_CRYPTO_cs_calc_blinded_c().
|
static |
Definition at line 136 of file crypto_cs.c.
Referenced by cs_full_domain_hash().