]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Change name of arctwo variant from 'pkcs12' to 'gutmann'.
authorSimon Josefsson <simon@josefsson.org>
Sat, 21 Aug 2004 21:18:18 +0000 (21:18 +0000)
committerSimon Josefsson <simon@josefsson.org>
Sat, 21 Aug 2004 21:18:18 +0000 (21:18 +0000)
Seems PKCS12 code uses pure rfc 2268 (who uses the variant then?!).

crypto/gc-nettle.c
nettle/arctwo-meta.c
nettle/arctwo.c
nettle/arctwo.h
nettle/nettle-meta.h

index 9cbd84c732db346d3774114f18813c66a921765f..6a7d5e0767c0aa46b9659b0667f3726aba9e2939 100644 (file)
@@ -201,7 +201,7 @@ gc_cipher_open (int alg, int mode, gc_cipher * outhandle)
       break;
 
     case GC_ARCTWO40:
-      cinf->info = &nettle_pkcs12_arctwo40;
+      cinf->info = &nettle_arctwo40;
       break;
 
     default:
index 63036a3137f58c1ed8585dbdf88229c5d8d806a0..839a58287c622f8161dc6e3e750ee126c8b02f70 100644 (file)
@@ -32,5 +32,8 @@
 const struct nettle_cipher nettle_arctwo128
 = _NETTLE_CIPHER(arctwo, ARCTWO, 128);
 
-const struct nettle_cipher nettle_pkcs12_arctwo40
-= _NETTLE_CIPHER(pkcs12_arctwo, ARCTWO, 40);
+const struct nettle_cipher nettle_arctwo40
+= _NETTLE_CIPHER(arctwo, ARCTWO, 40);
+
+const struct nettle_cipher nettle_gutmann_arctwo40
+= _NETTLE_CIPHER(gutmann_arctwo, ARCTWO, 40);
index f3f0b8779db994c81aa404007d71314ff94c96cb..9feb15c56ff8090ba91a25ee4c463956bf5cef2b 100644 (file)
@@ -235,7 +235,7 @@ setkey_core(struct arctwo_ctx *ctx,
 }
 
 void
-pkcs12_arctwo_set_key(struct arctwo_ctx *ctx,
+gutmann_arctwo_set_key(struct arctwo_ctx *ctx,
                      unsigned length, const uint8_t *key)
 {
   setkey_core (ctx, length, key, 0);
@@ -310,34 +310,34 @@ int main (void)
     { 0x22, 0x69, 0x55, 0x2a, 0xb0, 0xf8, 0x5c, 0xa6 };
 
   /* First test. */
-  pkcs12_arctwo_set_key (&ctx, sizeof(key_1), key_1);
+  gutmann_arctwo_set_key (&ctx, sizeof(key_1), key_1);
   arctwo_encrypt (&ctx, ARCTWO_BLOCK_SIZE, scratch, plaintext_1);
   if (memcmp (scratch, ciphertext_1, sizeof(ciphertext_1)))
     puts ("RFC2268 encryption test 1 failed.");
 
-  pkcs12_arctwo_set_key (&ctx, sizeof(key_1), key_1);
+  gutmann_arctwo_set_key (&ctx, sizeof(key_1), key_1);
   arctwo_decrypt (&ctx, ARCTWO_BLOCK_SIZE, scratch, scratch);
   if (memcmp (scratch, plaintext_1, sizeof(plaintext_1)))
     puts ("RFC2268 decryption test 1 failed.");
 
   /* Second test. */
-  pkcs12_arctwo_set_key (&ctx, sizeof(key_2), key_2);
+  gutmann_arctwo_set_key (&ctx, sizeof(key_2), key_2);
   arctwo_encrypt (&ctx, ARCTWO_BLOCK_SIZE, scratch, plaintext_2);
   if (memcmp (scratch, ciphertext_2, sizeof(ciphertext_2)))
     puts ("RFC2268 encryption test 2 failed.");
 
-  pkcs12_arctwo_set_key (&ctx, sizeof(key_2), key_2);
+  gutmann_arctwo_set_key (&ctx, sizeof(key_2), key_2);
   arctwo_decrypt (&ctx, ARCTWO_BLOCK_SIZE, scratch, scratch);
   if (memcmp (scratch, plaintext_2, sizeof(plaintext_2)))
     puts ("RFC2268 decryption test 2 failed.");
 
   /* Third test. */
-  pkcs12_arctwo_set_key(&ctx, sizeof(key_3), key_3);
+  gutmann_arctwo_set_key(&ctx, sizeof(key_3), key_3);
   arctwo_encrypt (&ctx, ARCTWO_BLOCK_SIZE, scratch, plaintext_3);
   if (memcmp(scratch, ciphertext_3, sizeof(ciphertext_3)))
     puts ("RFC2268 encryption test 3 failed.");
 
-  pkcs12_arctwo_set_key (&ctx, sizeof(key_3), key_3);
+  gutmann_arctwo_set_key (&ctx, sizeof(key_3), key_3);
   arctwo_decrypt (&ctx, ARCTWO_BLOCK_SIZE, scratch, scratch);
   if (memcmp(scratch, plaintext_3, sizeof(plaintext_3)))
     puts ("RFC2268 decryption test 3 failed.");
index 7876128463861bd4da7d2689efcaf5d1fb117b18..b439e2399aef94f8896818918a39123669c07fbf 100644 (file)
@@ -34,9 +34,9 @@
 #define arctwo_encrypt nettle_arctwo_encrypt
 #define arctwo_decrypt nettle_arctwo_decrypt
 
-#define pkcs12_arctwo_ctx arctwo_ctx
-#define pkcs12_arctwo_encrypt arctwo_encrypt
-#define pkcs12_arctwo_decrypt arctwo_decrypt
+#define gutmann_arctwo_ctx arctwo_ctx
+#define gutmann_arctwo_encrypt arctwo_encrypt
+#define gutmann_arctwo_decrypt arctwo_decrypt
 
 #define ARCTWO_BLOCK_SIZE 8
 
@@ -55,8 +55,8 @@ void
 arctwo_set_key(struct arctwo_ctx *ctx,
               unsigned length, const uint8_t *key);
 void
-pkcs12_arctwo_set_key(struct arctwo_ctx *ctx,
-                     unsigned length, const uint8_t *key);
+gutmann_arctwo_set_key(struct arctwo_ctx *ctx,
+                      unsigned length, const uint8_t *key);
 
 void
 arctwo_encrypt(struct arctwo_ctx *ctx,
index 6cff6f16ea65ca55e1fc3b79750f1411067a0383..fa14c884aeb8d8c42ba5add8ec6010e2c21ecf89 100644 (file)
@@ -116,7 +116,8 @@ extern const struct nettle_cipher nettle_twofish192;
 extern const struct nettle_cipher nettle_twofish256;
 
 extern const struct nettle_cipher nettle_arctwo128;
-extern const struct nettle_cipher nettle_pkcs12_arctwo40;
+extern const struct nettle_cipher nettle_arctwo40;
+extern const struct nettle_cipher nettle_gutmann_arctwo40;
 
 
 /* Hash algorithms */