LLVM 20.0.0git
|
Go to the source code of this file.
Macros | |
#define | DEGREE 4 |
#define | _mm_shuffle_ps2(a, b, c) |
Functions | |
INLINE __m128i | loadu (const uint8_t src[16]) |
INLINE void | storeu (__m128i src, uint8_t dest[16]) |
INLINE __m128i | addv (__m128i a, __m128i b) |
INLINE __m128i | xorv (__m128i a, __m128i b) |
INLINE __m128i | set1 (uint32_t x) |
INLINE __m128i | set4 (uint32_t a, uint32_t b, uint32_t c, uint32_t d) |
INLINE __m128i | rot16 (__m128i x) |
INLINE __m128i | rot12 (__m128i x) |
INLINE __m128i | rot8 (__m128i x) |
INLINE __m128i | rot7 (__m128i x) |
INLINE void | g1 (__m128i *row0, __m128i *row1, __m128i *row2, __m128i *row3, __m128i m) |
INLINE void | g2 (__m128i *row0, __m128i *row1, __m128i *row2, __m128i *row3, __m128i m) |
INLINE void | diagonalize (__m128i *row0, __m128i *row2, __m128i *row3) |
INLINE void | undiagonalize (__m128i *row0, __m128i *row2, __m128i *row3) |
INLINE void | compress_pre (__m128i rows[4], const uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags) |
void | blake3_compress_in_place_sse41 (uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags) |
void | blake3_compress_xof_sse41 (const uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags, uint8_t out[64]) |
INLINE void | round_fn (__m128i v[16], __m128i m[16], size_t r) |
INLINE void | transpose_vecs (__m128i vecs[DEGREE]) |
INLINE void | transpose_msg_vecs (const uint8_t *const *inputs, size_t block_offset, __m128i out[16]) |
INLINE void | load_counters (uint64_t counter, bool increment_counter, __m128i *out_lo, __m128i *out_hi) |
static void | blake3_hash4_sse41 (const uint8_t *const *inputs, size_t blocks, const uint32_t key[8], uint64_t counter, bool increment_counter, uint8_t flags, uint8_t flags_start, uint8_t flags_end, uint8_t *out) |
INLINE void | hash_one_sse41 (const uint8_t *input, size_t blocks, const uint32_t key[8], uint64_t counter, uint8_t flags, uint8_t flags_start, uint8_t flags_end, uint8_t out[BLAKE3_OUT_LEN]) |
void | blake3_hash_many_sse41 (const uint8_t *const *inputs, size_t num_inputs, size_t blocks, const uint32_t key[8], uint64_t counter, bool increment_counter, uint8_t flags, uint8_t flags_start, uint8_t flags_end, uint8_t *out) |
#define _mm_shuffle_ps2 | ( | a, | |
b, | |||
c | |||
) |
Definition at line 7 of file blake3_sse41.c.
#define DEGREE 4 |
Definition at line 5 of file blake3_sse41.c.
INLINE __m128i addv | ( | __m128i | a, |
__m128i | b | ||
) |
Definition at line 19 of file blake3_sse41.c.
Referenced by g1(), g2(), and round_fn().
void blake3_compress_in_place_sse41 | ( | uint32_t | cv[8], |
const uint8_t | block[BLAKE3_BLOCK_LEN], | ||
uint8_t | block_len, | ||
uint64_t | counter, | ||
uint8_t | flags | ||
) |
Definition at line 254 of file blake3_sse41.c.
References block, compress_pre(), storeu(), and xorv().
void blake3_compress_xof_sse41 | ( | const uint32_t | cv[8], |
const uint8_t | block[BLAKE3_BLOCK_LEN], | ||
uint8_t | block_len, | ||
uint64_t | counter, | ||
uint8_t | flags, | ||
uint8_t | out[64] | ||
) |
Definition at line 264 of file blake3_sse41.c.
References block, compress_pre(), loadu(), storeu(), and xorv().
|
static |
Definition at line 454 of file blake3_sse41.c.
References BLAKE3_BLOCK_LEN, block, blocks, IV, load_counters(), round_fn(), set1(), storeu(), transpose_msg_vecs(), transpose_vecs(), and xorv().
Referenced by blake3_hash_many_sse41().
void blake3_hash_many_sse41 | ( | const uint8_t *const * | inputs, |
size_t | num_inputs, | ||
size_t | blocks, | ||
const uint32_t | key[8], | ||
uint64_t | counter, | ||
bool | increment_counter, | ||
uint8_t | flags, | ||
uint8_t | flags_start, | ||
uint8_t | flags_end, | ||
uint8_t * | out | ||
) |
Definition at line 535 of file blake3_sse41.c.
References blake3_hash4_sse41(), BLAKE3_OUT_LEN, blocks, DEGREE, and hash_one_sse41().
INLINE void compress_pre | ( | __m128i | rows[4], |
const uint32_t | cv[8], | ||
const uint8_t | block[BLAKE3_BLOCK_LEN], | ||
uint8_t | block_len, | ||
uint64_t | counter, | ||
uint8_t | flags | ||
) |
Definition at line 83 of file blake3_sse41.c.
References _mm_shuffle_ps2, block, counter_high(), counter_low(), diagonalize(), g1(), g2(), IV, loadu(), set4(), and undiagonalize().
Referenced by blake3_compress_in_place_sse41(), and blake3_compress_xof_sse41().
INLINE void diagonalize | ( | __m128i * | row0, |
__m128i * | row2, | ||
__m128i * | row3 | ||
) |
Definition at line 71 of file blake3_sse41.c.
Referenced by compress_pre().
INLINE void g1 | ( | __m128i * | row0, |
__m128i * | row1, | ||
__m128i * | row2, | ||
__m128i * | row3, | ||
__m128i | m | ||
) |
Definition at line 48 of file blake3_sse41.c.
References addv(), rot12(), rot16(), and xorv().
Referenced by compress_pre().
INLINE void g2 | ( | __m128i * | row0, |
__m128i * | row1, | ||
__m128i * | row2, | ||
__m128i * | row3, | ||
__m128i | m | ||
) |
Definition at line 58 of file blake3_sse41.c.
References addv(), rot7(), rot8(), and xorv().
Referenced by compress_pre().
INLINE void hash_one_sse41 | ( | const uint8_t * | input, |
size_t | blocks, | ||
const uint32_t | key[8], | ||
uint64_t | counter, | ||
uint8_t | flags, | ||
uint8_t | flags_start, | ||
uint8_t | flags_end, | ||
uint8_t | out[BLAKE3_OUT_LEN] | ||
) |
Definition at line 515 of file blake3_sse41.c.
References BLAKE3_BLOCK_LEN, blake3_compress_in_place_sse41, BLAKE3_KEY_LEN, BLAKE3_OUT_LEN, and blocks.
Referenced by blake3_hash_many_sse41().
INLINE void load_counters | ( | uint64_t | counter, |
bool | increment_counter, | ||
__m128i * | out_lo, | ||
__m128i * | out_hi | ||
) |
Definition at line 440 of file blake3_sse41.c.
Referenced by blake3_hash4_sse41().
Definition at line 11 of file blake3_sse41.c.
Referenced by blake3_compress_xof_sse41(), compress_pre(), and transpose_msg_vecs().
INLINE __m128i rot12 | ( | __m128i | x | ) |
Definition at line 35 of file blake3_sse41.c.
References xorv().
Referenced by g1(), and round_fn().
INLINE __m128i rot16 | ( | __m128i | x | ) |
Definition at line 30 of file blake3_sse41.c.
Referenced by g1(), and round_fn().
INLINE __m128i rot7 | ( | __m128i | x | ) |
Definition at line 44 of file blake3_sse41.c.
References xorv().
Referenced by g2(), and round_fn().
INLINE __m128i rot8 | ( | __m128i | x | ) |
Definition at line 39 of file blake3_sse41.c.
Referenced by g2(), and round_fn().
INLINE void round_fn | ( | __m128i | v[16], |
__m128i | m[16], | ||
size_t | r | ||
) |
Definition at line 276 of file blake3_sse41.c.
References addv(), MSG_SCHEDULE, rot12(), rot16(), rot7(), rot8(), and xorv().
Referenced by blake3_hash4_sse41().
Definition at line 24 of file blake3_sse41.c.
Referenced by blake3_hash4_sse41().
Definition at line 26 of file blake3_sse41.c.
Referenced by compress_pre().
INLINE void storeu | ( | __m128i | src, |
uint8_t | dest[16] | ||
) |
Definition at line 15 of file blake3_sse41.c.
Referenced by blake3_compress_in_place_sse41(), blake3_compress_xof_sse41(), and blake3_hash4_sse41().
INLINE void transpose_msg_vecs | ( | const uint8_t *const * | inputs, |
size_t | block_offset, | ||
__m128i | out[16] | ||
) |
Definition at line 413 of file blake3_sse41.c.
References loadu(), and transpose_vecs().
Referenced by blake3_hash4_sse41().
INLINE void transpose_vecs | ( | __m128i | vecs[DEGREE] | ) |
Definition at line 392 of file blake3_sse41.c.
Referenced by blake3_hash4_sse41(), and transpose_msg_vecs().
INLINE void undiagonalize | ( | __m128i * | row0, |
__m128i * | row2, | ||
__m128i * | row3 | ||
) |
Definition at line 77 of file blake3_sse41.c.
Referenced by compress_pre().
INLINE __m128i xorv | ( | __m128i | a, |
__m128i | b | ||
) |
Definition at line 22 of file blake3_sse41.c.
Referenced by blake3_compress_in_place_sse41(), blake3_compress_xof_sse41(), blake3_hash4_sse41(), g1(), g2(), rot12(), rot7(), and round_fn().