From a7e2dbecc41611fa5eeaea24849b46a57b37740a Mon Sep 17 00:00:00 2001 From: mamoniot Date: Mon, 13 Mar 2023 12:39:06 -0400 Subject: [PATCH] used cargo fmt --- zssp/src/zssp.rs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/zssp/src/zssp.rs b/zssp/src/zssp.rs index 1fb130070..dd85ac1d1 100644 --- a/zssp/src/zssp.rs +++ b/zssp/src/zssp.rs @@ -1153,12 +1153,10 @@ impl Context { let noise_se = bob_e_secret.agree(&session.static_public_key).ok_or(Error::FailedAuthentication)?; let noise_psk_se_ee_es = hmac_sha512_secret::( hmac_sha512_secret::( - hmac_sha512_secret::( - key.ratchet_key.as_bytes(), - noise_es.as_bytes(), - ).as_bytes(), + hmac_sha512_secret::(key.ratchet_key.as_bytes(), noise_es.as_bytes()).as_bytes(), noise_ee.as_bytes(), - ).as_bytes(), + ) + .as_bytes(), noise_se.as_bytes(), ); @@ -1244,7 +1242,6 @@ impl Context { let pkt: &RekeyAck = byte_array_as_proto_buffer(&pkt_assembled).unwrap(); if let Some(bob_e) = P384PublicKey::from_bytes(&pkt.bob_e) { - // Complete Noise_KKpsk0 on Alice's side. // We do not mix noise_ss for two reasons: // 1) PACKET_TYPE_REKEY_INIT does not have a payload that would require noise_ss authentication. @@ -1254,12 +1251,10 @@ impl Context { let noise_se = app.get_local_s_keypair().agree(&bob_e).ok_or(Error::FailedAuthentication)?; let noise_psk_se_ee_es = hmac_sha512_secret::( hmac_sha512_secret::( - hmac_sha512_secret::( - key.ratchet_key.as_bytes(), - noise_es.as_bytes(), - ).as_bytes(), + hmac_sha512_secret::(key.ratchet_key.as_bytes(), noise_es.as_bytes()).as_bytes(), noise_ee.as_bytes(), - ).as_bytes(), + ) + .as_bytes(), noise_se.as_bytes(), );