mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
crypto: ecc - remove unnecessary casts
ecc software implementation works with chunks of u64 data. There were some unnecessary casts to u8 and then back to u64 for the ecc keys. This patch removes the unnecessary casts. Signed-off-by: Tudor Ambarus <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
099054d735
commit
ad26959710
3 changed files with 22 additions and 25 deletions
|
|
@ -41,7 +41,7 @@
|
|||
* Returns 0 if the key is acceptable, a negative value otherwise
|
||||
*/
|
||||
int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
|
||||
const u8 *private_key, unsigned int private_key_len);
|
||||
const u64 *private_key, unsigned int private_key_len);
|
||||
|
||||
/**
|
||||
* ecdh_make_pub_key() - Compute an ECC public key
|
||||
|
|
@ -55,7 +55,7 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
|
|||
* if an error occurred.
|
||||
*/
|
||||
int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
|
||||
const u8 *private_key, u8 *public_key);
|
||||
const u64 *private_key, u64 *public_key);
|
||||
|
||||
/**
|
||||
* crypto_ecdh_shared_secret() - Compute a shared secret
|
||||
|
|
@ -73,6 +73,6 @@ int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
|
|||
* if an error occurred.
|
||||
*/
|
||||
int crypto_ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
|
||||
const u8 *private_key, const u8 *public_key,
|
||||
u8 *secret);
|
||||
const u64 *private_key, const u64 *public_key,
|
||||
u64 *secret);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue