diff options
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 1ab135d80..c2176f3f2 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -2551,9 +2551,9 @@ GNUNET_CRYPTO_cs_private_key_generate (struct GNUNET_CRYPTO_CsPrivateKey *priv); | |||
2551 | * @param[out] pub where to write the public key | 2551 | * @param[out] pub where to write the public key |
2552 | */ | 2552 | */ |
2553 | void | 2553 | void |
2554 | GNUNET_CRYPTO_cs_private_key_get_public (const struct | 2554 | GNUNET_CRYPTO_cs_private_key_get_public ( |
2555 | GNUNET_CRYPTO_CsPrivateKey *priv, | 2555 | const struct GNUNET_CRYPTO_CsPrivateKey *priv, |
2556 | struct GNUNET_CRYPTO_CsPublicKey *pub); | 2556 | struct GNUNET_CRYPTO_CsPublicKey *pub); |
2557 | 2557 | ||
2558 | 2558 | ||
2559 | /** | 2559 | /** |
@@ -2565,11 +2565,13 @@ GNUNET_CRYPTO_cs_private_key_get_public (const struct | |||
2565 | * Comment: Can be done in one HKDF shot and split output. | 2565 | * Comment: Can be done in one HKDF shot and split output. |
2566 | * | 2566 | * |
2567 | * @param nonce is a random nonce | 2567 | * @param nonce is a random nonce |
2568 | * @param seed seed to use in derivation | ||
2568 | * @param lts is a long-term-secret in form of a private key | 2569 | * @param lts is a long-term-secret in form of a private key |
2569 | * @param[out] r array containing derived secrets r0 and r1 | 2570 | * @param[out] r array containing derived secrets r0 and r1 |
2570 | */ | 2571 | */ |
2571 | void | 2572 | void |
2572 | GNUNET_CRYPTO_cs_r_derive (const struct GNUNET_CRYPTO_CsNonce *nonce, | 2573 | GNUNET_CRYPTO_cs_r_derive (const struct GNUNET_CRYPTO_CsNonce *nonce, |
2574 | const char *seed, | ||
2573 | const struct GNUNET_CRYPTO_CsPrivateKey *lts, | 2575 | const struct GNUNET_CRYPTO_CsPrivateKey *lts, |
2574 | struct GNUNET_CRYPTO_CsRSecret r[2]); | 2576 | struct GNUNET_CRYPTO_CsRSecret r[2]); |
2575 | 2577 | ||
@@ -2595,10 +2597,9 @@ GNUNET_CRYPTO_cs_r_get_public (const struct GNUNET_CRYPTO_CsRSecret *r_priv, | |||
2595 | * @param[out] bs array containing the two derived blinding secrets | 2597 | * @param[out] bs array containing the two derived blinding secrets |
2596 | */ | 2598 | */ |
2597 | void | 2599 | void |
2598 | GNUNET_CRYPTO_cs_blinding_secrets_derive (const struct | 2600 | GNUNET_CRYPTO_cs_blinding_secrets_derive ( |
2599 | GNUNET_CRYPTO_CsNonce *blind_seed, | 2601 | const struct GNUNET_CRYPTO_CsNonce *blind_seed, |
2600 | struct GNUNET_CRYPTO_CsBlindingSecret | 2602 | struct GNUNET_CRYPTO_CsBlindingSecret bs[2]); |
2601 | bs[2]); | ||
2602 | 2603 | ||
2603 | 2604 | ||
2604 | /** | 2605 | /** |
@@ -2614,15 +2615,14 @@ GNUNET_CRYPTO_cs_blinding_secrets_derive (const struct | |||
2614 | * @param[out] blinded_r_pub array of the two blinded R | 2615 | * @param[out] blinded_r_pub array of the two blinded R |
2615 | */ | 2616 | */ |
2616 | void | 2617 | void |
2617 | GNUNET_CRYPTO_cs_calc_blinded_c (const struct GNUNET_CRYPTO_CsBlindingSecret | 2618 | GNUNET_CRYPTO_cs_calc_blinded_c ( |
2618 | bs[2], | 2619 | const struct GNUNET_CRYPTO_CsBlindingSecret bs[2], |
2619 | const struct GNUNET_CRYPTO_CsRPublic r_pub[2], | 2620 | const struct GNUNET_CRYPTO_CsRPublic r_pub[2], |
2620 | const struct GNUNET_CRYPTO_CsPublicKey *pub, | 2621 | const struct GNUNET_CRYPTO_CsPublicKey *pub, |
2621 | const void *msg, | 2622 | const void *msg, |
2622 | size_t msg_len, | 2623 | size_t msg_len, |
2623 | struct GNUNET_CRYPTO_CsC blinded_c[2], | 2624 | struct GNUNET_CRYPTO_CsC blinded_c[2], |
2624 | struct GNUNET_CRYPTO_CsRPublic | 2625 | struct GNUNET_CRYPTO_CsRPublic blinded_r_pub[2]); |
2625 | blinded_r_pub[2]); | ||
2626 | 2626 | ||
2627 | 2627 | ||
2628 | /** | 2628 | /** |
@@ -2642,13 +2642,12 @@ GNUNET_CRYPTO_cs_calc_blinded_c (const struct GNUNET_CRYPTO_CsBlindingSecret | |||
2642 | * @return 0 or 1 for b (see Clause Blind Signature Scheme) | 2642 | * @return 0 or 1 for b (see Clause Blind Signature Scheme) |
2643 | */ | 2643 | */ |
2644 | unsigned int | 2644 | unsigned int |
2645 | GNUNET_CRYPTO_cs_sign_derive (const struct GNUNET_CRYPTO_CsPrivateKey *priv, | 2645 | GNUNET_CRYPTO_cs_sign_derive ( |
2646 | const struct GNUNET_CRYPTO_CsRSecret r[2], | 2646 | const struct GNUNET_CRYPTO_CsPrivateKey *priv, |
2647 | const struct GNUNET_CRYPTO_CsC c[2], | 2647 | const struct GNUNET_CRYPTO_CsRSecret r[2], |
2648 | const struct GNUNET_CRYPTO_CsNonce *nonce, | 2648 | const struct GNUNET_CRYPTO_CsC c[2], |
2649 | struct GNUNET_CRYPTO_CsBlindS * | 2649 | const struct GNUNET_CRYPTO_CsNonce *nonce, |
2650 | blinded_signature_scalar | 2650 | struct GNUNET_CRYPTO_CsBlindS *blinded_signature_scalar); |
2651 | ); | ||
2652 | 2651 | ||
2653 | 2652 | ||
2654 | /** | 2653 | /** |
@@ -2659,10 +2658,10 @@ GNUNET_CRYPTO_cs_sign_derive (const struct GNUNET_CRYPTO_CsPrivateKey *priv, | |||
2659 | * @param[out] signature_scalar where to write the unblinded signature | 2658 | * @param[out] signature_scalar where to write the unblinded signature |
2660 | */ | 2659 | */ |
2661 | void | 2660 | void |
2662 | GNUNET_CRYPTO_cs_unblind (const struct | 2661 | GNUNET_CRYPTO_cs_unblind ( |
2663 | GNUNET_CRYPTO_CsBlindS *blinded_signature_scalar, | 2662 | const struct GNUNET_CRYPTO_CsBlindS *blinded_signature_scalar, |
2664 | const struct GNUNET_CRYPTO_CsBlindingSecret *bs, | 2663 | const struct GNUNET_CRYPTO_CsBlindingSecret *bs, |
2665 | struct GNUNET_CRYPTO_CsS *signature_scalar); | 2664 | struct GNUNET_CRYPTO_CsS *signature_scalar); |
2666 | 2665 | ||
2667 | 2666 | ||
2668 | /** | 2667 | /** |