Archive

Archive for the ‘Uncategorized’ Category

Day 5 — Tutorial #1 Complete and Research Findings

September 6th, 2020 1 comment

Hi, all. Welcome back to ICOC.

Today was a somewhat slow day. I decided to do a little bit of work towards the project, but not much — mostly some research.

However, Dr. Marmorstein contacted me about the driver update, and while the drivers were finished with the update, the error that was causing the Erik Smistad tutorial to fail was not an issue with the driver, but a bug in the program. The output vector, C, was accidentally given the const prefix. After that was fixed, the program ran correctly. Every print out of the program, where each element of A at i was incrementing by 1 from 0 until 1024, and every element of B at i was decrementing by 1 from 1024 until 0, equated to 1024.

I had begun looking into the other tutorial from Rob Farber, when Dr. Marmorstein shared with me a GitHub repository from a user whr, entitled “clblake.” It appears to be a very similar project to the one being conducted here, except rather than using BLAKE2, whr chose to use BLAKE256, instead. Regardless, given how closely the project resembles ours, we’re adding whr’s clblake repository as a “Previous Work” credit.

That was everything done today. Again, a shorter day, but next time, I will be implementing the Rob Farber tutorial as my second and final tutorial. Then, it’s time to start with the real project!

Thank you, and see you next time!

Kyle Jenkins.

Time spent today: 1 hour
Total Time: 5 hours

Day 4 — Tutorial and Driver Update

September 5th, 2020 Comments off

Hi, all, welcome back to ICOC.

On the agenda today was scouring the web for tutorials to get familiarized with the OpenCL standard, and so far, I’ve found two tutorials that I want to try. One tutorial was written by a members of the Khronos Group, Rob Farber (which we’ll talk about later, but here’s a link now.), while the other was written by Erik Smistad.

The first tutorial I decided to implement was the one written by Erik Smistad, titled “Getting started with OpenGL and GPU computing.” This was an example that Dr. Marmorstein highlighted as we were forming the research project. The tutorial aims to add vectors contents together. While this can be done easily with a simple for loop, Smistad chooses to implement it using the OpenCL standard to allow for GPU computing. This will decrease the time it takes to compute the vector addition from linear, or O(n) with n being the size of the vectors, to relying on the number of cores in the processor instead, which can speed up the computation time.

Following Smistad’s guide, I was able to replicate this vectorAddition program, having created a main program and a kernel program to which the computation would occur in the GPU. The only issues that needed to be addressed were the facts that the OpenCL function “clCreateCommandQueue” is deprecated, and needed to be replaced with “clCreateCommandQueueWithProperties”, and the fact that the lab system I was using did not have an updated driver. Dr. Marmorstein is updating the drivers in all of the lab systems, which should fix that problem. Thankfully, one of the lab systems had the driver partially installed, so a remote login allowed me to compile the program.

Running the program, another problem appeared — when the program runs, the program will print out the given item at i in both vectors A and B, add them together, and print the result C in one line. However, all of the additions are wrong. They are either zero, or a ridiculously high number. At the moment, this does not appear to be user error, as Dr. Marmorstein was able to confirm the error, as well. Here’s hoping that the driver update will help this error somewhat…

That being said, that is all of the progress today. Tomorrow will be a day to work on more research and make sure that this tutorial is completed successfully.

Thank you, and see you next time!

Kyle Jenkins.

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

Day 3 — Set Up Complete

September 3rd, 2020 1 comment

Hi, all. Welcome back to ICOC.

Today was the day I worked to try and identify and solve why some of the tests for the header files of OpenCL failed to work. After digging through the files, the error was simply that I was not compiling the files correctly.

In retrospect, compiling every file individually and running these files to see if they passed was not a good choice. I went to Dr. Robert Marmorstein for advice, as I initially thought that it was simply an error on my end — either my system was not equipped with the necessary files, or I was not compiling correctly. It seems that the latter was correct, and with the cmake command, I was able to compile and successfully run each and every test header file.

Now that the header files are complete, next time will be devoted to making sure all of the necessary OpenCL files are ready to go, and if they are, search online for OpenCL tutorials to become familiar with the standard!

See you next time!

Sincerely,
Kyle Jenkins.

Time spent today: 1 hour 15 minutes.
Total Time: 2 hours 45 minutes.

Categories: Uncategorized Tags: ,

Day 2 — Set Up

September 1st, 2020 1 comment

Hello, all.

Today, I began setting up my system to be compatible for OpenCL.

I was having a bit of trouble finding materials and guides online, as results online did not paint a clear picture on where to find the necessary programs I needed. I wanted to find a Windows version, in case working on this project from a Linux system was impossible.

In my research, I managed to find the OpenCL repository from The Khronos Group on GitHub. I lifted the OpenCL-CCX and OpenCL-Headers repositories and migrated them to the Linux system. The Headers repository, in particular, has a directory filled with tests, that are designed to test the OpenCL header files so that they are working as intended. When running all the tests, all but four passed correctly. Three of them, unfortunately, did not compile correctly, while one of them ran successfully but did not pass.

Next time, I will continue to set up OpenCL on the system, with the main goal of the header tests working. Until then, see you next time!

Sincerely,
Kyle Jenkins.

Time spent today: 1 hour 30 minutes.
Total Time: 1 hour 30 minutes.

Categories: Uncategorized Tags: ,

Day 1 — Introduction and Goals

August 31st, 2020 1 comment

Hello, and again, welcome to Implementing Cryptography with OpenCL, or ICOC for short!

I am Kyle Jenkins, and I am tackling this project to gain more experience in programming in the graphical interface. The goal of the project is to implement a cryptographic hash in a graphic environment, rather than in the CPU, in order to encrypt and decrypt values. To do this, I will be using OpenCL and using the BLAKE2 hash function.

Open Computing Language, or OpenCL, is an open-source standard that allows for parallel and cross-platform programming. This standard will allow for a connection between the CPU and the graphical environments. This will be necessary to activate the cryptographic hash function that will be processed within the graphics card.

BLAKE2 is a cryptographic hash function that is at least as secure as and faster than SHA-3, another cryptographic hash function. It is also one of the hashing components of Wireguard, a VPN service. The BLAKE2 function will be implemented so that it will be processed using OpenCL in the graphics card.

The final goal is to be able to accurately write a complete algorithm that will hash values using the BLAKE2 function through the graphics card, using OpenCL as the parallel programming standard, and encrypt/decrypt the input into an output. The algorithm would first begin on the CPU with an input of the values to encrypt or decrypt. Then, the algorithm would call functions written to be processed within the graphical environment and create a BLAKE2 hash. Finally, the graphical environment would take the input and, using the hash, encrypt or decrypt the input and return the results as the output, back onto the CPU.

This blog will be where I post my progress as I research and develop this algorithm. Here, I will post results of my research, studies, and progress toward the algorithm. You can expect at the very least two posts during the business week and one post during the weekend!

Thank you for your interest in my project!

Sincerely,
Kyle Jenkins.

Implementing CryptoSystems using OpenCL

August 31st, 2020 Comments off

In this project, we will look at ways to implement Cryptographic hashing using the OpenCL graphics library.  While “fast hashing” is considered bad for algorithms that use hashes to store passwords, it can be good for cryptographic hashes used to verify file integrity.

Most cryptographic hashing algorithms are intended to be performed sequentially to maximize confusion and diffusion of information, but for some applications, algorithms can be modified to use multiple cores, including multiple GPU cores.

This semester, we will explore whether we can parallelize existing cryptographic hashing algorithms, such as Blake2, and then think about ways in which novel cryptographic algorithms can take advantage of GPU processing.

Categories: Uncategorized Tags:

Hello, World! Welcome to ICOC!

August 31st, 2020 Comments off

Welcome to Implementing Cryptography with OpenCL!

The goal for this blog is to report progress towards the project of implementing cryptographic encryption and decryption through the graphics card, instead of the CPU.

This is just a test post to get comfortable with the blog. More, and detailed, information will be shared later today.

I hope you enjoy what’s in store!

Sincerely,
Kyle Jenkins.

Categories: Uncategorized Tags: