diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-13 05:56:19 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-13 05:56:19 +0100 |
commit | fb00f40057ced5aa2a1a0b56d7f7a34dee5f5d68 (patch) | |
tree | d6aa4d4bf83ae3db848efe62616fe218cf2f82e2 /include | |
parent | b45baaba78023944c555148ad365cb789a447642 (diff) | |
download | libuecc-fb00f40057ced5aa2a1a0b56d7f7a34dee5f5d68.tar libuecc-fb00f40057ced5aa2a1a0b56d7f7a34dee5f5d68.zip |
Some renames, fix load function, add default base
Diffstat (limited to 'include')
-rw-r--r-- | include/libuecc/ecc.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/include/libuecc/ecc.h b/include/libuecc/ecc.h index 922ca22..a5f0df7 100644 --- a/include/libuecc/ecc.h +++ b/include/libuecc/ecc.h @@ -27,12 +27,6 @@ #ifndef _LIBUECC_ECC_H_ #define _LIBUECC_ECC_H_ -typedef struct _ec_public_key_xyz_256_work { - unsigned int X[32]; - unsigned int Y[32]; - unsigned int Z[32]; -} ec_public_key_xyz_256_work; - typedef struct _ec_public_key_256 { unsigned char p[32]; } ec_public_key_256; @@ -41,16 +35,19 @@ typedef struct _ec_secret_key_256 { unsigned char s[32]; } ec_secret_key_256; -typedef ec_public_key_xyz_256_work ec_25519_work; +typedef struct _ec_25519_work { + unsigned int X[32]; + unsigned int Y[32]; + unsigned int Z[32]; +} ec_25519_work; -void ec_25519_inflate(ec_25519_work *out, const ec_public_key_256 *in); -void ec_25519_deflate(ec_public_key_256 *out, ec_25519_work *in); +void ec_25519_load(ec_25519_work *out, const ec_public_key_256 *in); +void ec_25519_store(ec_public_key_256 *out, const ec_25519_work *in); void ec_25519_add(ec_25519_work *out, const ec_25519_work *in1, const ec_25519_work *in2); - void ec_25519_double(ec_25519_work *out, const ec_25519_work *in); - void ec_25519_scalarmult(ec_25519_work *out, const ec_secret_key_256 *n, const ec_25519_work *base); +void ec_25519_scalarmult_base(ec_25519_work *out, const ec_secret_key_256 *n); #endif /* _LIBUECC_ECC_H_ */ |