SM4: Document that the XTS mode does not support streaming
authorTomas Mraz <tomas@openssl.org>
Wed, 13 Dec 2023 09:03:07 +0000 (10:03 +0100)
committerTomas Mraz <tomas@openssl.org>
Fri, 22 Dec 2023 12:42:28 +0000 (13:42 +0100)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23028)

doc/man7/EVP_CIPHER-SM4.pod

index b0c292757e77f166e6f3f65848db7de2b61a3a5f..a446fafb6d4b18c587f6e7f89bb3956dc42659ec 100644 (file)
@@ -37,6 +37,15 @@ The following algorithms are available in the default provider:
 This implementation supports the parameters described in
 L<EVP_EncryptInit(3)/PARAMETERS>.
 
+=head1 NOTES
+
+The SM4-XTS implementation allows streaming to be performed, but each
+L<EVP_EncryptUpdate(3)> or L<EVP_DecryptUpdate(3)> 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.
+
 =head1 SEE ALSO
 
 L<provider-cipher(7)>, L<OSSL_PROVIDER-default(7)>