|
Botan 3.11.0
Crypto and TLS for C&
|
#include <simd_4x32.h>
Public Member Functions | |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | andc (const SIMD_4x32 &other) const noexcept |
| BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 | bswap () const noexcept |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | operator& (const SIMD_4x32 &other) const noexcept |
| void BOTAN_FN_ISA_SIMD_4X32 | operator&= (const SIMD_4x32 &other) noexcept |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | operator+ (const SIMD_4x32 &other) const noexcept |
| void BOTAN_FN_ISA_SIMD_4X32 | operator+= (const SIMD_4x32 &other) noexcept |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | operator- (const SIMD_4x32 &other) const noexcept |
| void BOTAN_FN_ISA_SIMD_4X32 | operator-= (const SIMD_4x32 &other) noexcept |
| SIMD_4x32 & | operator= (const SIMD_4x32 &other)=default |
| SIMD_4x32 & | operator= (SIMD_4x32 &&other)=default |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | operator^ (const SIMD_4x32 &other) const noexcept |
| void BOTAN_FN_ISA_SIMD_4X32 | operator^= (const SIMD_4x32 &other) noexcept |
| void BOTAN_FN_ISA_SIMD_4X32 | operator^= (uint32_t other) noexcept |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | operator| (const SIMD_4x32 &other) const noexcept |
| void BOTAN_FN_ISA_SIMD_4X32 | operator|= (const SIMD_4x32 &other) noexcept |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | operator~ () const noexcept |
| native_simd_type BOTAN_FN_ISA_SIMD_4X32 | raw () const noexcept |
| template<size_t ROT> requires (ROT > 0 && ROT < 32) | |
| BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 | rotl () const noexcept |
| template<size_t ROT> | |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | rotr () const noexcept |
| template<size_t I> requires (I <= 3) | |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | shift_elems_left () const noexcept |
| template<size_t I> requires (I <= 3) | |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | shift_elems_right () const noexcept |
| template<int SHIFT> requires (SHIFT > 0 && SHIFT < 32) | |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | shl () const noexcept |
| template<int SHIFT> | |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | shr () const noexcept |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | sigma0 () const noexcept |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | sigma1 () const noexcept |
| BOTAN_FN_ISA_SIMD_4X32 | SIMD_4x32 () noexcept |
| SIMD_4x32 (const SIMD_4x32 &other)=default | |
| BOTAN_FN_ISA_SIMD_4X32 | SIMD_4x32 (native_simd_type x) noexcept |
| SIMD_4x32 (SIMD_4x32 &&other)=default | |
| BOTAN_FN_ISA_SIMD_4X32 | SIMD_4x32 (uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3) noexcept |
| void BOTAN_FN_ISA_SIMD_4X32 | store_be (std::span< uint8_t, 16 > out) const |
| void BOTAN_FN_ISA_SIMD_4X32 | store_be (uint32_t out[4]) const noexcept |
| BOTAN_FN_ISA_SIMD_4X32 void | store_be (uint8_t out[]) const noexcept |
| void BOTAN_FN_ISA_SIMD_4X32 | store_le (std::span< uint8_t, 16 > out) const |
| void BOTAN_FN_ISA_SIMD_4X32 | store_le (uint32_t out[4]) const noexcept |
| void BOTAN_FN_ISA_SIMD_4X32 | store_le (uint64_t out[2]) const noexcept |
| void BOTAN_FN_ISA_SIMD_4X32 | store_le (uint8_t out[]) const noexcept |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | swap_halves () const |
| SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | top_bit_mask () const |
| ~SIMD_4x32 ()=default | |
Static Public Member Functions | |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | alignr4 (const SIMD_4x32 &a, const SIMD_4x32 &b) |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | alignr8 (const SIMD_4x32 &a, const SIMD_4x32 &b) |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | byte_shuffle (const SIMD_4x32 &tbl, const SIMD_4x32 &idx) |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | choose (const SIMD_4x32 &mask, const SIMD_4x32 &a, const SIMD_4x32 &b) noexcept |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | load_be (const void *in) noexcept |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | load_be (std::span< const uint8_t, 16 > in) |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | load_le (const void *in) noexcept |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | load_le (std::span< const uint8_t, 16 > in) |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | majority (const SIMD_4x32 &x, const SIMD_4x32 &y, const SIMD_4x32 &z) noexcept |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | masked_byte_shuffle (const SIMD_4x32 &tbl, const SIMD_4x32 &idx) |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | splat (uint32_t B) noexcept |
| static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 | splat_u8 (uint8_t B) noexcept |
| static void BOTAN_FN_ISA_SIMD_4X32 | transpose (SIMD_4x32 &B0, SIMD_4x32 &B1, SIMD_4x32 &B2, SIMD_4x32 &B3) noexcept |
4x32 bit SIMD register
This class is not a general purpose SIMD type, and only offers instructions needed for evaluation of specific crypto primitives. For example it does not currently have equality operators of any kind.
Implemented for SSE2, VMX (Altivec), ARMv7/Aarch64 NEON, LoongArch LSX and Wasm SIMD128
Definition at line 61 of file simd_4x32.h.
|
default |
References SIMD_4x32().
Referenced by alignr4(), alignr8(), andc(), bswap(), byte_shuffle(), choose(), load_be(), load_be(), load_le(), load_le(), majority(), masked_byte_shuffle(), operator&(), operator&=(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator=(), operator^(), operator^=(), operator|(), operator|=(), operator~(), rotl(), rotr(), shift_elems_left(), shift_elems_right(), shl(), shr(), sigma0(), sigma1(), SIMD_4x32(), SIMD_4x32(), splat(), splat_u8(), swap_halves(), top_bit_mask(), and transpose().
|
default |
References SIMD_4x32().
|
default |
|
inlinenoexcept |
Zero initialize SIMD register with 4 32-bit elements
Definition at line 86 of file simd_4x32.h.
Referenced by alignr4(), alignr8(), andc(), bswap(), byte_shuffle(), choose(), load_be(), load_le(), masked_byte_shuffle(), operator~(), rotl(), shift_elems_left(), shift_elems_right(), shl(), shr(), sigma0(), sigma1(), splat(), splat_u8(), swap_halves(), and top_bit_mask().
|
inlinenoexcept |
Load SIMD register with 4 32-bit elements
Definition at line 103 of file simd_4x32.h.
|
inlineexplicitnoexcept |
Definition at line 918 of file simd_4x32.h.
|
inlinestatic |
Definition at line 843 of file simd_4x32.h.
References raw(), SIMD_4x32(), and SIMD_4x32().
|
inlinestatic |
Definition at line 860 of file simd_4x32.h.
References raw(), SIMD_4x32(), and SIMD_4x32().
Referenced by swap_halves().
|
inlinenoexcept |
Definition at line 552 of file simd_4x32.h.
References SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::clmul().
|
inlinenoexcept |
Return copy *this with each word byte swapped
Definition at line 576 of file simd_4x32.h.
References raw(), SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::clmul(), load_be(), load_le(), store_be(), and store_le().
|
inlinestatic |
Byte shuffle
This function assumes that each byte of idx is <= 16; it may produce incorrect results if this does not hold.
Definition at line 777 of file simd_4x32.h.
References raw(), SIMD_4x32(), and SIMD_4x32().
Referenced by masked_byte_shuffle().
|
inlinestaticnoexcept |
Definition at line 749 of file simd_4x32.h.
References SIMD_4x32(), and SIMD_4x32().
Referenced by majority().
|
inlinestaticnoexcept |
Load a SIMD register with big-endian convention
Definition at line 189 of file simd_4x32.h.
References bswap(), Botan::load_be(), load_le(), Botan::R1(), Botan::R2(), SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::SHA_256::compress_digest_armv8(), Botan::SHA_256::compress_digest_x86(), load_be(), and Botan::SHA_1::sha1_compress_x86().
|
inlinestatic |
Definition at line 215 of file simd_4x32.h.
References load_be(), and SIMD_4x32().
|
inlinestaticnoexcept |
Load a SIMD register with little-endian convention
Definition at line 162 of file simd_4x32.h.
References bswap(), Botan::load_le(), Botan::R1(), Botan::R2(), SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::SHA_256::compress_digest_armv8(), Botan::SHA_256::compress_digest_x86(), load_be(), load_le(), and Botan::SHA_1::sha1_compress_x86().
|
inlinestatic |
Definition at line 211 of file simd_4x32.h.
References load_le(), and SIMD_4x32().
|
inlinestaticnoexcept |
Definition at line 765 of file simd_4x32.h.
References choose(), and SIMD_4x32().
|
inlinestatic |
Byte shuffle with masking
If the index is >= 128 then the output byte is set to zero.
Warning: for indices between 16 and 128 this function may have different behaviors depending on the CPU; possibly the output is zero, tbl[idx % 16], or even undefined.
Definition at line 814 of file simd_4x32.h.
References byte_shuffle(), raw(), SIMD_4x32(), and SIMD_4x32().
|
inlinenoexcept |
Binary AND elements of a SIMD vector
Definition at line 421 of file simd_4x32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 485 of file simd_4x32.h.
References SIMD_4x32().
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 427 of file simd_4x32.h.
References SIMD_4x32().
|
inlinenoexcept |
Subtract elements of a SIMD vector
Definition at line 394 of file simd_4x32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 441 of file simd_4x32.h.
References SIMD_4x32().
References SIMD_4x32().
References SIMD_4x32().
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 455 of file simd_4x32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 469 of file simd_4x32.h.
References splat().
|
inlinenoexcept |
Binary OR elements of a SIMD vector
Definition at line 412 of file simd_4x32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 471 of file simd_4x32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 537 of file simd_4x32.h.
References SIMD_4x32(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 916 of file simd_4x32.h.
Referenced by alignr4(), alignr8(), bswap(), byte_shuffle(), Botan::clmul(), masked_byte_shuffle(), Botan::reverse_vector(), rotl(), Botan::SHA_1::sha1_compress_x86(), shift_elems_left(), shift_elems_right(), sigma0(), sigma1(), store_le(), swap_halves(), and top_bit_mask().
|
inlinenoexcept |
Left rotation by a compile time constant
Definition at line 329 of file simd_4x32.h.
References raw(), SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::rotl(), and rotr().
|
inlinenoexcept |
Right rotation by a compile time constant
Definition at line 378 of file simd_4x32.h.
References rotl(), and SIMD_4x32().
Referenced by Botan::rotr(), sigma0(), and sigma1().
|
inlinenoexcept |
Definition at line 602 of file simd_4x32.h.
References raw(), SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::clmul(), and Botan::polyval_multiply().
|
inlinenoexcept |
Definition at line 639 of file simd_4x32.h.
References raw(), SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::polyval_multiply().
|
inlinenoexcept |
Definition at line 500 of file simd_4x32.h.
References SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::mulx_polyval(), and Botan::shl().
|
inlinenoexcept |
Definition at line 520 of file simd_4x32.h.
References SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::mulx_polyval().
|
inlinenoexcept |
Definition at line 300 of file simd_4x32.h.
References raw(), rotr(), SIMD_4x32(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 314 of file simd_4x32.h.
References raw(), rotr(), SIMD_4x32(), and SIMD_4x32().
|
inlinestaticnoexcept |
Load SIMD register with one 32-bit element repeated
Definition at line 127 of file simd_4x32.h.
References SIMD_4x32(), and SIMD_4x32().
Referenced by operator^=().
|
inlinestaticnoexcept |
Load SIMD register with one 8-bit element repeated
Definition at line 144 of file simd_4x32.h.
References Botan::make_uint32(), SIMD_4x32(), and SIMD_4x32().
|
inline |
Definition at line 293 of file simd_4x32.h.
References store_be().
Referenced by store_be().
|
inlinenoexcept |
|
inlinenoexcept |
Load a SIMD register with big-endian convention
Definition at line 267 of file simd_4x32.h.
References bswap(), Botan::store_be(), and store_le().
|
inline |
Definition at line 295 of file simd_4x32.h.
References store_le().
Referenced by store_le().
|
inlinenoexcept |
Definition at line 219 of file simd_4x32.h.
References store_le().
Referenced by Botan::SHA_256::compress_digest_armv8(), Botan::SHA_256::compress_digest_x86(), store_be(), store_le(), and store_le().
|
inlinenoexcept |
Definition at line 227 of file simd_4x32.h.
References store_le().
|
inlinenoexcept |
Load a SIMD register with little-endian convention
Definition at line 234 of file simd_4x32.h.
References bswap(), raw(), and Botan::store_le().
|
inline |
Swap the upper and lower 64-bit halves of the vector
Definition at line 908 of file simd_4x32.h.
References alignr8(), raw(), SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::polyval_reduce().
|
inline |
If the topmost bit of x is set, return a vector of all ones, otherwise a vector of all zeros ie: (v >> 127) ? splat(0xFFFFFFFF) : zero;
Most of the implementations work by doing an arithmetic shift of 31 to smear the top bits of each word, followed by a broadcast of the top word.
Definition at line 883 of file simd_4x32.h.
References raw(), SIMD_4x32(), and SIMD_4x32().
Referenced by Botan::mulx_polyval().
|
inlinestaticnoexcept |
4x4 Transposition on SIMD registers
Definition at line 681 of file simd_4x32.h.
References SIMD_4x32().