diff options
author | Tudor-Dan Ambarus <tudor.ambarus@microchip.com> | 2017-05-25 03:18:03 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-06-10 00:04:25 -0400 |
commit | c0ca1215dc92ee6a0f975c95a92fb7f9fb31e9e1 (patch) | |
tree | 28e534fd6bdd1c17c93b19b945d531f0bffcdbdc | |
parent | ee0db78d62d81dcbfba7c3e4d523ecae9d7b7c08 (diff) |
crypto: kpp, (ec)dh - fix typos
While here, add missing argument description (ndigits).
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | crypto/dh.c | 4 | ||||
-rw-r--r-- | crypto/dh_helper.c | 4 | ||||
-rw-r--r-- | crypto/ecc.h | 8 | ||||
-rw-r--r-- | crypto/ecdh.c | 4 | ||||
-rw-r--r-- | crypto/ecdh_helper.c | 4 | ||||
-rw-r--r-- | include/crypto/dh.h | 4 | ||||
-rw-r--r-- | include/crypto/ecdh.h | 4 | ||||
-rw-r--r-- | include/crypto/kpp.h | 4 |
8 files changed, 19 insertions, 17 deletions
diff --git a/crypto/dh.c b/crypto/dh.c index 87e3542cf1b8..7cec04985b9d 100644 --- a/crypto/dh.c +++ b/crypto/dh.c | |||
@@ -4,9 +4,9 @@ | |||
4 | * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com> | 4 | * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public Licence | 7 | * modify it under the terms of the GNU General Public License |
8 | * as published by the Free Software Foundation; either version | 8 | * as published by the Free Software Foundation; either version |
9 | * 2 of the Licence, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
diff --git a/crypto/dh_helper.c b/crypto/dh_helper.c index 02db76b20d00..8ba8a3f82620 100644 --- a/crypto/dh_helper.c +++ b/crypto/dh_helper.c | |||
@@ -3,9 +3,9 @@ | |||
3 | * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com> | 3 | * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public Licence | 6 | * modify it under the terms of the GNU General Public License |
7 | * as published by the Free Software Foundation; either version | 7 | * as published by the Free Software Foundation; either version |
8 | * 2 of the Licence, or (at your option) any later version. | 8 | * 2 of the License, or (at your option) any later version. |
9 | */ | 9 | */ |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/export.h> | 11 | #include <linux/export.h> |
diff --git a/crypto/ecc.h b/crypto/ecc.h index 663d598c7406..37f438500255 100644 --- a/crypto/ecc.h +++ b/crypto/ecc.h | |||
@@ -34,9 +34,9 @@ | |||
34 | * ecc_is_key_valid() - Validate a given ECDH private key | 34 | * ecc_is_key_valid() - Validate a given ECDH private key |
35 | * | 35 | * |
36 | * @curve_id: id representing the curve to use | 36 | * @curve_id: id representing the curve to use |
37 | * @ndigits: curve number of digits | 37 | * @ndigits: curve's number of digits |
38 | * @private_key: private key to be used for the given curve | 38 | * @private_key: private key to be used for the given curve |
39 | * @private_key_len: private key len | 39 | * @private_key_len: private key length |
40 | * | 40 | * |
41 | * Returns 0 if the key is acceptable, a negative value otherwise | 41 | * Returns 0 if the key is acceptable, a negative value otherwise |
42 | */ | 42 | */ |
@@ -47,9 +47,10 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits, | |||
47 | * ecdh_make_pub_key() - Compute an ECC public key | 47 | * ecdh_make_pub_key() - Compute an ECC public key |
48 | * | 48 | * |
49 | * @curve_id: id representing the curve to use | 49 | * @curve_id: id representing the curve to use |
50 | * @ndigits: curve's number of digits | ||
50 | * @private_key: pregenerated private key for the given curve | 51 | * @private_key: pregenerated private key for the given curve |
51 | * @private_key_len: length of private_key | 52 | * @private_key_len: length of private_key |
52 | * @public_key: buffer for storing the public key generated | 53 | * @public_key: buffer for storing the generated public key |
53 | * @public_key_len: length of the public_key buffer | 54 | * @public_key_len: length of the public_key buffer |
54 | * | 55 | * |
55 | * Returns 0 if the public key was generated successfully, a negative value | 56 | * Returns 0 if the public key was generated successfully, a negative value |
@@ -63,6 +64,7 @@ int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits, | |||
63 | * crypto_ecdh_shared_secret() - Compute a shared secret | 64 | * crypto_ecdh_shared_secret() - Compute a shared secret |
64 | * | 65 | * |
65 | * @curve_id: id representing the curve to use | 66 | * @curve_id: id representing the curve to use |
67 | * @ndigits: curve's number of digits | ||
66 | * @private_key: private key of part A | 68 | * @private_key: private key of part A |
67 | * @private_key_len: length of private_key | 69 | * @private_key_len: length of private_key |
68 | * @public_key: public key of counterpart B | 70 | * @public_key: public key of counterpart B |
diff --git a/crypto/ecdh.c b/crypto/ecdh.c index 63ca33771e4e..36233077a552 100644 --- a/crypto/ecdh.c +++ b/crypto/ecdh.c | |||
@@ -4,9 +4,9 @@ | |||
4 | * Authors: Salvator Benedetto <salvatore.benedetto@intel.com> | 4 | * Authors: Salvator Benedetto <salvatore.benedetto@intel.com> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public Licence | 7 | * modify it under the terms of the GNU General Public License |
8 | * as published by the Free Software Foundation; either version | 8 | * as published by the Free Software Foundation; either version |
9 | * 2 of the Licence, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
diff --git a/crypto/ecdh_helper.c b/crypto/ecdh_helper.c index 3cd8a2414e60..f05bea5fd257 100644 --- a/crypto/ecdh_helper.c +++ b/crypto/ecdh_helper.c | |||
@@ -3,9 +3,9 @@ | |||
3 | * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com> | 3 | * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public Licence | 6 | * modify it under the terms of the GNU General Public License |
7 | * as published by the Free Software Foundation; either version | 7 | * as published by the Free Software Foundation; either version |
8 | * 2 of the Licence, or (at your option) any later version. | 8 | * 2 of the License, or (at your option) any later version. |
9 | */ | 9 | */ |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/export.h> | 11 | #include <linux/export.h> |
diff --git a/include/crypto/dh.h b/include/crypto/dh.h index 6b424ad3482e..f638998fb6d0 100644 --- a/include/crypto/dh.h +++ b/include/crypto/dh.h | |||
@@ -73,9 +73,9 @@ int crypto_dh_encode_key(char *buf, unsigned int len, const struct dh *params); | |||
73 | /** | 73 | /** |
74 | * crypto_dh_decode_key() - decode a private key | 74 | * crypto_dh_decode_key() - decode a private key |
75 | * @buf: Buffer holding a packet key that should be decoded | 75 | * @buf: Buffer holding a packet key that should be decoded |
76 | * @len: Lenth of the packet private key buffer | 76 | * @len: Length of the packet private key buffer |
77 | * @params: Buffer allocated by the caller that is filled with the | 77 | * @params: Buffer allocated by the caller that is filled with the |
78 | * unpacket DH private key. | 78 | * unpacked DH private key. |
79 | * | 79 | * |
80 | * The unpacking obtains the private key by pointing @p to the correct location | 80 | * The unpacking obtains the private key by pointing @p to the correct location |
81 | * in @buf. Thus, both pointers refer to the same memory. | 81 | * in @buf. Thus, both pointers refer to the same memory. |
diff --git a/include/crypto/ecdh.h b/include/crypto/ecdh.h index 03a64f62ba7a..1aff2a8a3a68 100644 --- a/include/crypto/ecdh.h +++ b/include/crypto/ecdh.h | |||
@@ -74,9 +74,9 @@ int crypto_ecdh_encode_key(char *buf, unsigned int len, const struct ecdh *p); | |||
74 | /** | 74 | /** |
75 | * crypto_ecdh_decode_key() - decode a private key | 75 | * crypto_ecdh_decode_key() - decode a private key |
76 | * @buf: Buffer holding a packet key that should be decoded | 76 | * @buf: Buffer holding a packet key that should be decoded |
77 | * @len: Lenth of the packet private key buffer | 77 | * @len: Length of the packet private key buffer |
78 | * @p: Buffer allocated by the caller that is filled with the | 78 | * @p: Buffer allocated by the caller that is filled with the |
79 | * unpacket ECDH private key. | 79 | * unpacked ECDH private key. |
80 | * | 80 | * |
81 | * The unpacking obtains the private key by pointing @p to the correct location | 81 | * The unpacking obtains the private key by pointing @p to the correct location |
82 | * in @buf. Thus, both pointers refer to the same memory. | 82 | * in @buf. Thus, both pointers refer to the same memory. |
diff --git a/include/crypto/kpp.h b/include/crypto/kpp.h index ce8e1f79374b..c19082587950 100644 --- a/include/crypto/kpp.h +++ b/include/crypto/kpp.h | |||
@@ -53,7 +53,7 @@ struct crypto_kpp { | |||
53 | * | 53 | * |
54 | * @set_secret: Function invokes the protocol specific function to | 54 | * @set_secret: Function invokes the protocol specific function to |
55 | * store the secret private key along with parameters. | 55 | * store the secret private key along with parameters. |
56 | * The implementation knows how to decode thie buffer | 56 | * The implementation knows how to decode the buffer |
57 | * @generate_public_key: Function generate the public key to be sent to the | 57 | * @generate_public_key: Function generate the public key to be sent to the |
58 | * counterpart. In case of error, where output is not big | 58 | * counterpart. In case of error, where output is not big |
59 | * enough req->dst_len will be updated to the size | 59 | * enough req->dst_len will be updated to the size |
@@ -102,7 +102,7 @@ struct kpp_alg { | |||
102 | * @mask: specifies the mask for the algorithm | 102 | * @mask: specifies the mask for the algorithm |
103 | * | 103 | * |
104 | * Allocate a handle for kpp algorithm. The returned struct crypto_kpp | 104 | * Allocate a handle for kpp algorithm. The returned struct crypto_kpp |
105 | * is requeried for any following API invocation | 105 | * is required for any following API invocation |
106 | * | 106 | * |
107 | * Return: allocated handle in case of success; IS_ERR() is true in case of | 107 | * Return: allocated handle in case of success; IS_ERR() is true in case of |
108 | * an error, PTR_ERR() returns the error code. | 108 | * an error, PTR_ERR() returns the error code. |