aboutsummaryrefslogtreecommitdiff
path: root/crypto/ecc.h
diff options
context:
space:
mode:
authorTudor-Dan Ambarus2017-05-25 10:18:05 +0300
committerHerbert Xu2017-06-10 12:04:26 +0800
commitad269597107e6dde4810987eebbd075778d0262c (patch)
treeb0f5fa3416adfa983dff1bfefce13a793a03a883 /crypto/ecc.h
parent099054d735a5e4cfc8e90b03b7422c9b48209d8b (diff)
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 <tudor.ambarus@microchip.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ecc.h')
-rw-r--r--crypto/ecc.h8
1 files changed, 4 insertions, 4 deletions
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