Botan 3.0.0-alpha0
Crypto and TLS for C&
|
#include <simd_32.h>
Public Member Functions | |
SIMD_4x32 | andc (const SIMD_4x32 &other) const |
SIMD_4x32 | bswap () const |
SIMD_4x32 | operator& (const SIMD_4x32 &other) const |
void | operator&= (const SIMD_4x32 &other) |
SIMD_4x32 | operator+ (const SIMD_4x32 &other) const |
void | operator+= (const SIMD_4x32 &other) |
SIMD_4x32 | operator- (const SIMD_4x32 &other) const |
void | operator-= (const SIMD_4x32 &other) |
SIMD_4x32 & | operator= (const SIMD_4x32 &other)=default |
SIMD_4x32 & | operator= (SIMD_4x32 &&other)=default |
SIMD_4x32 | operator^ (const SIMD_4x32 &other) const |
void | operator^= (const SIMD_4x32 &other) |
void | operator^= (uint32_t other) |
SIMD_4x32 | operator| (const SIMD_4x32 &other) const |
void | operator|= (const SIMD_4x32 &other) |
SIMD_4x32 | operator~ () const |
native_simd_type | raw () const |
template<size_t ROT> | |
SIMD_4x32 | rotl () const |
template<size_t ROT> | |
SIMD_4x32 | rotr () const |
template<size_t I> | |
SIMD_4x32 | shift_elems_left () const |
template<size_t I> | |
SIMD_4x32 | shift_elems_right () const |
template<int SHIFT> | |
SIMD_4x32 | shl () const |
template<int SHIFT> | |
SIMD_4x32 | shr () const |
SIMD_4x32 | sigma0 () const |
SIMD_4x32 | sigma1 () const |
SIMD_4x32 () | |
SIMD_4x32 (const SIMD_4x32 &other)=default | |
SIMD_4x32 (const uint32_t B[4]) | |
SIMD_4x32 (native_simd_type x) | |
SIMD_4x32 (SIMD_4x32 &&other)=default | |
SIMD_4x32 (uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3) | |
void | store_be (uint8_t out[]) const |
void | store_le (uint32_t out[4]) const |
void | store_le (uint64_t out[2]) const |
void | store_le (uint8_t out[]) const |
Static Public Member Functions | |
static SIMD_4x32 | choose (const SIMD_4x32 &mask, const SIMD_4x32 &a, const SIMD_4x32 &b) |
static SIMD_4x32 | load_be (const void *in) |
static SIMD_4x32 | load_le (const void *in) |
static SIMD_4x32 | majority (const SIMD_4x32 &x, const SIMD_4x32 &y, const SIMD_4x32 &z) |
static SIMD_4x32 | splat (uint32_t B) |
static SIMD_4x32 | splat_u8 (uint8_t B) |
static void | transpose (SIMD_4x32 &B0, SIMD_4x32 &B1, SIMD_4x32 &B2, SIMD_4x32 &B3) |
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 |
|
inline |
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().
|
inlineexplicit |
Load SIMD register with 4 32-bit elements
Definition at line 99 of file simd_32.h.
|
inline |
Load SIMD register with 4 32-bit elements
Definition at line 114 of file simd_32.h.
|
inlineexplicit |
Definition at line 494 of file simd_32.h.
References SIMD_4x32().
Referenced by choose().
|
inline |
Return copy *this with each word byte swapped
Definition at line 513 of file simd_32.h.
References Botan::bswap_4(), SIMD_4x32(), and T.
Referenced by load_be(), load_le(), store_be(), and store_le().
|
inlinestatic |
Definition at line 633 of file simd_32.h.
References andc(), b, raw(), and SIMD_4x32().
Referenced by majority().
|
inlinestatic |
Load a SIMD register with big-endian convention
Definition at line 177 of file simd_32.h.
References bswap(), Botan::CPUID::is_little_endian(), Botan::load_be(), load_le(), and SIMD_4x32().
|
inlinestatic |
Load a SIMD register with little-endian convention
Definition at line 160 of file simd_32.h.
References bswap(), Botan::CPUID::is_big_endian(), Botan::load_le(), and SIMD_4x32().
Referenced by load_be().
|
inlinestatic |
Definition at line 644 of file simd_32.h.
References choose().
|
inline |
Definition at line 440 of file simd_32.h.
|
inline |
Definition at line 391 of file simd_32.h.
|
inline |
Definition at line 402 of file simd_32.h.
|
inline |
Definition at line 413 of file simd_32.h.
|
inline |
|
inline |
Definition at line 429 of file simd_32.h.
|
inline |
Definition at line 482 of file simd_32.h.
References SIMD_4x32().
|
inline |
Definition at line 649 of file simd_32.h.
Referenced by choose(), shift_elems_left(), shift_elems_right(), sigma0(), sigma1(), and store_le().
|
inline |
Left rotation by a compile time constant
Definition at line 297 of file simd_32.h.
References SIMD_4x32().
Referenced by Botan::rotl(), and rotr().
|
inline |
Right rotation by a compile time constant
Definition at line 336 of file simd_32.h.
References rotl().
Referenced by Botan::rotr().
|
inline |
Definition at line 539 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inline |
Definition at line 561 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inline |
Definition at line 452 of file simd_32.h.
References SIMD_4x32().
Referenced by Botan::shl().
|
inline |
Definition at line 468 of file simd_32.h.
References SIMD_4x32().
|
inline |
Definition at line 266 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inline |
Definition at line 281 of file simd_32.h.
References raw(), and SIMD_4x32().
|
inlinestatic |
Load SIMD register with one 32-bit element repeated
Definition at line 131 of file simd_32.h.
References SIMD_4x32().
Referenced by operator^=().
|
inlinestatic |
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().
|
inline |
Load a SIMD register with big-endian convention
Definition at line 236 of file simd_32.h.
References bswap(), Botan::CPUID::is_little_endian(), Botan::store_be(), and store_le().
|
inline |
Definition at line 193 of file simd_32.h.
References store_le().
Referenced by store_be(), and store_le().
|
inline |
Definition at line 198 of file simd_32.h.
References store_le().
|
inline |
Load a SIMD register with little-endian convention
Definition at line 206 of file simd_32.h.
References bswap(), Botan::CPUID::is_little_endian(), raw(), and Botan::store_le().
|
inlinestatic |
4x4 Transposition on SIMD registers
Definition at line 585 of file simd_32.h.