diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-07 17:51:59 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-07 17:51:59 +0200 |
commit | 29bd17729dd74080e0070f09654690200c1e11ae (patch) | |
tree | 5404788fe7a09888c8ea19b8a54e0dae7299f32a /src/util/crypto_ecc.c | |
parent | 90d63f8249736f9717ca0467d4e8fb9d3d8b48b4 (diff) | |
download | gnunet-29bd17729dd74080e0070f09654690200c1e11ae.tar.gz gnunet-29bd17729dd74080e0070f09654690200c1e11ae.zip |
improve comments (#6164)
Diffstat (limited to 'src/util/crypto_ecc.c')
-rw-r--r-- | src/util/crypto_ecc.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c index fcc8efa2c..d2cbe9450 100644 --- a/src/util/crypto_ecc.c +++ b/src/util/crypto_ecc.c | |||
@@ -676,7 +676,11 @@ data_to_ecdsa_value (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose) | |||
676 | 676 | ||
677 | 677 | ||
678 | /** | 678 | /** |
679 | * Sign a given block. | 679 | * Sign a given block. The @a purpose data is the |
680 | * beginning of the data of which the signature is to be | ||
681 | * created. The `size` field in @a purpose must correctly | ||
682 | * indicate the number of bytes of the data structure, including | ||
683 | * its header. | ||
680 | * | 684 | * |
681 | * @param priv private key to use for the signing | 685 | * @param priv private key to use for the signing |
682 | * @param purpose what to sign (size, purpose) | 686 | * @param purpose what to sign (size, purpose) |
@@ -734,7 +738,11 @@ GNUNET_CRYPTO_ecdsa_sign ( | |||
734 | 738 | ||
735 | 739 | ||
736 | /** | 740 | /** |
737 | * Sign a given block. | 741 | * Sign a given block. The @a purpose data is the |
742 | * beginning of the data of which the signature is to be | ||
743 | * created. The `size` field in @a purpose must correctly | ||
744 | * indicate the number of bytes of the data structure, including | ||
745 | * its header. | ||
738 | * | 746 | * |
739 | * @param priv private key to use for the signing | 747 | * @param priv private key to use for the signing |
740 | * @param purpose what to sign (size, purpose) | 748 | * @param purpose what to sign (size, purpose) |
@@ -764,7 +772,12 @@ GNUNET_CRYPTO_eddsa_sign ( | |||
764 | 772 | ||
765 | 773 | ||
766 | /** | 774 | /** |
767 | * Verify signature. | 775 | * Verify signature. The @a validate data is the |
776 | * beginning of the data of which the signature is to be | ||
777 | * verified. The `size` field in @a validate must correctly | ||
778 | * indicate the number of bytes of the data structure, including | ||
779 | * its header. If @a purpose does not match the purpose given | ||
780 | * in @a validate (the latter | ||
768 | * | 781 | * |
769 | * @param purpose what is the purpose that the signature should have? | 782 | * @param purpose what is the purpose that the signature should have? |
770 | * @param validate block to validate (size, purpose, data) | 783 | * @param validate block to validate (size, purpose, data) |
@@ -832,7 +845,13 @@ GNUNET_CRYPTO_ecdsa_verify ( | |||
832 | 845 | ||
833 | 846 | ||
834 | /** | 847 | /** |
835 | * Verify signature. | 848 | * Verify signature. The @a validate data is the |
849 | * beginning of the data of which the signature is to be | ||
850 | * verified. The `size` field in @a validate must correctly | ||
851 | * indicate the number of bytes of the data structure, including | ||
852 | * its header. If @a purpose does not match the purpose given | ||
853 | * in @a validate (the latter must be in big endian), signature | ||
854 | * verification fails. | ||
836 | * | 855 | * |
837 | * @param purpose what is the purpose that the signature should have? | 856 | * @param purpose what is the purpose that the signature should have? |
838 | * @param validate block to validate (size, purpose, data) | 857 | * @param validate block to validate (size, purpose, data) |