summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sm4 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove #error if OPENSSL_NO_FOO is definedtb2025-01-251-5/+1
| | | | discussed with jsing
* Expand the SM4_ROUNDS macro.jsing2025-01-221-25/+83
| | | | | | | | | | This macro references variable names that are in the consuming function and are not actually passed to the macro. Expanding it makes the logic clearer. If we wanted to reduce code the middle six group of rounds could be implemented using a for loop (which the compiler can then choose to unroll). ok tb@
* Replace {load,store}_u32_be() with crypto_{load,store}_be32toh().jsing2025-01-221-39/+25
| | | | | | | | load_u32_be() and store_u32_be() are not symmetrical, with load_u32_be() having a rather unexpected indexing interface. Fix up the callers to perform their own indexing and use crypto_{load,store}_be32toh() instead. ok tb@
* Pull the family key and constant key tables out of SM4_set_key().jsing2025-01-221-28/+27
| | | | ok tb@
* Replace rotl() with crypto_rol_u32().jsing2025-01-221-15/+10
| | | | ok tb@
* hide symbols in sm, rand, and poly1305beck2023-07-071-1/+4
| | | | ok jsing@
* Add the SM4 block cipher from the Chinese standard GB/T 32907-2016.tb2019-03-172-0/+314
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