mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-22 14:23:59 -07:00
used cargo fmt
This commit is contained in:
parent
16c35a5d07
commit
a7e2dbecc4
1 changed files with 6 additions and 11 deletions
|
@ -1153,12 +1153,10 @@ impl<Application: ApplicationLayer> Context<Application> {
|
||||||
let noise_se = bob_e_secret.agree(&session.static_public_key).ok_or(Error::FailedAuthentication)?;
|
let noise_se = bob_e_secret.agree(&session.static_public_key).ok_or(Error::FailedAuthentication)?;
|
||||||
let noise_psk_se_ee_es = hmac_sha512_secret::<BASE_KEY_SIZE>(
|
let noise_psk_se_ee_es = hmac_sha512_secret::<BASE_KEY_SIZE>(
|
||||||
hmac_sha512_secret::<BASE_KEY_SIZE>(
|
hmac_sha512_secret::<BASE_KEY_SIZE>(
|
||||||
hmac_sha512_secret::<BASE_KEY_SIZE>(
|
hmac_sha512_secret::<BASE_KEY_SIZE>(key.ratchet_key.as_bytes(), noise_es.as_bytes()).as_bytes(),
|
||||||
key.ratchet_key.as_bytes(),
|
|
||||||
noise_es.as_bytes(),
|
|
||||||
).as_bytes(),
|
|
||||||
noise_ee.as_bytes(),
|
noise_ee.as_bytes(),
|
||||||
).as_bytes(),
|
)
|
||||||
|
.as_bytes(),
|
||||||
noise_se.as_bytes(),
|
noise_se.as_bytes(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1244,7 +1242,6 @@ impl<Application: ApplicationLayer> Context<Application> {
|
||||||
|
|
||||||
let pkt: &RekeyAck = byte_array_as_proto_buffer(&pkt_assembled).unwrap();
|
let pkt: &RekeyAck = byte_array_as_proto_buffer(&pkt_assembled).unwrap();
|
||||||
if let Some(bob_e) = P384PublicKey::from_bytes(&pkt.bob_e) {
|
if let Some(bob_e) = P384PublicKey::from_bytes(&pkt.bob_e) {
|
||||||
|
|
||||||
// Complete Noise_KKpsk0 on Alice's side.
|
// Complete Noise_KKpsk0 on Alice's side.
|
||||||
// We do not mix noise_ss for two reasons:
|
// 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.
|
// 1) PACKET_TYPE_REKEY_INIT does not have a payload that would require noise_ss authentication.
|
||||||
|
@ -1254,12 +1251,10 @@ impl<Application: ApplicationLayer> Context<Application> {
|
||||||
let noise_se = app.get_local_s_keypair().agree(&bob_e).ok_or(Error::FailedAuthentication)?;
|
let noise_se = app.get_local_s_keypair().agree(&bob_e).ok_or(Error::FailedAuthentication)?;
|
||||||
let noise_psk_se_ee_es = hmac_sha512_secret::<BASE_KEY_SIZE>(
|
let noise_psk_se_ee_es = hmac_sha512_secret::<BASE_KEY_SIZE>(
|
||||||
hmac_sha512_secret::<BASE_KEY_SIZE>(
|
hmac_sha512_secret::<BASE_KEY_SIZE>(
|
||||||
hmac_sha512_secret::<BASE_KEY_SIZE>(
|
hmac_sha512_secret::<BASE_KEY_SIZE>(key.ratchet_key.as_bytes(), noise_es.as_bytes()).as_bytes(),
|
||||||
key.ratchet_key.as_bytes(),
|
|
||||||
noise_es.as_bytes(),
|
|
||||||
).as_bytes(),
|
|
||||||
noise_ee.as_bytes(),
|
noise_ee.as_bytes(),
|
||||||
).as_bytes(),
|
)
|
||||||
|
.as_bytes(),
|
||||||
noise_se.as_bytes(),
|
noise_se.as_bytes(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue