Skip to content

Commit

Permalink
Update src/core/primitives.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Théophile BRÉZOT <[email protected]>
  • Loading branch information
phochard and tbrezot authored Dec 4, 2024
1 parent d9ae49f commit f40be67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ pub fn decaps(
for enc in &encapsulation.encapsulations {
// The breadth-first search tries all coordinate subkeys in a chronological order.
for secret in usk.secrets.bfs() {
if let Some(S) = match_right_and_encapsulation(secret, enc, &A) {
if let Some(S) = try_decaps(secret, enc, &A) {
let (tag, ss) = j_hash(&S, &encapsulation.c, &encapsulation.encapsulations)?;
if tag == encapsulation.tag {
return Ok(Some(ss));
Expand Down

0 comments on commit f40be67

Please sign in to comment.