|
@@ -22,22 +22,19 @@ enum blake2s_constant {
|
|
BLAKE2S_PERSONALBYTES = 8
|
|
BLAKE2S_PERSONALBYTES = 8
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
struct blake2s_param {
|
|
struct blake2s_param {
|
|
- unsigned char digest_length;
|
|
|
|
- unsigned char key_length;
|
|
|
|
- unsigned char fanout;
|
|
|
|
- unsigned char depth;
|
|
|
|
- ulong32 leaf_length;
|
|
|
|
- unsigned char node_offset[6];
|
|
|
|
- unsigned char node_depth;
|
|
|
|
- unsigned char inner_length;
|
|
|
|
- unsigned char salt[BLAKE2S_SALTBYTES];
|
|
|
|
- unsigned char personal[BLAKE2S_PERSONALBYTES];
|
|
|
|
|
|
+ unsigned char digest_length;
|
|
|
|
+ unsigned char key_length;
|
|
|
|
+ unsigned char fanout;
|
|
|
|
+ unsigned char depth;
|
|
|
|
+ ulong32 leaf_length;
|
|
|
|
+ unsigned char node_offset[6];
|
|
|
|
+ unsigned char node_depth;
|
|
|
|
+ unsigned char inner_length;
|
|
|
|
+ unsigned char salt[BLAKE2S_SALTBYTES];
|
|
|
|
+ unsigned char personal[BLAKE2S_PERSONALBYTES];
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
const struct ltc_hash_descriptor blake2s_256_desc =
|
|
const struct ltc_hash_descriptor blake2s_256_desc =
|
|
{
|
|
{
|
|
"blake2s_256",
|
|
"blake2s_256",
|
|
@@ -53,7 +50,6 @@ const struct ltc_hash_descriptor blake2s_256_desc =
|
|
NULL
|
|
NULL
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
const struct ltc_hash_descriptor blake2s_224_desc =
|
|
const struct ltc_hash_descriptor blake2s_224_desc =
|
|
{
|
|
{
|
|
"blake2s_224",
|
|
"blake2s_224",
|
|
@@ -84,7 +80,6 @@ const struct ltc_hash_descriptor blake2s_160_desc =
|
|
NULL
|
|
NULL
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
const struct ltc_hash_descriptor blake2s_128_desc =
|
|
const struct ltc_hash_descriptor blake2s_128_desc =
|
|
{
|
|
{
|
|
"blake2s_128",
|
|
"blake2s_128",
|
|
@@ -100,8 +95,6 @@ const struct ltc_hash_descriptor blake2s_128_desc =
|
|
NULL
|
|
NULL
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
static const ulong32 blake2s_IV[8] = {
|
|
static const ulong32 blake2s_IV[8] = {
|
|
0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL,
|
|
0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL,
|
|
0x510E527FUL, 0x9B05688CUL, 0x1F83D9ABUL, 0x5BE0CD19UL
|
|
0x510E527FUL, 0x9B05688CUL, 0x1F83D9ABUL, 0x5BE0CD19UL
|