[git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-283-g738177e
by Peter Wu
cvs at cvs.gnupg.org
Tue Oct 1 14:34:33 CEST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, master has been updated
via 738177ec0eae05069ec61bc4f724a69d4e052e42 (commit)
from 1d85452412b65e7976bc94969fc513ff6b880ed8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 738177ec0eae05069ec61bc4f724a69d4e052e42
Author: Peter Wu <lekensteyn at gmail.com>
Date: Thu Sep 26 23:20:32 2013 +0200
cipher: Add support for 128-bit keys in RC2
* cipher/rfc2268.c (oids_rfc2268_128): New
(_gcry_cipher_spec_rfc2268_128): New.
* cipher/cipher.c (cipher_table_entry): Add GCRY_CIPHER_RFC2268_128.
--
This patch adds support for decrypting (and encrypting) using 128-bit
keys using the RC2 algorithm.
Signed-off-by: Peter Wu <lekensteyn at gmail.com>
Actually this is merely enabling that extra ID for 128 bit RFC2268.
We should have used one id for that algorithm only, because a second
identifier merely for having the OID in the code is a bad idea. My
initial fault and thus I better apply this patch to make the id not
entirely useless. -wk
diff --git a/cipher/cipher.c b/cipher/cipher.c
index a17ca9b..23cb99c 100644
--- a/cipher/cipher.c
+++ b/cipher/cipher.c
@@ -87,6 +87,8 @@ static struct cipher_table_entry
#if USE_RFC2268
{ &_gcry_cipher_spec_rfc2268_40,
&dummy_extra_spec, GCRY_CIPHER_RFC2268_40 },
+ { &_gcry_cipher_spec_rfc2268_128,
+ &dummy_extra_spec, GCRY_CIPHER_RFC2268_128 },
#endif
#if USE_SEED
{ &_gcry_cipher_spec_seed,
diff --git a/cipher/rfc2268.c b/cipher/rfc2268.c
index 130be9b..da0b9f4 100644
--- a/cipher/rfc2268.c
+++ b/cipher/rfc2268.c
@@ -351,8 +351,21 @@ static gcry_cipher_oid_spec_t oids_rfc2268_40[] =
{ NULL }
};
+static gcry_cipher_oid_spec_t oids_rfc2268_128[] =
+ {
+ /* pbeWithSHAAnd128BitRC2_CBC */
+ { "1.2.840.113549.1.12.1.5", GCRY_CIPHER_MODE_CBC },
+ { NULL }
+ };
+
gcry_cipher_spec_t _gcry_cipher_spec_rfc2268_40 = {
"RFC2268_40", NULL, oids_rfc2268_40,
RFC2268_BLOCKSIZE, 40, sizeof(RFC2268_context),
do_setkey, encrypt_block, decrypt_block
};
+
+gcry_cipher_spec_t _gcry_cipher_spec_rfc2268_128 = {
+ "RFC2268_128", NULL, oids_rfc2268_128,
+ RFC2268_BLOCKSIZE, 128, sizeof(RFC2268_context),
+ do_setkey, encrypt_block, decrypt_block
+};
diff --git a/src/cipher.h b/src/cipher.h
index ea7a141..70b46fe 100644
--- a/src/cipher.h
+++ b/src/cipher.h
@@ -194,6 +194,7 @@ extern gcry_cipher_spec_t _gcry_cipher_spec_serpent128;
extern gcry_cipher_spec_t _gcry_cipher_spec_serpent192;
extern gcry_cipher_spec_t _gcry_cipher_spec_serpent256;
extern gcry_cipher_spec_t _gcry_cipher_spec_rfc2268_40;
+extern gcry_cipher_spec_t _gcry_cipher_spec_rfc2268_128;
extern gcry_cipher_spec_t _gcry_cipher_spec_seed;
extern gcry_cipher_spec_t _gcry_cipher_spec_camellia128;
extern gcry_cipher_spec_t _gcry_cipher_spec_camellia192;
-----------------------------------------------------------------------
Summary of changes:
cipher/cipher.c | 2 ++
cipher/rfc2268.c | 13 +++++++++++++
src/cipher.h | 1 +
3 files changed, 16 insertions(+), 0 deletions(-)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits
More information about the Gcrypt-devel
mailing list