提交 c0ca1215 编写于 作者: T Tudor-Dan Ambarus 提交者: Herbert Xu

crypto: kpp, (ec)dh - fix typos

While here, add missing argument description (ndigits).
Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 ee0db78d
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* Authors: Salvatore Benedetto <salvatore.benedetto@intel.com> * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Licence * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the Licence, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#include <linux/module.h> #include <linux/module.h>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* Authors: Salvatore Benedetto <salvatore.benedetto@intel.com> * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Licence * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the Licence, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/export.h> #include <linux/export.h>
......
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
* ecc_is_key_valid() - Validate a given ECDH private key * ecc_is_key_valid() - Validate a given ECDH private key
* *
* @curve_id: id representing the curve to use * @curve_id: id representing the curve to use
* @ndigits: curve number of digits * @ndigits: curve's number of digits
* @private_key: private key to be used for the given curve * @private_key: private key to be used for the given curve
* @private_key_len: private key len * @private_key_len: private key length
* *
* Returns 0 if the key is acceptable, a negative value otherwise * Returns 0 if the key is acceptable, a negative value otherwise
*/ */
...@@ -47,9 +47,10 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits, ...@@ -47,9 +47,10 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
* ecdh_make_pub_key() - Compute an ECC public key * ecdh_make_pub_key() - Compute an ECC public key
* *
* @curve_id: id representing the curve to use * @curve_id: id representing the curve to use
* @ndigits: curve's number of digits
* @private_key: pregenerated private key for the given curve * @private_key: pregenerated private key for the given curve
* @private_key_len: length of private_key * @private_key_len: length of private_key
* @public_key: buffer for storing the public key generated * @public_key: buffer for storing the generated public key
* @public_key_len: length of the public_key buffer * @public_key_len: length of the public_key buffer
* *
* Returns 0 if the public key was generated successfully, a negative value * 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,6 +64,7 @@ int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
* crypto_ecdh_shared_secret() - Compute a shared secret * crypto_ecdh_shared_secret() - Compute a shared secret
* *
* @curve_id: id representing the curve to use * @curve_id: id representing the curve to use
* @ndigits: curve's number of digits
* @private_key: private key of part A * @private_key: private key of part A
* @private_key_len: length of private_key * @private_key_len: length of private_key
* @public_key: public key of counterpart B * @public_key: public key of counterpart B
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* Authors: Salvator Benedetto <salvatore.benedetto@intel.com> * Authors: Salvator Benedetto <salvatore.benedetto@intel.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Licence * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the Licence, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#include <linux/module.h> #include <linux/module.h>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* Authors: Salvatore Benedetto <salvatore.benedetto@intel.com> * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Licence * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the Licence, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/export.h> #include <linux/export.h>
......
...@@ -73,9 +73,9 @@ int crypto_dh_encode_key(char *buf, unsigned int len, const struct dh *params); ...@@ -73,9 +73,9 @@ int crypto_dh_encode_key(char *buf, unsigned int len, const struct dh *params);
/** /**
* crypto_dh_decode_key() - decode a private key * crypto_dh_decode_key() - decode a private key
* @buf: Buffer holding a packet key that should be decoded * @buf: Buffer holding a packet key that should be decoded
* @len: Lenth of the packet private key buffer * @len: Length of the packet private key buffer
* @params: Buffer allocated by the caller that is filled with the * @params: Buffer allocated by the caller that is filled with the
* unpacket DH private key. * unpacked DH private key.
* *
* The unpacking obtains the private key by pointing @p to the correct location * The unpacking obtains the private key by pointing @p to the correct location
* in @buf. Thus, both pointers refer to the same memory. * in @buf. Thus, both pointers refer to the same memory.
......
...@@ -74,9 +74,9 @@ int crypto_ecdh_encode_key(char *buf, unsigned int len, const struct ecdh *p); ...@@ -74,9 +74,9 @@ int crypto_ecdh_encode_key(char *buf, unsigned int len, const struct ecdh *p);
/** /**
* crypto_ecdh_decode_key() - decode a private key * crypto_ecdh_decode_key() - decode a private key
* @buf: Buffer holding a packet key that should be decoded * @buf: Buffer holding a packet key that should be decoded
* @len: Lenth of the packet private key buffer * @len: Length of the packet private key buffer
* @p: Buffer allocated by the caller that is filled with the * @p: Buffer allocated by the caller that is filled with the
* unpacket ECDH private key. * unpacked ECDH private key.
* *
* The unpacking obtains the private key by pointing @p to the correct location * The unpacking obtains the private key by pointing @p to the correct location
* in @buf. Thus, both pointers refer to the same memory. * in @buf. Thus, both pointers refer to the same memory.
......
...@@ -53,7 +53,7 @@ struct crypto_kpp { ...@@ -53,7 +53,7 @@ struct crypto_kpp {
* *
* @set_secret: Function invokes the protocol specific function to * @set_secret: Function invokes the protocol specific function to
* store the secret private key along with parameters. * store the secret private key along with parameters.
* The implementation knows how to decode thie buffer * The implementation knows how to decode the buffer
* @generate_public_key: Function generate the public key to be sent to the * @generate_public_key: Function generate the public key to be sent to the
* counterpart. In case of error, where output is not big * counterpart. In case of error, where output is not big
* enough req->dst_len will be updated to the size * enough req->dst_len will be updated to the size
...@@ -102,7 +102,7 @@ struct kpp_alg { ...@@ -102,7 +102,7 @@ struct kpp_alg {
* @mask: specifies the mask for the algorithm * @mask: specifies the mask for the algorithm
* *
* Allocate a handle for kpp algorithm. The returned struct crypto_kpp * Allocate a handle for kpp algorithm. The returned struct crypto_kpp
* is requeried for any following API invocation * is required for any following API invocation
* *
* Return: allocated handle in case of success; IS_ERR() is true in case of * Return: allocated handle in case of success; IS_ERR() is true in case of
* an error, PTR_ERR() returns the error code. * an error, PTR_ERR() returns the error code.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册