linear_cryptanalysis

simple linear cryptanalysis attack on an spn
git clone git://git.superpozycja.net/linear_cryptanalysis
Log | Files | Refs | README

commit 7b291d89e28a5f3e1fcd16e06d0f02a712b761b4
parent d48a1779fe833642f0549adcfe3b243bbb05cd75
Author: superpozycja <anna@superpozycja.net>
Date:   Thu, 12 Sep 2024 19:50:25 +0200

fix up main

Diffstat:
Msrc/main.rs | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -1,7 +1,8 @@ use linear_cryptanalysis as la; fn main() { - println!("Hello, world!"); - let ct = la::encrypt(b"ab", b"xy"); - println!("ciphertext = {:#04x}{:02x}", ct[0], ct[1]) + let pt = [0b0010_0110, 0b1011_0111]; + let key = [0b0011_1010, 0b1001_0100, 0b1101_0110, 0b0011_1111]; + let ct = la::encrypt(&pt, &key); + la::print_block(&ct); }