diff options
author | Simon Josefsson <simon@josefsson.org> | 2004-08-21 21:18:18 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2004-08-21 21:18:18 +0000 |
commit | 92e2ec9c8d8eac1c9faea8ea4404bb9559442abc (patch) | |
tree | 6d1dbb1fcb4c0dfdaf8bf8d40e1a5a23a2ae9f95 | |
parent | bc1dec4f403ba9bb1dd1cde79503fb9cb092c3f9 (diff) | |
download | gnutls-92e2ec9c8d8eac1c9faea8ea4404bb9559442abc.tar.gz |
Change name of arctwo variant from 'pkcs12' to 'gutmann'.
Seems PKCS12 code uses pure rfc 2268 (who uses the variant then?!).
-rw-r--r-- | crypto/gc-nettle.c | 2 | ||||
-rw-r--r-- | nettle/arctwo-meta.c | 7 | ||||
-rw-r--r-- | nettle/arctwo.c | 14 | ||||
-rw-r--r-- | nettle/arctwo.h | 10 | ||||
-rw-r--r-- | nettle/nettle-meta.h | 3 |
5 files changed, 20 insertions, 16 deletions
diff --git a/crypto/gc-nettle.c b/crypto/gc-nettle.c index 9cbd84c732..6a7d5e0767 100644 --- a/crypto/gc-nettle.c +++ b/crypto/gc-nettle.c @@ -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: diff --git a/nettle/arctwo-meta.c b/nettle/arctwo-meta.c index 63036a3137..839a58287c 100644 --- a/nettle/arctwo-meta.c +++ b/nettle/arctwo-meta.c @@ -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); diff --git a/nettle/arctwo.c b/nettle/arctwo.c index f3f0b8779d..9feb15c56f 100644 --- a/nettle/arctwo.c +++ b/nettle/arctwo.c @@ -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."); diff --git a/nettle/arctwo.h b/nettle/arctwo.h index 7876128463..b439e2399a 100644 --- a/nettle/arctwo.h +++ b/nettle/arctwo.h @@ -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, diff --git a/nettle/nettle-meta.h b/nettle/nettle-meta.h index 6cff6f16ea..fa14c884ae 100644 --- a/nettle/nettle-meta.h +++ b/nettle/nettle-meta.h @@ -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 */ |