Botan 3.6.1
Crypto and TLS for C&
|
#include <simd_32.h>
Public Member Functions | |
SIMD_4x32 | andc (const SIMD_4x32 &other) const noexcept |
SIMD_4x32 | bswap () const noexcept |
SIMD_4x32 | operator& (const SIMD_4x32 &other) const noexcept |
void | operator&= (const SIMD_4x32 &other) noexcept |
SIMD_4x32 | operator+ (const SIMD_4x32 &other) const noexcept |
void | operator+= (const SIMD_4x32 &other) noexcept |
SIMD_4x32 | operator- (const SIMD_4x32 &other) const noexcept |
void | operator-= (const SIMD_4x32 &other) noexcept |
SIMD_4x32 & | operator= (const SIMD_4x32 &other)=default |
SIMD_4x32 & | operator= (SIMD_4x32 &&other)=default |
SIMD_4x32 | operator^ (const SIMD_4x32 &other) const noexcept |
void | operator^= (const SIMD_4x32 &other) noexcept |
void | operator^= (uint32_t other) noexcept |
SIMD_4x32 | operator| (const SIMD_4x32 &other) const noexcept |
void | operator|= (const SIMD_4x32 &other) noexcept |
SIMD_4x32 | operator~ () const noexcept |
native_simd_type | raw () const noexcept |
template<size_t ROT> requires (ROT > 0 && ROT < 32) | |
SIMD_4x32 | rotl () const noexcept |
template<size_t ROT> | |
SIMD_4x32 | rotr () const noexcept |
template<size_t I> requires (I <= 3) | |
SIMD_4x32 | shift_elems_left () const noexcept |
template<size_t I> requires (I <= 3) | |
SIMD_4x32 | shift_elems_right () const noexcept |
template<int SHIFT> requires (SHIFT > 0 && SHIFT < 32) | |
SIMD_4x32 | shl () const noexcept |
template<int SHIFT> | |
SIMD_4x32 | shr () const noexcept |
SIMD_4x32 | sigma0 () const noexcept |
SIMD_4x32 | sigma1 () const noexcept |
SIMD_4x32 () noexcept | |
SIMD_4x32 (const SIMD_4x32 &other)=default | |
SIMD_4x32 (const uint32_t B[4]) noexcept | |
SIMD_4x32 (native_simd_type x) noexcept | |
SIMD_4x32 (SIMD_4x32 &&other)=default | |
SIMD_4x32 (uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3) noexcept | |
void | store_be (std::span< uint8_t, 16 > out) const |
void | store_be (uint32_t out[4]) const noexcept |
void | store_be (uint8_t out[]) const noexcept |
void | store_le (std::span< uint8_t, 16 > out) const |
void | store_le (uint32_t out[4]) const noexcept |
void | store_le (uint64_t out[2]) const noexcept |
void | store_le (uint8_t out[]) const noexcept |
~SIMD_4x32 ()=default | |
Static Public Member Functions | |
static SIMD_4x32 | choose (const SIMD_4x32 &mask, const SIMD_4x32 &a, const SIMD_4x32 &b) noexcept |
static SIMD_4x32 | load_be (const void *in) noexcept |
static SIMD_4x32 | load_be (std::span< const uint8_t, 16 > in) |
static SIMD_4x32 | load_le (const void *in) noexcept |
static SIMD_4x32 | load_le (std::span< const uint8_t, 16 > in) |
static SIMD_4x32 | majority (const SIMD_4x32 &x, const SIMD_4x32 &y, const SIMD_4x32 &z) noexcept |
static SIMD_4x32 | splat (uint32_t B) noexcept |
static SIMD_4x32 | splat_u8 (uint8_t B) noexcept |
static void | 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), and NEON.
|
default |
|
default |
|
default |
|
inlinenoexcept |
Zero initialize SIMD register with 4 32-bit elements
Definition at line 89 of file simd_32.h.
Referenced by andc(), bswap(), choose(), load_be(), load_le(), operator~(), rotl(), shift_elems_left(), shift_elems_right(), shl(), shr(), sigma0(), sigma1(), splat(), and splat_u8().
|
inlineexplicitnoexcept |
Load SIMD register with 4 32-bit elements
Definition at line 102 of file simd_32.h.
|
inlinenoexcept |
Load SIMD register with 4 32-bit elements
Definition at line 116 of file simd_32.h.
|
inlineexplicitnoexcept |
Definition at line 467 of file simd_32.h.
References SIMD_4x32().
|
inlinenoexcept |
Return copy *this with each word byte swapped
Definition at line 485 of file simd_32.h.
References SIMD_4x32(), and T.
Referenced by load_be(), load_le(), store_be(), and store_le().
|
inlinestaticnoexcept |
Definition at line 600 of file simd_32.h.
References Botan::b, and SIMD_4x32().
Referenced by majority().
|
inlinestaticnoexcept |
Load a SIMD register with big-endian convention
Definition at line 175 of file simd_32.h.
References bswap(), Botan::CPUID::is_little_endian(), Botan::load_be(), load_le(), and SIMD_4x32().
Referenced by load_be().
|
inlinestatic |
|
inlinestaticnoexcept |
Load a SIMD register with little-endian convention
Definition at line 159 of file simd_32.h.
References bswap(), Botan::CPUID::is_big_endian(), Botan::load_le(), and SIMD_4x32().
Referenced by Botan::BOTAN_FUNC_ISA(), Botan::BOTAN_FUNC_ISA(), load_be(), and load_le().
|
inlinestatic |
|
inlinestaticnoexcept |
Definition at line 610 of file simd_32.h.
References choose().
|
inlinenoexcept |
Definition at line 416 of file simd_32.h.
|
inlinenoexcept |
Definition at line 374 of file simd_32.h.
|
inlinenoexcept |
Definition at line 384 of file simd_32.h.
|
inlinenoexcept |
Definition at line 394 of file simd_32.h.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 406 of file simd_32.h.
|
inlinenoexcept |
Definition at line 456 of file simd_32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 614 of file simd_32.h.
Referenced by shift_elems_left(), shift_elems_right(), sigma0(), sigma1(), and store_le().
|
inlinenoexcept |
Left rotation by a compile time constant
Definition at line 290 of file simd_32.h.
References SIMD_4x32().
Referenced by Botan::rotl(), and rotr().
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 510 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 531 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 427 of file simd_32.h.
References SIMD_4x32().
Referenced by Botan::shl().
|
inlinenoexcept |
Definition at line 443 of file simd_32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 261 of file simd_32.h.
References raw(), rotr(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 275 of file simd_32.h.
References raw(), rotr(), and SIMD_4x32().
|
inlinestaticnoexcept |
Load SIMD register with one 32-bit element repeated
Definition at line 132 of file simd_32.h.
References SIMD_4x32().
Referenced by operator^=().
|
inlinestaticnoexcept |
Load SIMD register with one 8-bit element repeated
Definition at line 145 of file simd_32.h.
References Botan::make_uint32(), and SIMD_4x32().
Referenced by Botan::BOTAN_FUNC_ISA().
|
inline |
Definition at line 254 of file simd_32.h.
References store_be().
Referenced by store_be().
|
inlinenoexcept |
|
inlinenoexcept |
Load a SIMD register with big-endian convention
Definition at line 230 of file simd_32.h.
References bswap(), Botan::CPUID::is_little_endian(), Botan::store_be(), and store_le().
|
inline |
Definition at line 256 of file simd_32.h.
References store_le().
Referenced by store_le().
|
inlinenoexcept |
Definition at line 194 of file simd_32.h.
References store_le().
Referenced by Botan::BOTAN_FUNC_ISA(), store_be(), and store_le().
|
inlinenoexcept |
|
inlinenoexcept |
Load a SIMD register with little-endian convention
Definition at line 203 of file simd_32.h.
References bswap(), Botan::CPUID::is_little_endian(), raw(), and Botan::store_le().
|
inlinestaticnoexcept |
4x4 Transposition on SIMD registers
Definition at line 554 of file simd_32.h.