diff options
author | Werner Koch <wk@gnupg.org> | 2013-09-07 10:06:46 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-09-18 14:59:02 +0200 |
commit | fd84b63ddd825431f557c002608a6c8d1bcc54c8 (patch) | |
tree | da4bdb35fdf35d6dba0e7415019ed16299c4142e | |
parent | bd33fa21c9afc6c81e0da24016fc13001e9c7390 (diff) | |
download | libgcrypt-fd84b63ddd825431f557c002608a6c8d1bcc54c8.tar.gz |
Rename the GOST algorithm identifiers.
--
Dots and dashes in the names are probably not a good idea. I also
renamed the identifiers to names which are easier to remember.
Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r-- | NEWS | 9 | ||||
-rw-r--r-- | cipher/gostr3411-94.c | 2 | ||||
-rw-r--r-- | cipher/md.c | 4 | ||||
-rw-r--r-- | doc/gcrypt.texi | 10 | ||||
-rw-r--r-- | src/gcrypt.h.in | 12 | ||||
-rw-r--r-- | tests/basic.c | 8 |
6 files changed, 27 insertions, 18 deletions
@@ -14,6 +14,11 @@ Noteworthy changes in version 1.6.0 (unreleased) * Added support for the Salsa20 and reduced Salsa20/12 stream ciphers. + * Added limited support for the GOST 28147-89 cipher algorithm. + + * Added support for the GOST R 34.11-94 and R 34.11-2012 (Stribog) + hash algorithms. + * Added a random number generator to directly use the system's RNG. Also added an interface to prefer the use of a specified RNG. @@ -93,6 +98,10 @@ Noteworthy changes in version 1.6.0 (unreleased) GCRY_CIPHER_SALSA20 NEW. gcry_sexp_nth_buffer NEW. GCRY_CIPHER_SALSA20R12 NEW. + GCRY_CIPHER_GOST28147 NEW. + GCRY_MD_GOSTR3411_94 NEW. + GCRY_MD_STRIBOG256 NEW. + GCRY_MD_STRIBOG512 NEW. Noteworthy changes in version 1.5.0 (2011-06-29) diff --git a/cipher/gostr3411-94.c b/cipher/gostr3411-94.c index dcf5fd23..93bf5973 100644 --- a/cipher/gostr3411-94.c +++ b/cipher/gostr3411-94.c @@ -267,7 +267,7 @@ gost3411_read (void *context) } gcry_md_spec_t _gcry_digest_spec_gost3411_94 = { - "GOST_R_34.11-94", NULL, 0, NULL, 32, + "GOSTR3411_94", NULL, 0, NULL, 32, gost3411_init, _gcry_md_block_write, gost3411_final, gost3411_read, sizeof (GOSTR3411_CONTEXT) }; diff --git a/cipher/md.c b/cipher/md.c index 1aa8968f..280c5d5f 100644 --- a/cipher/md.c +++ b/cipher/md.c @@ -63,9 +63,9 @@ static struct digest_table_entry #endif #ifdef USE_GOST_R_3411_12 { &_gcry_digest_spec_stribog_256, - &dummy_extra_spec, GCRY_MD_GOSTR3411_12_256 }, + &dummy_extra_spec, GCRY_MD_STRIBOG256 }, { &_gcry_digest_spec_stribog_512, - &dummy_extra_spec, GCRY_MD_GOSTR3411_12_512 }, + &dummy_extra_spec, GCRY_MD_STRIBOG512 }, #endif #if USE_MD4 { &_gcry_digest_spec_md4, diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index 7b95b49e..fd7680e2 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -2965,16 +2965,16 @@ This is the Whirlpool algorithm which yields a message digest of 64 bytes. @item GCRY_MD_GOSTR3411_94 -This is the hash algorithm described in GOST R 34.11-94. It yields +This is the hash algorithm described in GOST R 34.11-94 which yields a message digest of 32 bytes. -@item GCRY_MD_GOSTR3411_12_256 +@item GCRY_MD_STRIBOG256 This is the 256-bit version of hash algorithm described in GOST R 34.11-2012 -which yields message digests of 32 bytes. +which yields a message digest of 32 bytes. -@item GCRY_MD_GOSTR3411_12_512 +@item GCRY_MD_STRIBOG512 This is the 512-bit version of hash algorithm described in GOST R 34.11-2012 -which yields message digests of 64 bytes. +which yields a message digest of 64 bytes. @end table @c end table of hash algorithms diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index a152ef3d..3634c249 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -1088,12 +1088,12 @@ enum gcry_md_algos GCRY_MD_CRC32 = 302, GCRY_MD_CRC32_RFC1510 = 303, GCRY_MD_CRC24_RFC2440 = 304, - GCRY_MD_WHIRLPOOL = 305, - GCRY_MD_TIGER1 = 306, /* TIGER fixed. */ - GCRY_MD_TIGER2 = 307, /* TIGER2 variant. */ - GCRY_MD_GOSTR3411_94 = 308, /* GOST R 34.11-94. */ - GCRY_MD_GOSTR3411_12_256 = 309, /* GOST R 34.11-2012, 256 bit */ - GCRY_MD_GOSTR3411_12_512 = 310, /* GOST R 34.11-2012, 512 bit */ + GCRY_MD_WHIRLPOOL = 305, + GCRY_MD_TIGER1 = 306, /* TIGER fixed. */ + GCRY_MD_TIGER2 = 307, /* TIGER2 variant. */ + GCRY_MD_GOSTR3411_94 = 308, /* GOST R 34.11-94. */ + GCRY_MD_STRIBOG256 = 309, /* GOST R 34.11-2012, 256 bit. */ + GCRY_MD_STRIBOG512 = 310 /* GOST R 34.11-2012, 512 bit. */ }; /* Flags used with the open function. */ diff --git a/tests/basic.c b/tests/basic.c index dd825cfc..14ceea4e 100644 --- a/tests/basic.c +++ b/tests/basic.c @@ -2835,17 +2835,17 @@ check_digests (void) "\xA7\xDB\xAF\x0E\x7E\xA7\x4E\x9F\xA6\x02\x41\x3C\x90\xA1\x29\xFA" }, #endif #ifdef USE_GOST_R_3411_12 - { GCRY_MD_GOSTR3411_12_512, + { GCRY_MD_STRIBOG512, "012345678901234567890123456789012345678901234567890123456789012", "\x1b\x54\xd0\x1a\x4a\xf5\xb9\xd5\xcc\x3d\x86\xd6\x8d\x28\x54\x62" "\xb1\x9a\xbc\x24\x75\x22\x2f\x35\xc0\x85\x12\x2b\xe4\xba\x1f\xfa" "\x00\xad\x30\xf8\x76\x7b\x3a\x82\x38\x4c\x65\x74\xf0\x24\xc3\x11" "\xe2\xa4\x81\x33\x2b\x08\xef\x7f\x41\x79\x78\x91\xc1\x64\x6f\x48" }, - { GCRY_MD_GOSTR3411_12_256, + { GCRY_MD_STRIBOG256, "012345678901234567890123456789012345678901234567890123456789012", "\x9d\x15\x1e\xef\xd8\x59\x0b\x89\xda\xa6\xba\x6c\xb7\x4a\xf9\x27" "\x5d\xd0\x51\x02\x6b\xb1\x49\xa4\x52\xfd\x84\xe5\xe5\x7b\x55\x00" }, - { GCRY_MD_GOSTR3411_12_512, + { GCRY_MD_STRIBOG512, "\xd1\xe5\x20\xe2\xe5\xf2\xf0\xe8\x2c\x20\xd1\xf2\xf0\xe8\xe1\xee" "\xe6\xe8\x20\xe2\xed\xf3\xf6\xe8\x2c\x20\xe2\xe5\xfe\xf2\xfa\x20" "\xf1\x20\xec\xee\xf0\xff\x20\xf1\xf2\xf0\xe5\xeb\xe0\xec\xe8\x20" @@ -2855,7 +2855,7 @@ check_digests (void) "\xda\xf8\x47\x5a\x3b\x0f\xe6\x1a\x53\x00\xee\xe4\x6d\x96\x13\x76" "\x03\x5f\xe8\x35\x49\xad\xa2\xb8\x62\x0f\xcd\x7c\x49\x6c\xe5\xb3" "\x3f\x0c\xb9\xdd\xdc\x2b\x64\x60\x14\x3b\x03\xda\xba\xc9\xfb\x28" }, - { GCRY_MD_GOSTR3411_12_256, + { GCRY_MD_STRIBOG256, "\xd1\xe5\x20\xe2\xe5\xf2\xf0\xe8\x2c\x20\xd1\xf2\xf0\xe8\xe1\xee" "\xe6\xe8\x20\xe2\xed\xf3\xf6\xe8\x2c\x20\xe2\xe5\xfe\xf2\xfa\x20" "\xf1\x20\xec\xee\xf0\xff\x20\xf1\xf2\xf0\xe5\xeb\xe0\xec\xe8\x20" |