diff common-algo.c @ 908:3ca7113936c1 asm

aes and sha1 for arm
author Matt Johnston <matt@ucc.asn.au>
date Sun, 06 Oct 2013 21:49:15 +0800
parents 077bbe1eb220
children 89555751c489
line wrap: on
line diff
--- a/common-algo.c	Fri Oct 04 22:40:28 2013 +0800
+++ b/common-algo.c	Sun Oct 06 21:49:15 2013 +0800
@@ -49,13 +49,28 @@
 
 /* Remember to add new ciphers/hashes to regciphers/reghashes too */
 
+#ifdef DROPBEAR_AES_ASM
+extern const struct ltc_cipher_descriptor aes_asm_desc;
+#define DROPBEAR_AES_DESC (aes_asm_desc)
+#else
+#define DROPBEAR_AES_DESC (aes_desc)
+#endif
+
+#ifdef DROPBEAR_SHA1_ASM
+extern const struct ltc_hash_descriptor sha1_asm_desc;
+#define DROPBEAR_SHA1_DESC (sha1_asm_desc)
+#else
+#define DROPBEAR_SHA1_DESC (sha1_desc)
+#endif
+
+
 #ifdef DROPBEAR_AES256
 static const struct dropbear_cipher dropbear_aes256 = 
-	{&aes_desc, 32, 16};
+	{&DROPBEAR_AES_DESC, 32, 16};
 #endif
 #ifdef DROPBEAR_AES128
 static const struct dropbear_cipher dropbear_aes128 = 
-	{&aes_desc, 16, 16};
+	{&DROPBEAR_AES_DESC, 16, 16};
 #endif
 #ifdef DROPBEAR_BLOWFISH
 static const struct dropbear_cipher dropbear_blowfish = 
@@ -101,11 +116,11 @@
 
 #ifdef DROPBEAR_SHA1_HMAC
 static const struct dropbear_hash dropbear_sha1 = 
-	{&sha1_desc, 20, 20};
+	{&DROPBEAR_SHA1_DESC, 20, 20};
 #endif
 #ifdef DROPBEAR_SHA1_96_HMAC
 static const struct dropbear_hash dropbear_sha1_96 = 
-	{&sha1_desc, 20, 12};
+	{&DROPBEAR_SHA1_DESC, 20, 12};
 #endif
 #ifdef DROPBEAR_SHA2_256_HMAC
 static const struct dropbear_hash dropbear_sha2_256 = 
@@ -191,8 +206,8 @@
 
 #ifndef DISABLE_ZLIB
 algo_type ssh_compress[] = {
-	{"zlib", DROPBEAR_COMP_ZLIB, NULL, 1, NULL},
-	{"[email protected]", DROPBEAR_COMP_ZLIB_DELAY, NULL, 1, NULL},
+//	{"zlib", DROPBEAR_COMP_ZLIB, NULL, 1, NULL},
+//	{"[email protected]", DROPBEAR_COMP_ZLIB_DELAY, NULL, 1, NULL},
 	{"none", DROPBEAR_COMP_NONE, NULL, 1, NULL},
 	{NULL, 0, NULL, 0, NULL}
 };
@@ -229,7 +244,7 @@
 
 	const struct ltc_cipher_descriptor *regciphers[] = {
 #ifdef DROPBEAR_AES
-		&aes_desc,
+		&DROPBEAR_AES_DESC,
 #endif
 #ifdef DROPBEAR_BLOWFISH
 		&blowfish_desc,
@@ -245,7 +260,7 @@
 
 	const struct ltc_hash_descriptor *reghashes[] = {
 		/* we need sha1 for hostkey stuff regardless */
-		&sha1_desc,
+		&DROPBEAR_SHA1_DESC,
 #ifdef DROPBEAR_MD5_HMAC
 		&md5_desc,
 #endif