diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-11-11 08:52:13 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-11-15 13:43:02 +0100 |
commit | 74be675bd1d6e4bdf5a0c20f854344da8b87720d (patch) | |
tree | f872ee6a1f748f35ee3c3eed90810b87b8184c19 | |
parent | 64771f333f223551d76243319af439db13e0b638 (diff) | |
download | gnutls-74be675bd1d6e4bdf5a0c20f854344da8b87720d.tar.gz |
doc: minor updates in elliptic curve documentation
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-rw-r--r-- | lib/privkey_raw.c | 28 | ||||
-rw-r--r-- | lib/pubkey.c | 24 | ||||
-rw-r--r-- | lib/x509/privkey.c | 26 | ||||
-rw-r--r-- | lib/x509/x509.c | 21 |
4 files changed, 51 insertions, 48 deletions
diff --git a/lib/privkey_raw.c b/lib/privkey_raw.c index 6272964128..0f0187a2c7 100644 --- a/lib/privkey_raw.c +++ b/lib/privkey_raw.c @@ -191,8 +191,8 @@ int ret; * gnutls_privkey_export_ecc_raw: * @key: Holds the public key * @curve: will hold the curve - * @x: will hold the x coordinate - * @y: will hold the y coordinate + * @x: will hold the x-coordinate + * @y: will hold the y-coordinate * @k: will hold the private key * * This function will export the ECC private key's parameters found @@ -220,8 +220,8 @@ gnutls_privkey_export_ecc_raw(gnutls_privkey_t key, * gnutls_privkey_export_ecc_raw2: * @key: Holds the public key * @curve: will hold the curve - * @x: will hold the x coordinate - * @y: will hold the y coordinate + * @x: will hold the x-coordinate + * @y: will hold the y-coordinate * @k: will hold the private key * @flags: flags from %gnutls_abstract_export_flags_t * @@ -271,8 +271,8 @@ int ret; * @curve: will hold the curve * @digest: will hold the digest * @paramset: will hold the GOST parameter set ID - * @x: will hold the x coordinate - * @y: will hold the y coordinate + * @x: will hold the x-coordinate + * @y: will hold the y-coordinate * @k: will hold the private key * @flags: flags from %gnutls_abstract_export_flags_t * @@ -429,16 +429,16 @@ error: * gnutls_privkey_import_ecc_raw: * @key: The key * @curve: holds the curve - * @x: holds the x - * @y: holds the y - * @k: holds the k + * @x: holds the x-coordinate + * @y: holds the y-coordinate + * @k: holds the k (private key) * * This function will convert the given elliptic curve parameters to the * native #gnutls_privkey_t format. The output will be stored * in @key. * - * In EdDSA curves the @y parameter should be %NULL and the @x parameter must - * be the value in the native format for the curve. + * In EdDSA curves the @y parameter should be %NULL and the @x and @k parameters + * must be in the native format for the curve. * * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. @@ -484,9 +484,9 @@ error: * @curve: holds the curve * @digest: holds the digest * @paramset: holds the GOST parameter set ID - * @x: holds the x - * @y: holds the y - * @k: holds the k + * @x: holds the x-coordinate + * @y: holds the y-coordinate + * @k: holds the k (private key) * * This function will convert the given GOST private key's parameters to the * native #gnutls_privkey_t format. The output will be stored diff --git a/lib/pubkey.c b/lib/pubkey.c index 8959fe1c10..c8ae879265 100644 --- a/lib/pubkey.c +++ b/lib/pubkey.c @@ -821,8 +821,8 @@ gnutls_pubkey_export_dsa_raw2(gnutls_pubkey_t key, * gnutls_pubkey_export_ecc_raw: * @key: Holds the public key * @curve: will hold the curve (may be %NULL) - * @x: will hold x (may be %NULL) - * @y: will hold y (may be %NULL) + * @x: will hold x-coordinate (may be %NULL) + * @y: will hold y-coordinate (may be %NULL) * * This function will export the ECC public key's parameters found in * the given key. The new parameters will be allocated using @@ -849,8 +849,8 @@ gnutls_pubkey_export_ecc_raw(gnutls_pubkey_t key, * gnutls_pubkey_export_ecc_raw2: * @key: Holds the public key * @curve: will hold the curve (may be %NULL) - * @x: will hold x (may be %NULL) - * @y: will hold y (may be %NULL) + * @x: will hold x-coordinate (may be %NULL) + * @y: will hold y-coordinate (may be %NULL) * @flags: flags from %gnutls_abstract_export_flags_t * * This function will export the ECC public key's parameters found in @@ -982,8 +982,8 @@ int gnutls_pubkey_export_ecc_x962(gnutls_pubkey_t key, * @curve: will hold the curve (may be %NULL) * @digest: will hold the curve (may be %NULL) * @paramset: will hold the parameters id (may be %NULL) - * @x: will hold x (may be %NULL) - * @y: will hold y (may be %NULL) + * @x: will hold the x-coordinate (may be %NULL) + * @y: will hold the y-coordinate (may be %NULL) * @flags: flags from %gnutls_abstract_export_flags_t * * This function will export the GOST public key's parameters found in @@ -1386,14 +1386,14 @@ gnutls_pubkey_import_rsa_raw(gnutls_pubkey_t key, * gnutls_pubkey_import_ecc_raw: * @key: The structure to store the parsed key * @curve: holds the curve - * @x: holds the x - * @y: holds the y + * @x: holds the x-coordinate + * @y: holds the y-coordinate * * This function will convert the given elliptic curve parameters to a * #gnutls_pubkey_t. The output will be stored in @key. * - * In EdDSA curves the @y parameter will be %NULL and the other parameters - * will be in the native format for the curve. + * In EdDSA curves the @y parameter should be %NULL and the @x parameter must + * be the value in the native format for the curve. * * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. @@ -1528,8 +1528,8 @@ gnutls_pubkey_import_ecc_x962(gnutls_pubkey_t key, * @curve: holds the curve * @digest: holds the digest * @paramset: holds the parameters id - * @x: holds the x - * @y: holds the y + * @x: holds the x-coordinate + * @y: holds the y-coordinate * * This function will convert the given GOST public key's parameters to a * #gnutls_pubkey_t. The output will be stored in @key. @digest should be diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c index db1279e842..a9ce8475fd 100644 --- a/lib/x509/privkey.c +++ b/lib/x509/privkey.c @@ -1082,8 +1082,8 @@ gnutls_x509_privkey_import_dsa_raw(gnutls_x509_privkey_t key, * gnutls_x509_privkey_import_ecc_raw: * @key: The data to store the parsed key * @curve: holds the curve - * @x: holds the x - * @y: holds the y + * @x: holds the x-coordinate + * @y: holds the y-coordinate * @k: holds the k * * This function will convert the given elliptic curve parameters to the @@ -1188,9 +1188,9 @@ gnutls_x509_privkey_import_ecc_raw(gnutls_x509_privkey_t key, * @curve: holds the curve * @digest: will hold the digest * @paramset: will hold the GOST parameter set ID - * @x: holds the x - * @y: holds the y - * @k: holds the k + * @x: holds the x-coordinate + * @y: holds the y-coordinate + * @k: holds the k (private key) * * This function will convert the given GOST private key's parameters to the * native #gnutls_x509_privkey_t format. The output will be stored @@ -1525,8 +1525,8 @@ gnutls_sec_param_t gnutls_x509_privkey_sec_param(gnutls_x509_privkey_t key) * gnutls_x509_privkey_export_ecc_raw: * @key: a key * @curve: will hold the curve - * @x: will hold the x coordinate - * @y: will hold the y coordinate + * @x: will hold the x-coordinate + * @y: will hold the y-coordinate * @k: will hold the private key * * This function will export the ECC private key's parameters found @@ -1542,10 +1542,10 @@ gnutls_sec_param_t gnutls_x509_privkey_sec_param(gnutls_x509_privkey_t key) * Since: 3.0 **/ int gnutls_x509_privkey_export_ecc_raw(gnutls_x509_privkey_t key, - gnutls_ecc_curve_t * curve, - gnutls_datum_t * x, - gnutls_datum_t * y, - gnutls_datum_t * k) + gnutls_ecc_curve_t *curve, + gnutls_datum_t *x, + gnutls_datum_t *y, + gnutls_datum_t *k) { if (key == NULL) { gnutls_assert(); @@ -1561,8 +1561,8 @@ int gnutls_x509_privkey_export_ecc_raw(gnutls_x509_privkey_t key, * @curve: will hold the curve * @digest: will hold the digest * @paramset: will hold the GOST parameter set ID - * @x: will hold the x coordinate - * @y: will hold the y coordinate + * @x: will hold the x-coordinate + * @y: will hold the y-coordinate * @k: will hold the private key * * This function will export the GOST private key's parameters found diff --git a/lib/x509/x509.c b/lib/x509/x509.c index 6fe6cd91c3..998062fd6d 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -3480,21 +3480,24 @@ gnutls_x509_crt_get_pk_rsa_raw(gnutls_x509_crt_t crt, * gnutls_x509_crt_get_pk_ecc_raw: * @crt: Holds the certificate * @curve: will hold the curve - * @x: will hold x - * @y: will hold y + * @x: will hold the x-coordinate + * @y: will hold the y-coordinate * * This function will export the ECC public key's parameters found in * the given certificate. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * + * In EdDSA curves the @y parameter will be %NULL and the other parameters + * will be in the native format for the curve. + * * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 3.4.1 **/ int gnutls_x509_crt_get_pk_ecc_raw(gnutls_x509_crt_t crt, - gnutls_ecc_curve_t * curve, - gnutls_datum_t * x, gnutls_datum_t * y) + gnutls_ecc_curve_t *curve, + gnutls_datum_t *x, gnutls_datum_t *y) { int ret; gnutls_pubkey_t pubkey; @@ -3531,8 +3534,8 @@ gnutls_x509_crt_get_pk_ecc_raw(gnutls_x509_crt_t crt, * @curve: will hold the curve * @digest: will hold the digest * @paramset: will hold the GOST parameter set ID - * @x: will hold x - * @y: will hold y + * @x: will hold the x-coordinate + * @y: will hold the y-coordinate * * This function will export the GOST public key's parameters found in * the given certificate. The new parameters will be allocated using @@ -3544,10 +3547,10 @@ gnutls_x509_crt_get_pk_ecc_raw(gnutls_x509_crt_t crt, **/ int gnutls_x509_crt_get_pk_gost_raw(gnutls_x509_crt_t crt, - gnutls_ecc_curve_t * curve, - gnutls_digest_algorithm_t * digest, + gnutls_ecc_curve_t *curve, + gnutls_digest_algorithm_t *digest, gnutls_gost_paramset_t *paramset, - gnutls_datum_t * x, gnutls_datum_t * y) + gnutls_datum_t *x, gnutls_datum_t *y) { int ret; gnutls_pubkey_t pubkey; |