Replies: 7 comments 25 replies
-
the both crates are used as dependencies for inside stratum/protocols/v2/noise-sv2/src/aed_cipher.rs Lines 27 to 34 in 24b8b1d I'm confused: how can |
Beta Was this translation helpful? Give feedback.
-
@Fi3, In |
Beta Was this translation helpful? Give feedback.
-
@Fi3, Can you provide more insights on this code snippet? It makes sense for
cc: @rrybarczyk @plebhash |
Beta Was this translation helpful? Give feedback.
-
@Fi3, the generatekey method in handshake.rs, in this method we are generating key pairs and checking if the parity is odd or not, and if it is then we are generating a new pair. It is a recursive call. Why are we not just negating the key, in case when the parity is not what we expect? fn generate_key() -> Keypair {
let secp = Secp256k1::new();
let (secret_key, ) = secp.generate_keypair(&mut rand::thread_rng());
let kp = Keypair::from_secret_key(&secp, &secret_key);
if kp.x_only_public_key().1 == crate::PARITY {
kp
} else {
Self::generate_key()
}
} cc: @rrybarczyk |
Beta Was this translation helpful? Give feedback.
-
what happens if we instantiate a |
Beta Was this translation helpful? Give feedback.
-
this comment is confusing: stratum/protocols/v2/noise-sv2/src/cipher_state.rs Lines 196 to 197 in 060131e if this is for internal use only, why is this function public? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
this discussion should guide the documentation of
noise_sv2
, as described on #845Beta Was this translation helpful? Give feedback.
All reactions