xref: /freebsd/crypto/openssl/doc/man3/EVP_sm4_cbc.pod (revision ad991e4c142ebabad7aef488ad97b189ecabb270)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimEVP_sm4_cbc,
6e71b7053SJung-uk KimEVP_sm4_ecb,
7e71b7053SJung-uk KimEVP_sm4_cfb,
8c9cf7b5cSJung-uk KimEVP_sm4_cfb128,
9e71b7053SJung-uk KimEVP_sm4_ofb,
10e71b7053SJung-uk KimEVP_sm4_ctr
11e71b7053SJung-uk Kim- EVP SM4 cipher
12e71b7053SJung-uk Kim
13e71b7053SJung-uk Kim=head1 SYNOPSIS
14e71b7053SJung-uk Kim
15e71b7053SJung-uk Kim #include <openssl/evp.h>
16e71b7053SJung-uk Kim
17e71b7053SJung-uk Kim const EVP_CIPHER *EVP_sm4_cbc(void);
18e71b7053SJung-uk Kim const EVP_CIPHER *EVP_sm4_ecb(void);
19e71b7053SJung-uk Kim const EVP_CIPHER *EVP_sm4_cfb(void);
20c9cf7b5cSJung-uk Kim const EVP_CIPHER *EVP_sm4_cfb128(void);
21e71b7053SJung-uk Kim const EVP_CIPHER *EVP_sm4_ofb(void);
22e71b7053SJung-uk Kim const EVP_CIPHER *EVP_sm4_ctr(void);
23e71b7053SJung-uk Kim
24e71b7053SJung-uk Kim=head1 DESCRIPTION
25e71b7053SJung-uk Kim
26e71b7053SJung-uk KimThe SM4 blockcipher (GB/T 32907-2016) for EVP.
27e71b7053SJung-uk Kim
28e71b7053SJung-uk KimAll modes below use a key length of 128 bits and acts on blocks of 128 bits.
29e71b7053SJung-uk Kim
30e71b7053SJung-uk Kim=over 4
31e71b7053SJung-uk Kim
32e71b7053SJung-uk Kim=item EVP_sm4_cbc(),
33e71b7053SJung-uk KimEVP_sm4_ecb(),
34e71b7053SJung-uk KimEVP_sm4_cfb(),
35c9cf7b5cSJung-uk KimEVP_sm4_cfb128(),
36e71b7053SJung-uk KimEVP_sm4_ofb(),
37e71b7053SJung-uk KimEVP_sm4_ctr()
38e71b7053SJung-uk Kim
39e71b7053SJung-uk KimThe SM4 blockcipher with a 128-bit key in CBC, ECB, CFB, OFB and CTR modes
40e71b7053SJung-uk Kimrespectively.
41e71b7053SJung-uk Kim
42e71b7053SJung-uk Kim=back
43e71b7053SJung-uk Kim
44b077aed3SPierre Pronchery=head1 NOTES
45b077aed3SPierre Pronchery
46b077aed3SPierre ProncheryDevelopers should be aware of the negative performance implications of
47b077aed3SPierre Proncherycalling these functions multiple times and should consider using
48*ad991e4cSEd MasteL<EVP_CIPHER_fetch(3)> with L<EVP_CIPHER-SM4(7)> instead.
49b077aed3SPierre ProncherySee L<crypto(7)/Performance> for further information.
50b077aed3SPierre Pronchery
51e71b7053SJung-uk Kim=head1 RETURN VALUES
52e71b7053SJung-uk Kim
53e71b7053SJung-uk KimThese functions return a B<EVP_CIPHER> structure that contains the
54e71b7053SJung-uk Kimimplementation of the symmetric cipher. See L<EVP_CIPHER_meth_new(3)> for
55e71b7053SJung-uk Kimdetails of the B<EVP_CIPHER> structure.
56e71b7053SJung-uk Kim
57e71b7053SJung-uk Kim=head1 SEE ALSO
58e71b7053SJung-uk Kim
59e71b7053SJung-uk KimL<evp(7)>,
60e71b7053SJung-uk KimL<EVP_EncryptInit(3)>,
61e71b7053SJung-uk KimL<EVP_CIPHER_meth_new(3)>
62e71b7053SJung-uk Kim
63e71b7053SJung-uk Kim=head1 COPYRIGHT
64e71b7053SJung-uk Kim
65b077aed3SPierre ProncheryCopyright 2017-2023 The OpenSSL Project Authors. All Rights Reserved.
66e71b7053SJung-uk KimCopyright 2017 Ribose Inc. All Rights Reserved.
67e71b7053SJung-uk Kim
68b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
69e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
70e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
71e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
72e71b7053SJung-uk Kim
73e71b7053SJung-uk Kim=cut
74e71b7053SJung-uk Kim
75