Botan 3.2.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 85 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 99 of file simd_32.h.
|
inlinenoexcept |
Load SIMD register with 4 32-bit elements
Definition at line 113 of file simd_32.h.
|
inlineexplicitnoexcept |
Definition at line 456 of file simd_32.h.
References SIMD_4x32().
|
inlinenoexcept |
Return copy *this with each word byte swapped
Definition at line 474 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 581 of file simd_32.h.
References SIMD_4x32().
Referenced by majority().
|
inlinestaticnoexcept |
Load a SIMD register with big-endian convention
Definition at line 172 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 156 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 591 of file simd_32.h.
References choose().
|
inlinenoexcept |
Definition at line 405 of file simd_32.h.
|
inlinenoexcept |
Definition at line 363 of file simd_32.h.
|
inlinenoexcept |
Definition at line 373 of file simd_32.h.
|
inlinenoexcept |
Definition at line 383 of file simd_32.h.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 395 of file simd_32.h.
|
inlinenoexcept |
Definition at line 445 of file simd_32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 595 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 279 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 314 of file simd_32.h.
References rotl().
Referenced by Botan::rotr().
|
inlinenoexcept |
Definition at line 491 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 512 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 416 of file simd_32.h.
References SIMD_4x32().
Referenced by Botan::shl().
|
inlinenoexcept |
Definition at line 432 of file simd_32.h.
References SIMD_4x32().
|
inlinenoexcept |
Definition at line 250 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inlinenoexcept |
Definition at line 264 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inlinestaticnoexcept |
Load SIMD register with one 32-bit element repeated
Definition at line 129 of file simd_32.h.
References SIMD_4x32().
Referenced by operator^=().
|
inlinestaticnoexcept |
Load SIMD register with one 8-bit element repeated
Definition at line 142 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 223 of file simd_32.h.
References bswap(), Botan::CPUID::is_little_endian(), Botan::store_be(), and store_le().
|
inlinenoexcept |
Definition at line 187 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 196 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 535 of file simd_32.h.