From ad269597107e6dde4810987eebbd075778d0262c Mon Sep 17 00:00:00 2001 From: Tudor-Dan Ambarus Date: Thu, 25 May 2017 10:18:05 +0300 Subject: 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 Signed-off-by: Herbert Xu --- crypto/ecc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crypto/ecc.h') diff --git a/crypto/ecc.h b/crypto/ecc.h index 1ca9bf7437d7..af2ffdb2dcd6 100644 --- a/crypto/ecc.h +++ b/crypto/ecc.h @@ -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 -- cgit v1.2.3