Skip to content

Commit

Permalink
test: check decryption of null diversifier produces 0 account
Browse files Browse the repository at this point in the history
  • Loading branch information
redshiftzero committed Dec 10, 2024
1 parent 9461de8 commit 8a33f27
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/core/keys/src/keys/diversifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,4 +304,15 @@ mod tests {
assert_eq!(index2, index);
}
}

proptest! {
#[test]
fn diversifier_encryption_null_ciphertext(
key in diversifier_key_strategy()
) {
let diversifier = Diversifier([0; 16]);
let index = key.index_for_diversifier(&diversifier);
assert_eq!(index, AddressIndex::new(0));
}
}
}

0 comments on commit 8a33f27

Please sign in to comment.