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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index f508d02f6..2c7e92fbd 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1677,6 +1677,9 @@ GNUNET_CRYPTO_edx25519_key_create_from_seed (
1677/** 1677/**
1678 * @ingroup crypto 1678 * @ingroup crypto
1679 * Create a new private key. Clear with #GNUNET_CRYPTO_ecdhe_key_clear(). 1679 * Create a new private key. Clear with #GNUNET_CRYPTO_ecdhe_key_clear().
1680 * This is X25519 DH (RFC 7748 Section 5) and corresponds to
1681 * X25519(a,9).
1682 * See #GNUNET_CRYPTO_ecc_ecdh for the DH function.
1680 * 1683 *
1681 * @param[out] pk set to fresh private key; 1684 * @param[out] pk set to fresh private key;
1682 */ 1685 */
@@ -1962,6 +1965,9 @@ GNUNET_CRYPTO_ecc_scalar_from_int (int64_t val,
1962/** 1965/**
1963 * @ingroup crypto 1966 * @ingroup crypto
1964 * Derive key material from a public and a private ECC key. 1967 * Derive key material from a public and a private ECC key.
1968 * This is X25519 DH (RFC 7748 Section 5) and corresponds to
1969 * H(X25519(b,X25519(a,9))) where b := priv, pub := X25519(a,9),
1970 * and a := #GNUNET_CRYPTO_ecdhe_key_create().
1965 * 1971 *
1966 * @param priv private key to use for the ECDH (x) 1972 * @param priv private key to use for the ECDH (x)
1967 * @param pub public key to use for the ECDH (yG) 1973 * @param pub public key to use for the ECDH (yG)
@@ -1978,6 +1984,10 @@ GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EcdhePrivateKey *priv,
1978 * @ingroup crypto 1984 * @ingroup crypto
1979 * Derive key material from a ECDH public key and a private EdDSA key. 1985 * Derive key material from a ECDH public key and a private EdDSA key.
1980 * Dual to #GNUNET_CRRYPTO_ecdh_eddsa. 1986 * Dual to #GNUNET_CRRYPTO_ecdh_eddsa.
1987 * This uses the Ed25519 private seed as X25519 seed.
1988 * As such, this also is a X25519 DH (see #GNUNET_CRYPTO_ecc_ecdh).
1989 * NOTE: Whenever you can get away with it, use separate key pairs
1990 * for signing and encryption (DH)!
1981 * 1991 *
1982 * @param priv private key from EdDSA to use for the ECDH (x) 1992 * @param priv private key from EdDSA to use for the ECDH (x)
1983 * @param pub public key to use for the ECDH (yG) 1993 * @param pub public key to use for the ECDH (yG)
@@ -2126,6 +2136,10 @@ GNUNET_CRYPTO_ecdsa_ecdh (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv,
2126 * @ingroup crypto 2136 * @ingroup crypto
2127 * Derive key material from a EdDSA public key and a private ECDH key. 2137 * Derive key material from a EdDSA public key and a private ECDH key.
2128 * Dual to #GNUNET_CRRYPTO_eddsa_ecdh. 2138 * Dual to #GNUNET_CRRYPTO_eddsa_ecdh.
2139 * This converts the Edwards25519 public key @a pub to a Curve25519
2140 * public key before computing a X25519 DH (see #GNUNET_CRYPTO_ecc_ecdh).
2141 * NOTE: Whenever you can get away with it, use separate key pairs
2142 * for signing and encryption (DH)!
2129 * 2143 *
2130 * @param priv private key to use for the ECDH (y) 2144 * @param priv private key to use for the ECDH (y)
2131 * @param pub public key from EdDSA to use for the ECDH (X=h(x)G) 2145 * @param pub public key from EdDSA to use for the ECDH (X=h(x)G)