summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/c_all.c
diff options
context:
space:
mode:
authortb <>2019-03-17 17:42:37 +0000
committertb <>2019-03-17 17:42:37 +0000
commitc8acd603ab3f519a4bfe159fe808dc94fb3d7b1d (patch)
treee7748056894786129bb207a2b1e279e8dd2d2eb9 /src/lib/libcrypto/evp/c_all.c
parent06bdba97e3fb8c99bcbb5665009130127e348e06 (diff)
downloadopenbsd-c8acd603ab3f519a4bfe159fe808dc94fb3d7b1d.tar.gz
openbsd-c8acd603ab3f519a4bfe159fe808dc94fb3d7b1d.tar.bz2
openbsd-c8acd603ab3f519a4bfe159fe808dc94fb3d7b1d.zip
Add the SM4 block cipher from the Chinese standard GB/T 32907-2016.
This is an ISC licensed version based on the sources by Ribose Inc that were ported to OpenSSL in 2017. Patch from Daniel Wyatt with minor tweaks. ok inoguchi, jsing
Diffstat (limited to 'src/lib/libcrypto/evp/c_all.c')
-rw-r--r--src/lib/libcrypto/evp/c_all.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/c_all.c b/src/lib/libcrypto/evp/c_all.c
index 5ed55f67f6..cce3640866 100644
--- a/src/lib/libcrypto/evp/c_all.c
+++ b/src/lib/libcrypto/evp/c_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: c_all.c,v 1.24 2018/12/26 15:11:04 tb Exp $ */ 1/* $OpenBSD: c_all.c,v 1.25 2019/03/17 17:42:37 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -227,6 +227,16 @@ OpenSSL_add_all_ciphers_internal(void)
227 EVP_add_cipher(EVP_gost2814789_cfb64()); 227 EVP_add_cipher(EVP_gost2814789_cfb64());
228 EVP_add_cipher(EVP_gost2814789_cnt()); 228 EVP_add_cipher(EVP_gost2814789_cnt());
229#endif 229#endif
230
231#ifndef OPENSSL_NO_SM4
232 EVP_add_cipher(EVP_sm4_ecb());
233 EVP_add_cipher(EVP_sm4_cbc());
234 EVP_add_cipher(EVP_sm4_cfb());
235 EVP_add_cipher(EVP_sm4_ofb());
236 EVP_add_cipher(EVP_sm4_ctr());
237 EVP_add_cipher_alias(SN_sm4_cbc, "SM4");
238 EVP_add_cipher_alias(SN_sm4_cbc, "sm4");
239#endif
230} 240}
231 241
232void 242void