summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-04-10 04:21:52 -0400
committerJesse Luehrs <doy@tozt.net>2019-04-10 04:21:52 -0400
commit36d1c3b7d72496600edeabdc50d2cd96f7b1f703 (patch)
tree4a69cb58a6f076457b7b4a2a9f89ee6cfe933a0e
parenta2f948d53fc22c3d6dd724adfee8ceb685179784 (diff)
downloadmatasano-36d1c3b7d72496600edeabdc50d2cd96f7b1f703.tar.gz
matasano-36d1c3b7d72496600edeabdc50d2cd96f7b1f703.zip
clean up timing attack server
-rw-r--r--src/bin/timing_attack.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bin/timing_attack.rs b/src/bin/timing_attack.rs
index ac9c895..b9f9b7f 100644
--- a/src/bin/timing_attack.rs
+++ b/src/bin/timing_attack.rs
@@ -8,7 +8,7 @@ struct Info {
}
fn gen_key() -> Vec<u8> {
- let mut key = [0u8; 80];
+ let mut key = [0u8; 16];
rand::thread_rng().fill_bytes(&mut key);
key.to_vec()
}
@@ -33,7 +33,6 @@ fn index(
key: &[u8],
) -> actix_web::Result<String> {
let hmac = matasano::sha1_hmac(&info.file.clone().into_bytes(), key);
- println!("hmac for {} is {}", info.file, hex::encode(hmac));
if insecure_compare(
&hex::decode(info.signature.clone()).unwrap(),
&hmac[..],