diff ecc.c @ 755:b07eb3dc23ec ecc

refactor kexdh code a bit, start working on ecdh etc
author Matt Johnston <matt@ucc.asn.au>
date Tue, 26 Mar 2013 01:35:22 +0800
parents
children bf9dc2d9c2b1
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ecc.c	Tue Mar 26 01:35:22 2013 +0800
@@ -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