summaryrefslogtreecommitdiff
path: root/ecc.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-03-26 01:35:22 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-03-26 01:35:22 +0800
commitb50dd9f0f8dd451095401901f441dfe1ff1d8bf4 (patch)
tree3c1be68d7fc5e0a76314efc76b6c1b60604236d6 /ecc.c
parent97c2588e7f15ecbd92d08d7c29e65bad76aef344 (diff)
downloaddropbear-b50dd9f0f8dd451095401901f441dfe1ff1d8bf4.tar.gz
refactor kexdh code a bit, start working on ecdh etc
Diffstat (limited to 'ecc.c')
-rw-r--r--ecc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ecc.c b/ecc.c
new file mode 100644
index 0000000..cf67ec0
--- /dev/null
+++ b/ecc.c
@@ -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