diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2016-10-27 03:18:32 +0300 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-06-23 12:20:15 +0300 |
commit | 9fca667bed292bda23cdc996338c2ef9aa69d733 (patch) | |
tree | 4581ef5d9af857859a04d91bd5f9f958031ba6d2 /lib | |
parent | 170115c0b1ff765eac3c652daeabe9260ad1d950 (diff) | |
download | gnutls-9fca667bed292bda23cdc996338c2ef9aa69d733.tar.gz |
Add declarations for GOST 28147-89 cipher in CFB mode
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/algorithms/ciphers.c | 35 | ||||
-rw-r--r-- | lib/includes/gnutls/gnutls.h.in | 12 |
2 files changed, 46 insertions, 1 deletions
diff --git a/lib/algorithms/ciphers.c b/lib/algorithms/ciphers.c index 34f94ea7d7..6014da2aea 100644 --- a/lib/algorithms/ciphers.c +++ b/lib/algorithms/ciphers.c @@ -183,6 +183,41 @@ static const cipher_entry_st algorithms[] = { .explicit_iv = 8, .cipher_iv = 12, .tagsize = 16}, + { .name = "GOST28147-TC26Z-CFB", + .id = GNUTLS_CIPHER_GOST28147_TC26Z_CFB, + .blocksize = 8, + .keysize = 32, + .type = CIPHER_STREAM, + .implicit_iv = 8, + .cipher_iv = 8}, + { .name = "GOST28147-CPA-CFB", + .id = GNUTLS_CIPHER_GOST28147_CPA_CFB, + .blocksize = 8, + .keysize = 32, + .type = CIPHER_STREAM, + .implicit_iv = 8, + .cipher_iv = 8}, + { .name = "GOST28147-CPB-CFB", + .id = GNUTLS_CIPHER_GOST28147_CPB_CFB, + .blocksize = 8, + .keysize = 32, + .type = CIPHER_STREAM, + .implicit_iv = 8, + .cipher_iv = 8}, + { .name = "GOST28147-CPC-CFB", + .id = GNUTLS_CIPHER_GOST28147_CPC_CFB, + .blocksize = 8, + .keysize = 32, + .type = CIPHER_STREAM, + .implicit_iv = 8, + .cipher_iv = 8}, + { .name = "GOST28147-CPD-CFB", + .id = GNUTLS_CIPHER_GOST28147_CPD_CFB, + .blocksize = 8, + .keysize = 32, + .type = CIPHER_STREAM, + .implicit_iv = 8, + .cipher_iv = 8}, { .name = "3DES-CBC", .id = GNUTLS_CIPHER_3DES_CBC, .blocksize = 8, diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in index 11b8a65997..d80716dfdb 100644 --- a/lib/includes/gnutls/gnutls.h.in +++ b/lib/includes/gnutls/gnutls.h.in @@ -114,6 +114,11 @@ extern "C" { * @GNUTLS_CIPHER_SALSA20_256: Salsa20 with 256-bit keys. * @GNUTLS_CIPHER_ESTREAM_SALSA20_256: Estream's Salsa20 variant with 256-bit keys. * @GNUTLS_CIPHER_CHACHA20_POLY1305: The Chacha20 cipher with the Poly1305 authenticator (AEAD). + * @GNUTLS_CIPHER_GOST28147_TC26Z_CFB: GOST 28147-89 (Magma) cipher in CFB mode with TC26 Z S-box. + * @GNUTLS_CIPHER_GOST28147_CPA_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro A S-box. + * @GNUTLS_CIPHER_GOST28147_CPB_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro B S-box. + * @GNUTLS_CIPHER_GOST28147_CPC_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro C S-box. + * @GNUTLS_CIPHER_GOST28147_CPD_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro D S-box. * @GNUTLS_CIPHER_IDEA_PGP_CFB: IDEA in CFB mode (placeholder - unsupported). * @GNUTLS_CIPHER_3DES_PGP_CFB: 3DES in CFB mode (placeholder - unsupported). * @GNUTLS_CIPHER_CAST5_PGP_CFB: CAST5 in CFB mode (placeholder - unsupported). @@ -151,6 +156,11 @@ typedef enum gnutls_cipher_algorithm { GNUTLS_CIPHER_AES_128_CCM_8 = 21, GNUTLS_CIPHER_AES_256_CCM_8 = 22, GNUTLS_CIPHER_CHACHA20_POLY1305 = 23, + GNUTLS_CIPHER_GOST28147_TC26Z_CFB = 24, + GNUTLS_CIPHER_GOST28147_CPA_CFB = 25, + GNUTLS_CIPHER_GOST28147_CPB_CFB = 26, + GNUTLS_CIPHER_GOST28147_CPC_CFB = 27, + GNUTLS_CIPHER_GOST28147_CPD_CFB = 28, /* used only for PGP internals. Ignored in TLS/SSL */ @@ -286,7 +296,7 @@ typedef enum { gnutls_digest_algorithm_t. */ GNUTLS_MAC_AEAD = 200, /* indicates that MAC is on the cipher */ GNUTLS_MAC_UMAC_96 = 201, - GNUTLS_MAC_UMAC_128 = 202 + GNUTLS_MAC_UMAC_128 = 202, } gnutls_mac_algorithm_t; /** |