cryptopals

Matasano's cryptopals challenges (cryptopals.com).
Log | Files | Refs | README | LICENSE

commit 5519cc7eabdcf39a0abae1537cac3d1e2f173081
parent f0f9242019e46d4d27ae3f599320d9599a23c1e5
Author: Jared Tobin <jared@jtobin.ca>
Date:   Mon, 28 Aug 2017 18:18:02 +1200

Updates.

Diffstat:
Mdocs/s1.md | 18+++---------------
Mlib/break_single_byte_xor/src/main.rs | 2+-
2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/docs/s1.md b/docs/s1.md @@ -58,7 +58,7 @@ table of ASCII character frequencies on the interwebs; I used [this guy's](http://www.fitaly.com/board/domper3/posts/136.html). $ cat data/s1/q3_input.txt | tr -d '\n' | ./bin/break_single_byte_xor - (88, Cooking MC's like a pound of bacon) + Cooking MC's like a pound of bacon #### 1.4 @@ -69,20 +69,8 @@ w/five hits of ASCII-encoded 21. There's another input in which ']' gets five hits, but it doesn't seem to decrypt to anything. $ INPUT=7b5a4215415d544115415d5015455447414c155c46155f4058455c5b523f - $ HIGH_FREQ_BYTE=21 - $ echo $INPUT | ./bin/single_byte_xor $HIGH_FREQ_BYTE - original: 7b5a4215415d544115415d5015455447414c155c46155f4058455c5b523f - - xored with: 21 () - decrypted: nOWTHATTHEPARTYISJUMPING* - -Similar here, using 21 + 32: - - $ echo $INPUT | ./bin/single_byte_xor 53 - original: 7b5a4215415d544115415d5015455447414c155c46155f4058455c5b523f - - xored with: 53 (5) - decrypted: Now that the party is jumping + $ echo $INPUT | ./bin/break_single_byte_xor + Now that the party is jumping #### 1.5 diff --git a/lib/break_single_byte_xor/src/main.rs b/lib/break_single_byte_xor/src/main.rs @@ -195,6 +195,6 @@ fn main() { let message = break_single_byte_xor(&buffer); - println!("({}, {})", message.0, message.1); + println!("{}", message.1); }