This commit is contained in:
scilio
2021-11-12 23:23:22 -05:00
parent 9f3a533504
commit a7c811fdd6
3 changed files with 33 additions and 6 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ fn calc_blinding_factor(shared_secret: &SharedSecret, ephemeral_pubkey: &PublicK
}
fn new_stream_cipher(shared_secret: &SharedSecret) -> Result<ChaCha20> {
let mut mu_hmac = HmacSha256::new_from_slice(b"PAYLOAD")?;
let mut mu_hmac = HmacSha256::new_from_slice(b"MWIXNET")?;
mu_hmac.update(&shared_secret[0..32]);
let mukey = mu_hmac.finalize().into_bytes();
+2
View File
@@ -163,6 +163,8 @@ mod tests {
Ok(response_str)
}
/// Single hop to demonstrate request validation and onion unwrapping.
/// UTXO creation and bulletproof generation reserved for milestones 2 & 3.
#[test]
fn swap_lifecycle() -> Result<(), Box<dyn std::error::Error>> {
let server_key = secp::insecure_rand_secret()?;