Archive

Archive for November, 2020

Day 25 — New Crypto Hash #5 (Final)

November 16th, 2020 Comments off

Hey, all! Welcome to CryptoCL.

Over the past several days, I had tried to develop the new cryptographic hash. However, with being very busy with other assignments, I was unable to get very far in my efforts. I kept getting stuck on mistakes that I think a more fresh eyes and fingers could fix much more quickly than I could.

However, that isn’t to say I’m not proud of my work. I was able to strive to develop something new — something that might have not been made before. Although I couldn’t finish, I am certain that it would help me in the long run.

With this experience nearly wrapping up, I have to present my findings in a presentation. I found that it is possible to implement OpenCL into BLAKE2, but doing so with greatly affect the performance of the hashing algorithm. Moreover, the OpenCL standard would not be fully utilized — as BLAKE 2 is sequential in nature.

By the end of the week, I will post my next, and final, post to this blog. I will discuss in greater detail my findings and thoughts on this project.

Thank you for reading!

Kyle Jenkins

Time spent today: 4 hours 30 minutes
Total Time: 40 hours 30 minutes

Categories: Uncategorized Tags: ,

Day 24 — New Crypto Hash #4

November 10th, 2020 Comments off

Hey, all! Welcome to CryptoCL.

I showed Dr. Marmorstein my cryptographic hash. It seems that the permutation step was not actually permutation, but a complicated substitution step. I have since written a simple permutation step.

When I ran the program with user input, the program would spit out undecipherable garbage. However, I was told this is a good thing, so I will keep it.

I have since begun to write a program to calculate the confusion. However, given how I’m writing it, it would seem I would need to do a complete overhaul of my program in order to do this. I am not looking forward to this, and it feels like a lot and I’m not sure where to go with it.

I will keep trying, but if I can’t make a successful breakthrough by the weekend, I am most likely just try and implement the program using the OpenCL standard, so that I have at least a working OpenCL program.

Kyle Jenkins.

Time spent today: 2 hours 30 minutes
Total Time: 36 hours

Categories: Uncategorized Tags: ,

Day 23 — New Crypto Hash #3

November 8th, 2020 Comments off

Hey, all! Welcome to CryptoCL.

The cryptographic hash algorithm is complete. It’s not the best or most secure, but the input is being successfully encrypted.

I changed my permutation algorithm to check the substituted number. If the number is between 64 and 91 (A-Z in ASCII), then the value of the unsigned int pointer n at i will be changed to the BLAKE2s SIGMA value at row i mod 10, and column of the value of the unsigned int pointer o mod 16 + 64. This plus 64 will help the new value of n at i to be at least A. Otherwise, it’s the same value of BLAKE2s SIGMA, but with an addition 96.

The program now splits the message into 16 byte blocks, substitutes each individual byte, permutes each byte, and substitutes again, and repeats until finally printing out the result.

One issue that arises of the algorithm security-wise is that, when the remaining bytes are zeroed out, and whenever you run the program with zeroed out bytes, you will easily be able to see which bytes are zeroes. There’s a specific pattern that appears regardless of the message at the end of the last 16 byte block with zeroes.

However, I am quite proud of my algorithm. Although it’s not the best, the letters are changed depending on their location, which means it will be difficult to crack in a marginally short amount of time, at least by hand.

Tomorrow, I am speaking with Dr. Marmorstein to discuss incorporating OpenCL into the algorithm. I feel pretty good about this!

Until next time!

Kyle Jenkins

Time spent today: 1 hour 30 minutes
Total Time: 33 hours 30 minutes

Categories: Uncategorized Tags: ,

Day 22 — New Crypto Hash #2

November 6th, 2020 Comments off

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: ,

Day 21 — New Crypto Hash #1

November 1st, 2020 Comments off

Hey, all! Welcome to CryptoCL — and I hope you had a Happy Halloween!

Today, I began implementing our own Cryptographic Hash. The goal it take a given message, split it into 16 bytes (and adding filler to the remainder bytes to make it size 16), and split it further into 1 byte blocks. We then take the 1 byte blocks and perform a substitution and permutation equation onto it. Next, we combine the 1-byte block with the next 1-byte block, so we have all 2-byte blocks, and perform another substitution along with transposition function. We continue this by combining into 4, 8, and then back to 16. Once we’re back to 16-byte blocks, we’ll XOR this block with the next block, and repeat until we reach the end of the message.

At the moment, I have a simple implementation of the basic algorithm. There is no substitution, permutation, or transposition algorithms yet — that will come later. There is also no OpenCL code yet, as I wanted to get the basic algorithm finished before I started using the OpenCL standard.

Next time, I have a meeting with Dr. Marmorstein, and we will most likely discuss how to improve the code and how to make the functions unique.

Until next time!

Kyle Jenkins

Time spent today: 1 hour 15 minutes
Total Time: 30 hours 45 minutes

Categories: Uncategorized Tags: ,