CrypTool Book

Chapter 14: CUDA Tutorial – Cryptanalysis of Classical Ciphers Using Modern GPUs and CUDA, April 2021

This 90-page chapter covers a practical introduction how to write CUDA programs on Linux and Windows. It explains what are the concepts, how to overcome problems (threads, shared memory, debugging) and how to deal with trade-offs. The theory is accompanied with practical examples, and two complete stand-alone GPU tools for automatically decrypting ciphertexts (ciphertext-only attack) are implemented. These tools target ciphertexts encrypted by monoalphabetic substitution (MAS) or by single-columnar transposition ciphers.

The additional appendices will be published here soon. They contain e.g. a list of movies and novels where cryptography plays a role. The appendices also offers a quick overview about the cryptographic functions delivered by the different CrypTool variants.

For many algorithms there are small and executable code samples in Python, SageMath, OpenSSL, or they are further explained with one of the CrypTool variants. You can download the SageMath scripts here. You can download the OpenSSL scripts here.

SageTeX and PythonTeX were used to create the CrypTool book. SageTeX is briefly described in the CTB appendix about SageMath. For PythonTeX we have described our experiences with many examples in the document PythonTex-by-Examples.pdf (about 60 pages). Both tools can be used to nicely automate calculations in LaTeX documents.