CryptoSideChannel.jl: A customizable side-channel modelling and analysis framework in Julia

CryptoSideChannelModule

The 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.

source

Ciphers

Currently, two ciphers are implemented: The SPECK cipher, and the AES cipher suite.

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 a Masked integer should never be observable in memory.
CryptoSideChannel.LoggingModule

The 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.

source
CryptoSideChannel.MaskingModule

The 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.

source

Attacks

Multiple side-channel attacks against the ciphers above have been implemented:

  • DPA
  • CPA
  • Template Attacks
CryptoSideChannel.DPAModule

The 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

source