CryptoSideChannel.jl
: A customizable side-channel modelling and analysis framework in Julia
CryptoSideChannel
— ModuleThe CryptoSideChannel
library focuses on generic side-channel analysis of cryptographic algorithms. The implementation uses custom types that behave like integers. However, those types may additionally log their values, or mask the internal representation of their values. In combination, this allows for easy recording of masked-and unmasked side-channels for educational and testing purposes. See the chapter on Custom Types for more information about this part.
Furthermore, this library implements two ciphers, namely the Advanced Encryption Standard (AES) and SPECK. More information can be found in the Ciphers chapter of the documentation.
Lastly, this project implements several attacks against the recorded traces. See the chapter on Attacks for more details.
Ciphers
Currently, two ciphers are implemented: The SPECK cipher, and the AES cipher suite.
CryptoSideChannel.AES
— ModuleThis module provides an implementation of the AES algorithm.
Further documentation can be found at AES.
CryptoSideChannel.SPECK
— ModuleThis module implements the SPECK cipher.
More documentation can be found in the chapter SPECK.
Custom Types
This package currently provides two classes of additional types that mimic integers.
See the Integer Types page for a more detailed explanation on how to declare custom integer types.
- The
GenericLog
type allows for recording traces of program executions. - The
Masked
type internally splits its value into two shares. Thus, the content of aMasked
integer should never be observable in memory.
CryptoSideChannel.Logging
— ModuleThe Logging module allows for recording traces of program executions. This module provides the type GenericLog
, which can be substituted for an integer. With this type, arithmetic operations, as well as certain memory operations will be logged to a trace array.
Further documentation is available at Logging.
CryptoSideChannel.Masking
— ModuleThe Masking module provides integer types that mask values. Hence, those values do never occur in memory while operations on it are performed. This makes side-channel attacks more difficult.
Further documentation is available at Masking.
Attacks
Multiple side-channel attacks against the ciphers above have been implemented:
- DPA
- CPA
- Template Attacks
CryptoSideChannel.DPA
— ModuleThe DPA module implements generic Differential Power Attacks. The implementation largely follows the one described by Kocher in this paper, but is generalized to support other cryptographic algorithms.
A detailed documentation can be found at DPA
CryptoSideChannel.CPA
— ModuleThe CPA module implements generic Correlation Power Attacks.
More documentation is available at CPA
CryptoSideChannel.TemplateAttacks
— ModuleThis module implements Template attacks on cryptographic side channels.
More information can be found at Template attacks