Home > Uncategorized > Day 22 — New Crypto Hash #2

Day 22 — New Crypto Hash #2

November 6th, 2020

Hey, all! Welcome to CryptoCL.

Progress on the new Cryptographic hash is slow going. I am working to try and implement the non-OpenCL implementation by Monday.

Right now, I have the substitution and permutation functions defined. The substitution function is a simple one, where you return the given unsigned char + 1 and modulate by 256.

The permutation function, however, is causing the most problems. I want to implement the BLAKE2s SIGMA variable if possible. The B2s SIGMA is a large 10×16 uint8_t variable, mapping numbers of 0 to 15 to each of the 10 rows:

static const uint8_t blake2s_sigma[10][16] =
{
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } ,
{ 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } ,
{ 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 } ,
{ 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 } ,
{ 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 } ,
{ 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 } ,
{ 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 } ,
{ 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 } ,
{ 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 } ,
{ 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0 } ,
};

However, it seems to be causing some problems — more specifically, it seems that attempts to substitute after the permutation (a test to see if the code is currently working) only spit out garbage.

I will continue to work on improving the algorithm. The hope is to have it in working order by Monday, then, OpenCL implementation is the next step. Thank you!

Kyle Jenkins.

Time spent today: 1 hour 15 minutes
Total Time: 32 hours

Categories: Uncategorized Tags: ,
Comments are closed.