Commit d043fd6
fix(ext/node): use constant-time comparison for secret key equality (#32994)
## Summary
- `KeyObjectHandle::Secret` `PartialEq` impl used standard `==` for byte
slice comparison, which short-circuits on first mismatch
- Switched to `subtle::ConstantTimeEq` (`ct_eq`) to prevent potential
timing side-channels when comparing secret keys via `key.equals()`
- The `subtle` crate was already a dependency of `deno_node_crypto`
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 6a66ea5 commit d043fd6
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
| |||
0 commit comments