Botan
2.1.0
Crypto and TLS for C++11
|
#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<< (size_t shift) const |
SIMD_4x32 & | operator= (const SIMD_4x32 &other)=default |
SIMD_4x32 & | operator= (SIMD_4x32 &&other)=default |
SIMD_4x32 | operator>> (size_t shift) 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 |
void | rotate_left (size_t rot) |
void | rotate_right (size_t rot) |
SIMD_4x32 (const SIMD_4x32 &other)=default | |
SIMD_4x32 (SIMD_4x32 &&other)=default | |
SIMD_4x32 () | |
SIMD_4x32 (const uint32_t B[4]) | |
SIMD_4x32 (uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3) | |
void | store_be (uint8_t out[]) const |
void | store_le (uint8_t out[]) const |
Static Public Member Functions | |
static SIMD_4x32 | load_be (const void *in) |
static SIMD_4x32 | load_le (const void *in) |
static SIMD_4x32 | splat (uint32_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 58 of file simd_32.h.
Referenced by andc(), bswap(), load_be(), load_le(), operator<<(), operator>>(), operator~(), and splat().
|
inlineexplicit |
|
inline |
|
inline |
Return copy *this with each word byte swapped
Definition at line 524 of file simd_32.h.
References Botan::reverse_bytes(), rotate_left(), rotate_right(), SIMD_4x32(), and splat().
Referenced by load_be(), store_be(), and store_le().
|
inlinestatic |
Load a SIMD register with big-endian convention
Definition at line 168 of file simd_32.h.
References bswap(), Botan::bswap_4(), 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 128 of file simd_32.h.
References Botan::bswap_4(), Botan::CPUID::is_big_endian(), Botan::load_le(), and SIMD_4x32().
Referenced by load_be(), Botan::Serpent::simd_decrypt_4(), and Botan::Serpent::simd_encrypt_4().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Rotate each element of SIMD register n bits left
Definition at line 288 of file simd_32.h.
References Botan::rotate_left().
Referenced by bswap(), and rotate_right().
|
inline |
Rotate each element of SIMD register n bits right
Definition at line 315 of file simd_32.h.
References rotate_left().
Referenced by bswap().
|
inlinestatic |
Load SIMD register with one 32-bit element repeated
Definition at line 114 of file simd_32.h.
References SIMD_4x32().
Referenced by bswap().
|
inline |
Load a SIMD register with big-endian convention
Definition at line 251 of file simd_32.h.
References bswap(), Botan::copy_out_be(), Botan::CPUID::is_little_endian(), Botan::store_be(), and store_le().
Referenced by store_le().
|
inline |
Load a SIMD register with little-endian convention
Definition at line 209 of file simd_32.h.
References bswap(), Botan::copy_out_le(), Botan::CPUID::is_big_endian(), store_be(), Botan::store_be(), and Botan::store_le().
Referenced by Botan::Serpent::simd_decrypt_4(), Botan::Serpent::simd_encrypt_4(), and store_be().
|
inlinestatic |
4x4 Transposition on SIMD registers
Definition at line 564 of file simd_32.h.
Referenced by Botan::Serpent::simd_decrypt_4(), and Botan::Serpent::simd_encrypt_4().