aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_crypto_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r--src/include/gnunet_crypto_lib.h36
1 files changed, 23 insertions, 13 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 3507a4f4d..11bd680e7 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -669,12 +669,24 @@ struct GNUNET_CRYPTO_CsSignature
669 669
670 670
671/** 671/**
672 * Nonce 672 * Nonce for the session, picked by client,
673 * shared with the signer.
673 */ 674 */
674struct GNUNET_CRYPTO_CsNonce 675struct GNUNET_CRYPTO_CsSessionNonce
675{ 676{
676 /*a nonce*/ 677 /*a nonce*/
677 unsigned char nonce[256 / 8]; 678 unsigned char snonce[256 / 8];
679};
680
681
682/**
683 * Nonce for computing blinding factors. Not
684 * shared with the signer.
685 */
686struct GNUNET_CRYPTO_CsBlindingNonce
687{
688 /*a nonce*/
689 unsigned char bnonce[256 / 8];
678}; 690};
679 691
680 692
@@ -3100,7 +3112,7 @@ GNUNET_CRYPTO_cs_private_key_get_public (
3100 */ 3112 */
3101void 3113void
3102GNUNET_CRYPTO_cs_r_derive ( 3114GNUNET_CRYPTO_cs_r_derive (
3103 const struct GNUNET_CRYPTO_CsNonce *nonce, 3115 const struct GNUNET_CRYPTO_CsSessionNonce *nonce,
3104 const char *seed, 3116 const char *seed,
3105 const struct GNUNET_CRYPTO_CsPrivateKey *lts, 3117 const struct GNUNET_CRYPTO_CsPrivateKey *lts,
3106 struct GNUNET_CRYPTO_CsRSecret r[2]); 3118 struct GNUNET_CRYPTO_CsRSecret r[2]);
@@ -3121,16 +3133,16 @@ GNUNET_CRYPTO_cs_r_get_public (
3121/** 3133/**
3122 * Derives new random blinding factors. 3134 * Derives new random blinding factors.
3123 * In original papers blinding factors are generated randomly 3135 * In original papers blinding factors are generated randomly
3124 * To provide abort-idempotency, blinding factors need to be derived but still need to be UNPREDICTABLE 3136 * To provide abort-idempotency, blinding factors need to be derived but still need to be UNPREDICTABLE.
3125 * To ensure unpredictability a new nonce has to be used. 3137 * To ensure unpredictability a new nonce has to be used.
3126 * Uses HKDF internally 3138 * Uses HKDF internally.
3127 * 3139 *
3128 * @param blind_seed is the blinding seed to derive blinding factors 3140 * @param blind_seed is the blinding seed to derive blinding factors
3129 * @param[out] bs array containing the two derived blinding secrets 3141 * @param[out] bs array containing the two derived blinding secrets
3130 */ 3142 */
3131void 3143void
3132GNUNET_CRYPTO_cs_blinding_secrets_derive ( 3144GNUNET_CRYPTO_cs_blinding_secrets_derive (
3133 const struct GNUNET_CRYPTO_CsNonce *blind_seed, 3145 const struct GNUNET_CRYPTO_CsBlindingNonce *blind_seed,
3134 struct GNUNET_CRYPTO_CsBlindingSecret bs[2]); 3146 struct GNUNET_CRYPTO_CsBlindingSecret bs[2]);
3135 3147
3136 3148
@@ -3146,9 +3158,9 @@ struct GNUNET_CRYPTO_CsBlindedMessage
3146 struct GNUNET_CRYPTO_CsC c[2]; 3158 struct GNUNET_CRYPTO_CsC c[2];
3147 3159
3148 /** 3160 /**
3149 * Public nonce. 3161 * Public nonce used to generate the R-values.
3150 */ 3162 */
3151 struct GNUNET_CRYPTO_CsNonce nonce; 3163 struct GNUNET_CRYPTO_CsSessionNonce nonce;
3152}; 3164};
3153 3165
3154 3166
@@ -3663,11 +3675,9 @@ GNUNET_CRYPTO_blind_sign_keys_create (
3663union GNUNET_CRYPTO_BlindingSecretP 3675union GNUNET_CRYPTO_BlindingSecretP
3664{ 3676{
3665 /** 3677 /**
3666 * Clause Schnorr nonce. FIXME: probably should have 3678 * Clause Schnorr nonce.
3667 * a different type than the nonce we send over the
3668 * network!!!
3669 */ 3679 */
3670 struct GNUNET_CRYPTO_CsNonce nonce; 3680 struct GNUNET_CRYPTO_CsBlindingNonce nonce;
3671 3681
3672 /** 3682 /**
3673 * Variant for RSA for blind signatures. 3683 * Variant for RSA for blind signatures.