1.\" $OpenBSD: EVP_sm4_cbc.3,v 1.1 2019/03/18 05:56:24 schwarze Exp $ 2.\" full merge up to: OpenSSL 87103969 Oct 1 14:11:57 2018 -0700 3.\" 4.\" Copyright (c) 2017 Ribose Inc 5.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org> 6.\" The original version of this file 7.\" was written by Ronald Tse <ronald.tse@ribose.com>. 8.\" 9.\" Permission to use, copy, modify, and/or distribute this software for any 10.\" purpose with or without fee is hereby granted, provided that the above 11.\" copyright notice and this permission notice appear in all copies. 12.\" 13.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES 14.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 15.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR 16.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 18.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 19.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20.\" 21.Dd $Mdocdate: March 18 2019 $ 22.Dt EVP_SM4_CBC 3 23.Os 24.Sh NAME 25.Nm EVP_sm4_cbc , 26.Nm EVP_sm4_ecb , 27.Nm EVP_sm4_cfb , 28.Nm EVP_sm4_cfb128 , 29.Nm EVP_sm4_ofb , 30.Nm EVP_sm4_ctr 31.Nd EVP SM4 cipher 32.Sh SYNOPSIS 33.In openssl/evp.h 34.Ft const EVP_CIPHER * 35.Fn EVP_sm4_cbc void 36.Ft const EVP_CIPHER * 37.Fn EVP_sm4_ecb void 38.Ft const EVP_CIPHER * 39.Fn EVP_sm4_cfb void 40.Ft const EVP_CIPHER * 41.Fn EVP_sm4_cfb128 void 42.Ft const EVP_CIPHER * 43.Fn EVP_sm4_ofb void 44.Ft const EVP_CIPHER * 45.Fn EVP_sm4_ctr void 46.Sh DESCRIPTION 47These functions provide the SM4 blockcipher in the 48.Xr evp 3 49framework. 50.Pp 51All modes use a key length of 128 bits and act on blocks of 128 52bits. 53.Pp 54.Fn EVP_sm4_cfb 55is an alias for 56.Fn EVP_sm4_cfb128 . 57.Pp 58With an argument of 59.Qq sm4 60or 61.Qq SM4 , 62.Xr EVP_get_cipherbyname 3 63returns 64.Fn EVP_sm4_cbc . 65.Sh RETURN VALUES 66These functions return an 67.Vt EVP_CIPHER 68structure that provides the implementation of the symmetric cipher. 69.Sh SEE ALSO 70.Xr evp 3 , 71.Xr EVP_EncryptInit 3 72.Sh STANDARDS 73.Rs 74.%T Information security technology - SM4 block cipher algorithm 75.%I National Standards of People's Republic of China 76.%N GB/T 32907-2016 77.%D August 29, 2016 78.Re 79.Sh HISTORY 80These functions appeared in OpenSSL 1.1.1 and have been available since 81.Ox 6.5 . 82