aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-07 17:51:59 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-07 17:51:59 +0200
commit29bd17729dd74080e0070f09654690200c1e11ae (patch)
tree5404788fe7a09888c8ea19b8a54e0dae7299f32a
parent90d63f8249736f9717ca0467d4e8fb9d3d8b48b4 (diff)
downloadgnunet-29bd17729dd74080e0070f09654690200c1e11ae.tar.gz
gnunet-29bd17729dd74080e0070f09654690200c1e11ae.zip
improve comments (#6164)
-rw-r--r--src/include/gnunet_crypto_lib.h28
-rw-r--r--src/util/crypto_ecc.c27
2 files changed, 47 insertions, 8 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index e0f453b39..c64fb4926 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1639,7 +1639,11 @@ GNUNET_CRYPTO_ecdh_ecdsa (const struct GNUNET_CRYPTO_EcdhePrivateKey *priv,
1639 1639
1640/** 1640/**
1641 * @ingroup crypto 1641 * @ingroup crypto
1642 * EdDSA sign a given block. 1642 * EdDSA sign a given block. The @a purpose data is the
1643 * beginning of the data of which the signature is to be
1644 * created. The `size` field in @a purpose must correctly
1645 * indicate the number of bytes of the data structure, including
1646 * its header.
1643 * 1647 *
1644 * @param priv private key to use for the signing 1648 * @param priv private key to use for the signing
1645 * @param purpose what to sign (size, purpose) 1649 * @param purpose what to sign (size, purpose)
@@ -1655,7 +1659,11 @@ GNUNET_CRYPTO_eddsa_sign (
1655 1659
1656/** 1660/**
1657 * @ingroup crypto 1661 * @ingroup crypto
1658 * ECDSA Sign a given block. 1662 * ECDSA Sign a given block. The @a purpose data is the
1663 * beginning of the data of which the signature is to be
1664 * created. The `size` field in @a purpose must correctly
1665 * indicate the number of bytes of the data structure, including
1666 * its header.
1659 * 1667 *
1660 * @param priv private key to use for the signing 1668 * @param priv private key to use for the signing
1661 * @param purpose what to sign (size, purpose) 1669 * @param purpose what to sign (size, purpose)
@@ -1670,7 +1678,13 @@ GNUNET_CRYPTO_ecdsa_sign (
1670 1678
1671/** 1679/**
1672 * @ingroup crypto 1680 * @ingroup crypto
1673 * Verify EdDSA signature. 1681 * Verify EdDSA signature. The @a validate data is the
1682 * beginning of the data of which the signature is to be
1683 * verified. The `size` field in @a validate must correctly
1684 * indicate the number of bytes of the data structure, including
1685 * its header. If @a purpose does not match the purpose given
1686 * in @a validate (the latter must be in big endian), signature
1687 * verification fails.
1674 * 1688 *
1675 * @param purpose what is the purpose that the signature should have? 1689 * @param purpose what is the purpose that the signature should have?
1676 * @param validate block to validate (size, purpose, data) 1690 * @param validate block to validate (size, purpose, data)
@@ -1688,7 +1702,13 @@ GNUNET_CRYPTO_eddsa_verify (
1688 1702
1689/** 1703/**
1690 * @ingroup crypto 1704 * @ingroup crypto
1691 * Verify ECDSA signature. 1705 * Verify ECDSA signature. The @a validate data is the
1706 * beginning of the data of which the signature is to be
1707 * verified. The `size` field in @a validate must correctly
1708 * indicate the number of bytes of the data structure, including
1709 * its header. If @a purpose does not match the purpose given
1710 * in @a validate (the latter must be in big endian), signature
1711 * verification fails.
1692 * 1712 *
1693 * @param purpose what is the purpose that the signature should have? 1713 * @param purpose what is the purpose that the signature should have?
1694 * @param validate block to validate (size, purpose, data) 1714 * @param validate block to validate (size, purpose, data)
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)