<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>EVP_CIPHER-SM4</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:root@localhost" /> </head> <body> <ul id="index"> <li><a href="#NAME">NAME</a></li> <li><a href="#DESCRIPTION">DESCRIPTION</a> <ul> <li><a href="#Algorithm-Names">Algorithm Names</a></li> <li><a href="#Parameters">Parameters</a></li> </ul> </li> <li><a href="#NOTES">NOTES</a></li> <li><a href="#SEE-ALSO">SEE ALSO</a></li> <li><a href="#COPYRIGHT">COPYRIGHT</a></li> </ul> <h1 id="NAME">NAME</h1> <p>EVP_CIPHER-SM4 - The SM4 EVP_CIPHER implementations</p> <h1 id="DESCRIPTION">DESCRIPTION</h1> <p>Support for SM4 symmetric encryption using the <b>EVP_CIPHER</b> API.</p> <h2 id="Algorithm-Names">Algorithm Names</h2> <p>The following algorithms are available in the default provider:</p> <dl> <dt id="SM4-CBC:SM4">"SM4-CBC:SM4"</dt> <dd> </dd> <dt id="SM4-ECB">"SM4-ECB"</dt> <dd> </dd> <dt id="SM4-CTR">"SM4-CTR"</dt> <dd> </dd> <dt id="SM4-OFB-or-SM4-OFB128">"SM4-OFB" or "SM4-OFB128"</dt> <dd> </dd> <dt id="SM4-CFB-or-SM4-CFB128">"SM4-CFB" or "SM4-CFB128"</dt> <dd> </dd> <dt id="SM4-GCM">"SM4-GCM"</dt> <dd> </dd> <dt id="SM4-CCM">"SM4-CCM"</dt> <dd> </dd> <dt id="SM4-XTS">"SM4-XTS"</dt> <dd> </dd> </dl> <h2 id="Parameters">Parameters</h2> <p>This implementation supports the parameters described in <a href="../man3/EVP_EncryptInit.html">"PARAMETERS" in EVP_EncryptInit(3)</a>.</p> <h1 id="NOTES">NOTES</h1> <p>The SM4-XTS implementation allows streaming to be performed, but each <a href="../man3/EVP_EncryptUpdate.html">EVP_EncryptUpdate(3)</a> or <a href="../man3/EVP_DecryptUpdate.html">EVP_DecryptUpdate(3)</a> call requires each input to be a multiple of the blocksize. Only the final EVP_EncryptUpdate() or EVP_DecryptUpdate() call can optionally have an input that is not a multiple of the blocksize but is larger than one block. In that case ciphertext stealing (CTS) is used to fill the block.</p> <h1 id="SEE-ALSO">SEE ALSO</h1> <p><a href="../man7/provider-cipher.html">provider-cipher(7)</a>, <a href="../man7/OSSL_PROVIDER-default.html">OSSL_PROVIDER-default(7)</a></p> <h1 id="COPYRIGHT">COPYRIGHT</h1> <p>Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.</p> <p>Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p> </body> </html>