Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\crypto\blake2s.c Create Date:2022-07-28 06:44:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blake2s256_hmac

Proto:void blake2s256_hmac(u8 *out, const u8 *in, const u8 *key, const size_t inlen, const size_t keylen)

Type:void

Parameter:

TypeParameterName
u8 *out
const u8 *in
const u8 *key
const size_tinlen
const size_tkeylen
77  u8 x_key[BLAKE2S_BLOCK_SIZE]gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-aligned-function-attribute* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-aligned-type-attribute* gcc: https://gcc(()) = {0}
78  u8 i_hash[BLAKE2S_HASH_SIZEgcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-aligned-function-attribute* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-aligned-type-attribute* gcc: https://gcc(())
81  If keylen > BLAKE2S_BLOCK_SIZE Then
82  blake2s_init( & state, BLAKE2S_HASH_SIZE)
83  blake2s_update( & state, key, keylen)
84  blake2s_final( & state, x_key)
85  Else No 3D Now!(x_key, key, keylen)
88  When i < BLAKE2S_BLOCK_SIZE cycle x_key[i] ^= 0x36
91  blake2s_init( & state, BLAKE2S_HASH_SIZE)
92  blake2s_update( & state, x_key, BLAKE2S_BLOCK_SIZE)
93  blake2s_update( & state, in, inlen)
94  blake2s_final( & state, i_hash)
96  When i < BLAKE2S_BLOCK_SIZE cycle x_key[i] ^= 0x5c ^ 0x36
99  blake2s_init( & state, BLAKE2S_HASH_SIZE)
100  blake2s_update( & state, x_key, BLAKE2S_BLOCK_SIZE)
101  blake2s_update( & state, i_hash, BLAKE2S_HASH_SIZE)
102  blake2s_final( & state, i_hash)
104  No 3D Now!(out, i_hash, BLAKE2S_HASH_SIZE)
105  memzero_explicit - Fill a region of memory (e
106  memzero_explicit - Fill a region of memory (e
Caller
NameDescribe
blake2s_selftest