Solving the Cryptopals.com challenges
implemented in lib.rs as functions (with tests)
cargo run --bin detect_singlechar_xor < res/s1c4.txt
cargo run --bin xor_encrypt ICE < res/s1c5.txt
cargo run --release --bin find_xor_key 30 < res/s1c6.txt
cargo run --release --bin decrypt_aes_ecb "YELLOW SUBMARINE" < res/s1c7.txt
cargo run --release --bin detect_ecb_mode < res/s1c8.txt
created into block_ciphers.rs
cargo run --bin decrypt_aes_cbc "YELLOW SUBMARINE" < res/s2c10.txt
cargo run --bin oracle_cbc_ecb
cargo run --release --bin break_ecb_byte_simple < res/s2c12.txt
cargo run --bin ecb_cut_and_paste
cargo run --release --bin break_ecb_byte_harder < res/s2c12.txt
cargo run --bin cbc_bitflipping
cargo run --bin cbc_padding_oracle < res/s3c17.txt
created into block_ciphers.rs
cargo run --bin break_ctr_dumb < res/s3c19.txt
cargo run --bin break_ctr_smart < res/s3c20.txt
implemented into lib under mt19937.rs
cargo run --release --bin s3c22_mt19937_wait_crack
cargo run --release --bin s3c23_clone_mt19937
cargo run --release --bin s3c24_mt19937_cipher
cargo run --release --bin s4c25_aes_ctr_random_rw_break < res/s4c25.txt
cargo run --release --bin s4c26_ctr_bitflipping
cargo run --release --bin s4c27_cbc_break_key_as_iv
I created a new method "new_with_state" in sha1.rs
cargo run --release --bin s4c29_sha1_keyed_mac_break
cargo run --release --bin s4c30_md4_keyed_mac_break
This solution does backtracking and multiple tries per byte.
I can brute-force HMAC's with 1ms delay on localhost. Didn't try lower.
cargo run --bin s4c31_sha1_keyed_mac_timing_break
cargo run --bin s5c33_impl_diffie_hellman
cargo run --bin s5c34_dh_key_fixing_mitm
cargo run --bin s5c35_dh_negotiated_groups_mitm
New library file srp.rs
cargo run --bin s5c36_srp_client_server
cargo run --bin s5c37_srp_zero_key_break
cargo run --bin s5c38_weakened_srp_offline_attack
cargo run --bin s5c40_rsa_e3_broadcast_attack
cargo run --bin s6c41_rsa_unpadded_oracle
cargo run --bin s6c42_rsa_bleichenbacher_signature_forge
cargo run --release --bin s6c43_dsa_nonce_key_discovery
cargo run --bin s6c44_dsa_repeated_nonce_key_discovery
cargo run --bin s6c45_dsa_parameter_tampering
cargo run --release --bin s6c46_rsa_parity_oracle
Task 47 uses 256 bit n, 48 uses 768 bit n. It's 2020, let's go with 1024 bit n.
cargo run --release --bin s6c47_rsa_bleichenbacher_padding_oracle
cargo run --bin s7c49_cbc_mac_message_forgery
cargo run --bin s7c50_cbc_mac_hashing
cargo run --release --bin s7c51_compression_ratio_sidechannel
cargo run --release --bin s7c52_iterated_hash_fn_collisions
cargo run --release --bin s7c53_expandable_messages
cargo run --release --bin s7c54_nostradamus_attack
TODO: Skipped
cargo run --release --bin s7c56_rc4_single_byte_biases