void GOST_Add512(void *x, void * const a, void * const b)
{
@ -775,6 +791,20 @@ void GOST_E_F0(uint64_t* const m, uint64_t *state /* out only */)
@@ -775,6 +791,20 @@ void GOST_E_F0(uint64_t* const m, uint64_t *state /* out only */)
}
}
__device__
void GOST_E_F1(uint64_t* const m, uint64_t *state /* out only */)
{
GOST_Xor512(state, m, F1); // state = m ^ F0
uint64_t state1[8];
#pragma unroll 12
for(int i=0; i<12; i++)
{
GOST_FS(state, state1);
GOST_Xor512(state, state1, CC_F1[i]);
}
}
__device__
void GOST_g_N(uint64_t* h, uint64_t* const M, uint64_t* const N)
{
@ -814,7 +844,7 @@ void GOST_g_0_0(uint64_t* h, uint64_t* const M) // input h assumed zero, for iv
@@ -814,7 +844,7 @@ void GOST_g_0_0(uint64_t* h, uint64_t* const M) // input h assumed zero, for iv
__device__
void GOST_g_0_1(uint64_t* h, uint64_t* const M) // input h assumed all bytes one, for iv 256
{
GOST_E(F1, M, h);
GOST_E_F1 (M, h);
GOST_Xor512_c(h, h, M, 0x0101010101010101); // h = h ^ M ^ 1