Botan 3.4.0
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 (uint32_t out[4]) const noexcept |
void | store_be (uint8_t out[]) const noexcept |
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_le (const void *in) noexcept |
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 88 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 459 of file simd_32.h.
References SIMD_4x32().
|
inlinenoexcept |
Return copy *this with each word byte swapped
Definition at line 477 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 592 of file simd_32.h.
References 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().
|
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(), and load_be().
|
inlinestaticnoexcept |
Definition at line 602 of file simd_32.h.
References choose().
|
inlinenoexcept |
Definition at line 408 of file simd_32.h.
|
inlinenoexcept |
Definition at line 366 of file simd_32.h.
|
inlinenoexcept |
Definition at line 376 of file simd_32.h.
|
inlinenoexcept |
Definition at line 386 of file simd_32.h.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 398 of file simd_32.h.
|
inlinenoexcept |
Definition at line 448 of file simd_32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 606 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 282 of file simd_32.h.
References SIMD_4x32().
Referenced by Botan::rotl(), and rotr().
|
inlinenoexcept |
Right rotation by a compile time constant
Definition at line 317 of file simd_32.h.
References rotl().
Referenced by Botan::rotr().
|
inlinenoexcept |
Definition at line 502 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 523 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 419 of file simd_32.h.
References SIMD_4x32().
Referenced by Botan::shl().
|
inlinenoexcept |
Definition at line 435 of file simd_32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 253 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 267 of file simd_32.h.
References raw(), 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().
|
inlinenoexcept |
|
inlinenoexcept |
Load a SIMD register with big-endian convention
Definition at line 226 of file simd_32.h.
References bswap(), Botan::CPUID::is_little_endian(), Botan::store_be(), and store_le().
|
inlinenoexcept |
Definition at line 190 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 199 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 546 of file simd_32.h.