Skip to content

A GPU accelerated implementation of SHA512 using the SYCL standard

Notifications You must be signed in to change notification settings

tomatih/SYCL_SHA512

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SYCL SHA-512 hashing

Background

This project was originally a part of a university assessment for the CS4097 Security course at the University of Aberdeen. The goal of that assessment was accelerating dictionary cracking of password hashes created using the SHA-512 hashing algorithm.

Building

Dependencies

* To run on Nvidia or AMD GPUS an open source plugin by Codeplay® is needed

Generating Build files

The project uses CMake for build file generation as such the files can be generated by running: cmake -Bbuild -H. -DCMAKE_CXX_COMPILER=<Compiler> -D <Vendor name>_GPU=ON

Where:

  • <Compiler> is a valid Intel SYCL compiler (clang or icpx)
  • <Vendor name> is a valid GPU vendor (NVIDIA, AMD or INTEL)(not mutually exclusive)

Important

If the chosen vendors include NVIDIA and/or AMD the target architectures can be specified via -D NVIDIA_ARCH=<Architecture> and/or -D AMD_ARCH=<Architecture>

Caution

Due to personal access to hardware only the NVIDIA sm_86 option has been tested

For troubleshooting/compatibility 2 more CMake options are available CHECK_CORRECTNESS and USE_GPU. Both of them are booleans set to true by default. Toggling the first one disables OpenSSL dependency. Toggling the second one disables GPU acceleration and forces a CPU fallback.

Building and Running

After the build files have been generated the project can be built using: cmake --build build --target all

After building the program can be run, by executing the GPU_SHA512 executable to see available modes and required arguments.

Performance results

As part of the assessment the GPU vs CPU performance has been compared for increasing dictionary lengths. The data for the comparison was generated using a system equipped with: AMD Ryzen 7 2700, 16 GB of RAM and an NVIDIA GeForce RTX 3060 Ti Lite Hash Rate. The resulting data is visible in the plot below

performance_plot

Known Limitations

  • Hashing payload is limited to strings with maximum length of 111
  • There is no input paging. As such the program will try to upload the whole input file to VRAM
  • There was no exploration of better work group sizing, and the program relies on default splitting

About

A GPU accelerated implementation of SHA512 using the SYCL standard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published