diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-03-26 01:35:22 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-03-26 01:35:22 +0800 |
commit | 73e22c115c7aa5604c6a2135a5d2c1bc38161cb1 (patch) | |
tree | 3804dbbee79b860aafe8db7a81780bbd8fa7c6f3 /ecc.c | |
parent | 9be0d6b53d6b85a8f273ee28876405fbca49b9fd (diff) |
refactor kexdh code a bit, start working on ecdh etc
--HG--
branch : ecc
Diffstat (limited to 'ecc.c')
-rw-r--r-- | ecc.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#ifdef DROPBEAR_ECC + +void buf_put_ecc_key_string(buffer *buf, ecc_key *key) { + int len = key->dp->size*2 + 1; + buf_putint(len); + int err = ecc_ansi_x963_export(key, buf_getwriteptr(buf, len), &len); + if (err != CRYPT_OK) { + dropbear_exit("ECC error"); + } + buf_incrwritepos(buf, len); +} + +int buf_get_ecc_key_string(buffer *buf, ecc_key *key) { +} + + +#endif |