diff options
Diffstat (limited to 'src/util/test_crypto_cs.c')
-rw-r--r-- | src/util/test_crypto_cs.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/util/test_crypto_cs.c b/src/util/test_crypto_cs.c index 2978fec0a..d3406516e 100644 --- a/src/util/test_crypto_cs.c +++ b/src/util/test_crypto_cs.c | |||
@@ -148,8 +148,7 @@ test_generate_rpublic (const struct GNUNET_CRYPTO_CsRSecret *r_priv, | |||
148 | 148 | ||
149 | 149 | ||
150 | void | 150 | void |
151 | test_derive_blindingsecrets (const void *secret, | 151 | test_derive_blindingsecrets (const struct GNUNET_CRYPTO_CsNonce *blind_seed, |
152 | size_t secret_len, | ||
153 | struct GNUNET_CRYPTO_CsBlindingSecret bs[2]) | 152 | struct GNUNET_CRYPTO_CsBlindingSecret bs[2]) |
154 | { | 153 | { |
155 | /* TEST 1 | 154 | /* TEST 1 |
@@ -159,7 +158,7 @@ test_derive_blindingsecrets (const void *secret, | |||
159 | memcpy (&other_bs[0], &bs[0], sizeof(struct GNUNET_CRYPTO_CsBlindingSecret) | 158 | memcpy (&other_bs[0], &bs[0], sizeof(struct GNUNET_CRYPTO_CsBlindingSecret) |
160 | * 2); | 159 | * 2); |
161 | 160 | ||
162 | GNUNET_CRYPTO_cs_blinding_secrets_derive (secret, secret_len, bs); | 161 | GNUNET_CRYPTO_cs_blinding_secrets_derive (blind_seed, bs); |
163 | 162 | ||
164 | GNUNET_assert (0 != memcmp (&other_bs[0], | 163 | GNUNET_assert (0 != memcmp (&other_bs[0], |
165 | &bs[0], | 164 | &bs[0], |
@@ -173,7 +172,7 @@ test_derive_blindingsecrets (const void *secret, | |||
173 | memcpy (&other_bs[0], &bs[0], sizeof(struct GNUNET_CRYPTO_CsBlindingSecret) | 172 | memcpy (&other_bs[0], &bs[0], sizeof(struct GNUNET_CRYPTO_CsBlindingSecret) |
174 | * 2); | 173 | * 2); |
175 | for (int i = 0; i<ITER; i++) { | 174 | for (int i = 0; i<ITER; i++) { |
176 | GNUNET_CRYPTO_cs_blinding_secrets_derive (secret, secret_len, bs); | 175 | GNUNET_CRYPTO_cs_blinding_secrets_derive (blind_seed, bs); |
177 | GNUNET_assert (0 == memcmp (&other_bs[0], | 176 | GNUNET_assert (0 == memcmp (&other_bs[0], |
178 | &bs[0], | 177 | &bs[0], |
179 | sizeof(struct GNUNET_CRYPTO_CsBlindingSecret) | 178 | sizeof(struct GNUNET_CRYPTO_CsBlindingSecret) |
@@ -493,8 +492,7 @@ main (int argc, | |||
493 | // generate blinding secrets | 492 | // generate blinding secrets |
494 | struct GNUNET_CRYPTO_CsBlindingSecret blindingsecrets[2]; | 493 | struct GNUNET_CRYPTO_CsBlindingSecret blindingsecrets[2]; |
495 | test_derive_blindingsecrets (&nonce, | 494 | test_derive_blindingsecrets (&nonce, |
496 | sizeof(nonce), | 495 | blindingsecrets); |
497 | blindingsecrets); | ||
498 | 496 | ||
499 | // calculate blinded c's | 497 | // calculate blinded c's |
500 | struct GNUNET_CRYPTO_CsC blinded_cs[2]; | 498 | struct GNUNET_CRYPTO_CsC blinded_cs[2]; |