My implementation(s) of ChessCrypt, focusing on the core S-Box generation algorithm using chess piece movements for cryptographic strength.
I've implemented ChessCrypt in Python with the following key features:
-
S-Box Generation using chess piece movements:
- Knight: Moves in L-shape pattern with cyclic wrapping
- King: Moves one step in any direction
- Bishop: Moves diagonally any number of steps
-
Core functionality:
- Configurable S-Box size (default 16x16 for 256 values)
- Random chess piece movements with cyclic wrapping
- Value swapping based on piece movements
- Substitution using the generated S-Box
-
Statistical Analysis:
- Bijectivity checking
- Basic statistical properties calculation
-
Clean, typed, and documented code following Python best practices
To use ChessCrypt, you can create an instance and generate an S-Box:
crypto = ChessCrypt()
sbox = crypto.generate_sbox()
output = crypto.substitute(input_byte)
I've loved chess since the day my dad first introduced it to me. Unfortunately, we lost him in August, 2022 to complications from cancer. So I'm dedicating the initial release to him. \m/
Banga, A., Iqbal, N., Ikram, A. et al. ChessCrypt: enhancing wireless communication security in smart cities through dynamically generated S-Box with chess-based nonlinearity. Sci Rep 14, 28205 (2024). https://doi.org/10.1038/s41598-024-77927-0