Skip to content

Commit

Permalink
fix: vulnerability introduced by the use of a constant Kyber coin
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrezot committed Jul 19, 2023
1 parent 45c7f87 commit a130a31
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [12.0.1] - 2023-07-19

### Changed

- patched kyber seed security issue

## [12.0.0] - 2023-07-11

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cosmian_cover_crypt"
version = "12.0.0"
version = "12.0.1"
authors = [
"Théophile Brezot <[email protected]>",
"Bruno Grieder <[email protected]>",
Expand Down
3 changes: 2 additions & 1 deletion src/core/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ pub fn encaps(
xor_in_place(&mut e_i, &seed);
if let Some(pk_i) = pk_i {
let mut epq_i = [0; KYBER_INDCPA_BYTES];
// TODO TBZ: which coin to use ?
let mut coin = Zeroizing::new([0; KYBER_SYMBYTES]);
rng.fill_bytes(&mut *coin);
indcpa_enc(&mut epq_i, &e_i, pk_i, &[0; KYBER_SYMBYTES]);
encs.insert(KeyEncapsulation::HybridEncapsulation(Box::new(epq_i)));
} else {
Expand Down

0 comments on commit a130a31

Please sign in to comment.