| 077b20bd | 22-Jan-2025 |
jsing <jsing@openbsd.org> |
Expand the SM4_ROUNDS macro.
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 r
Expand the SM4_ROUNDS macro.
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@
show more ...
|
| b6c13eaa | 22-Jan-2025 |
jsing <jsing@openbsd.org> |
Replace {load,store}_u32_be() with crypto_{load,store}_be32toh().
load_u32_be() and store_u32_be() are not symmetrical, with load_u32_be() having a rather unexpected indexing interface. Fix up the c
Replace {load,store}_u32_be() with crypto_{load,store}_be32toh().
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@
show more ...
|