summaryrefslogtreecommitdiffhomepage
path: root/ecc.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-04-08 00:10:57 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-04-08 00:10:57 +0800
commitc797c1750c46d2e111874e31adf5627b24e97462 (patch)
tree1bfe63d0c11cdb563a4952f7f4617d22111efabb /ecc.c
parentc6bdc810abab5b58aba26a7618c49f3dac58ebd6 (diff)
- Fix various hardcoded uses of SHA1
- rename curves to nistp256 etc - fix svr-auth.c TRACE problem --HG-- branch : ecc
Diffstat (limited to 'ecc.c')
-rw-r--r--ecc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ecc.c b/ecc.c
index 0f988ac..fc5ea9d 100644
--- a/ecc.c
+++ b/ecc.c
@@ -9,24 +9,24 @@
// TODO: use raw bytes for the dp rather than the hex strings in libtomcrypt's ecc.c
#ifdef DROPBEAR_ECC_256
-const struct dropbear_ecc_curve ecc_curve_secp256r1 = {
+const struct dropbear_ecc_curve ecc_curve_nistp256 = {
.dp = &ltc_ecc_sets[0],
.hash_desc = &sha256_desc,
- .name = "secp256r1"
+ .name = "nistp256"
};
#endif
#ifdef DROPBEAR_ECC_384
-const struct dropbear_ecc_curve ecc_curve_secp384r1 = {
+const struct dropbear_ecc_curve ecc_curve_nistp384 = {
.dp = &ltc_ecc_sets[1],
.hash_desc = &sha384_desc,
- .name = "secp384r1"
+ .name = "nistp384"
};
#endif
#ifdef DROPBEAR_ECC_521
-const struct dropbear_ecc_curve ecc_curve_secp521r1 = {
+const struct dropbear_ecc_curve ecc_curve_nistp521 = {
.dp = &ltc_ecc_sets[2],
.hash_desc = &sha512_desc,
- .name = "secp521r1"
+ .name = "nistp521"
};
#endif
@@ -35,7 +35,7 @@ static ecc_key * new_ecc_key(void) {
key->pubkey.x = m_malloc(sizeof(mp_int));
key->pubkey.y = m_malloc(sizeof(mp_int));
key->pubkey.z = m_malloc(sizeof(mp_int));
- key->k = m_malloc(sizeof(mp_init));
+ key->k = m_malloc(sizeof(mp_int));
m_mp_init_multi(key->pubkey.x, key->pubkey.y, key->pubkey.z, key->k, NULL);
return key;
}