Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 74 additions & 67 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions dhkem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ keywords = ["crypto", "ecdh", "ecc"]
readme = "README.md"

[dependencies]
hkdf = "0.13.0-rc.4"
kem = "0.3.0-rc.3"
rand_core = "0.10.0-rc-6"
hkdf = "0.13.0-rc.5"
kem = "0.3.0-rc.4"
rand_core = "0.10"

# optional dependencies
elliptic-curve = { version = "0.14.0-rc.25", optional = true, default-features = false }
k256 = { version = "0.14.0-rc.6", optional = true, default-features = false, features = ["arithmetic"] }
p256 = { version = "0.14.0-rc.6", optional = true, default-features = false, features = ["arithmetic"] }
p384 = { version = "0.14.0-rc.6", optional = true, default-features = false, features = ["arithmetic"] }
p521 = { version = "0.14.0-rc.6", optional = true, default-features = false, features = ["arithmetic"] }
elliptic-curve = { version = "0.14.0-rc.28", optional = true, default-features = false }
k256 = { version = "0.14.0-rc.7", optional = true, default-features = false, features = ["arithmetic"] }
p256 = { version = "0.14.0-rc.7", optional = true, default-features = false, features = ["arithmetic"] }
p384 = { version = "0.14.0-rc.7", optional = true, default-features = false, features = ["arithmetic"] }
p521 = { version = "0.14.0-rc.7", optional = true, default-features = false, features = ["arithmetic"] }
x25519 = { version = "=3.0.0-pre.5", package = "x25519-dalek", optional = true, default-features = false }
zeroize = { version = "1.8.1", optional = true, default-features = false }

[dev-dependencies]
getrandom = { version = "0.4.0-rc.1", features = ["sys_rng"] }
getrandom = { version = "0.4", features = ["sys_rng"] }
hex-literal = "1"
hkdf = "0.13.0-rc.4"
sha2 = "0.11.0-rc.4"
hkdf = "0.13.0-rc.5"
sha2 = "0.11.0-rc.5"

[features]
default = ["zeroize"]
Expand Down
12 changes: 5 additions & 7 deletions dhkem/src/ecdh_kem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ use core::marker::PhantomData;
use elliptic_curve::{
AffinePoint, CurveArithmetic, Error, FieldBytes, FieldBytesSize, PublicKey, SecretKey,
ecdh::EphemeralSecret,
sec1::{
FromEncodedPoint, ModulusSize, ToEncodedPoint, UncompressedPoint, UncompressedPointSize,
},
sec1::{FromSec1Point, ModulusSize, ToSec1Point, UncompressedPoint, UncompressedPointSize},
};
use kem::{
Ciphertext, Encapsulate, Generate, InvalidKey, Kem, KeyExport, KeySizeUser, SharedKey,
Expand Down Expand Up @@ -109,7 +107,7 @@ impl<C> TryDecapsulate<EcdhKem<C>> for EcdhDecapsulationKey<C>
where
C: CurveArithmetic,
FieldBytesSize<C>: ModulusSize,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
AffinePoint<C>: FromSec1Point<C> + ToSec1Point<C>,
{
type Error = Error;

Expand Down Expand Up @@ -154,7 +152,7 @@ impl<C> TryKeyInit for EcdhEncapsulationKey<C>
where
C: CurveArithmetic,
FieldBytesSize<C>: ModulusSize,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
AffinePoint<C>: FromSec1Point<C> + ToSec1Point<C>,
{
fn new(encapsulation_key: &UncompressedPoint<C>) -> Result<Self, InvalidKey> {
PublicKey::<C>::from_sec1_bytes(encapsulation_key)
Expand All @@ -175,7 +173,7 @@ impl<C> KeyExport for EcdhEncapsulationKey<C>
where
C: CurveArithmetic,
FieldBytesSize<C>: ModulusSize,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
AffinePoint<C>: FromSec1Point<C> + ToSec1Point<C>,
{
fn to_bytes(&self) -> UncompressedPoint<C> {
self.0.to_uncompressed_point()
Expand All @@ -195,7 +193,7 @@ impl<C> Encapsulate<EcdhKem<C>> for EcdhEncapsulationKey<C>
where
C: CurveArithmetic,
FieldBytesSize<C>: ModulusSize,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
AffinePoint<C>: FromSec1Point<C> + ToSec1Point<C>,
{
fn encapsulate_with_rng<R>(
&self,
Expand Down
18 changes: 9 additions & 9 deletions dhkem/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub use x25519_kem::{X25519DecapsulationKey, X25519EncapsulationKey, X25519Kem};
#[cfg(feature = "ecdh")]
use elliptic_curve::{
CurveArithmetic, PublicKey, bigint,
sec1::{self, FromEncodedPoint, ToEncodedPoint},
sec1::{self, FromSec1Point, ToSec1Point},
};

#[cfg(feature = "zeroize")]
Expand Down Expand Up @@ -103,26 +103,26 @@ impl<EK> From<EK> for EncapsulationKey<EK> {
}

#[cfg(feature = "ecdh")]
impl<C> FromEncodedPoint<C> for EcdhEncapsulationKey<C>
impl<C> FromSec1Point<C> for EcdhEncapsulationKey<C>
where
C: CurveArithmetic,
C::FieldBytesSize: sec1::ModulusSize,
PublicKey<C>: FromEncodedPoint<C>,
PublicKey<C>: FromSec1Point<C>,
{
fn from_encoded_point(point: &sec1::EncodedPoint<C>) -> bigint::CtOption<Self> {
PublicKey::<C>::from_encoded_point(point).map(Into::into)
fn from_sec1_point(point: &sec1::Sec1Point<C>) -> bigint::CtOption<Self> {
PublicKey::<C>::from_sec1_point(point).map(Into::into)
}
}

#[cfg(feature = "ecdh")]
impl<C> ToEncodedPoint<C> for EcdhEncapsulationKey<C>
impl<C> ToSec1Point<C> for EcdhEncapsulationKey<C>
where
C: CurveArithmetic,
C::FieldBytesSize: sec1::ModulusSize,
PublicKey<C>: ToEncodedPoint<C>,
PublicKey<C>: ToSec1Point<C>,
{
fn to_encoded_point(&self, compress: bool) -> sec1::EncodedPoint<C> {
self.0.to_encoded_point(compress)
fn to_sec1_point(&self, compress: bool) -> sec1::Sec1Point<C> {
self.0.to_sec1_point(compress)
}
}

Expand Down
12 changes: 6 additions & 6 deletions frodo-kem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,35 +57,35 @@ serde = ["std", "dep:hex", "dep:serde"]
std = []

[dependencies]
aes = { version = "0.9.0-rc.2", optional = true }
aes = { version = "0.9.0-rc.4", optional = true }
hex = { version = "0.4", optional = true }
openssl-sys = { version = "0.9.104", optional = true }
rand_core = { version = "0.10.0-rc-6", features = [] }
rand_core = { version = "0.10", features = [] }
serde = { version = "1.0", features = ["derive"], optional = true }
serdect = "0.4"
subtle = "2.6"
thiserror = "2.0"

[target.'cfg(target_arch = "aarch64")'.dependencies]
sha3 = { version = "0.11.0-rc.3", features = ["asm"] }
sha3 = { version = "0.11.0-rc.7", features = ["asm"] }
zeroize = { version = "1", features = ["aarch64"] }

[target.'cfg(any(target_arch = "x86_64", target_arch = "x86"))'.dependencies]
zeroize = { version = "1", features = ["simd"] }

[target.'cfg(not(target_arch = "aarch64"))'.dependencies]
sha3 = { version = "0.11.0-rc.0" }
sha3 = { version = "0.11.0-rc.7" }

[target.'cfg(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")))'.dependencies]
zeroize = "1"

[dev-dependencies]
aes = "0.9.0-rc.2"
aes = "0.9.0-rc.4"
criterion = "0.7"
getrandom = { version = "0.4.0-rc.1", features = ["sys_rng"] }
hex = "0.4"
hybrid-array = "0.4"
chacha20 = { version = "0.10.0-rc.9", features = ["rng"] }
chacha20 = { version = "0.10.0-rc.10", features = ["rng"] }
rstest = "0.26"
postcard = { version = "1.0", features = ["use-std"] }
serde_bare = "0.5"
Expand Down
8 changes: 4 additions & 4 deletions ml-kem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ zeroize = ["module-lattice/zeroize", "dep:zeroize"]
[dependencies]
array = { version = "0.4.7", package = "hybrid-array", features = ["extra-sizes", "subtle"] }
module-lattice = { version = "0.1.0-rc.0", features = ["subtle"] }
kem = "0.3.0-rc.3"
rand_core = "0.10.0-rc-6"
sha3 = { version = "0.11.0-rc.6", default-features = false }
kem = "0.3.0-rc.4"
rand_core = "0.10"
sha3 = { version = "0.11.0-rc.7", default-features = false }
subtle = { version = "2", default-features = false }

# optional dependencies
Expand All @@ -39,7 +39,7 @@ zeroize = { version = "1.8.1", optional = true, default-features = false }

[dev-dependencies]
criterion = "0.7"
getrandom = { version = "0.4.0-rc.1", features = ["sys_rng"] }
getrandom = { version = "0.4", features = ["sys_rng"] }
hex = { version = "0.4.3", features = ["serde"] }
hex-literal = "1"
num-rational = { version = "0.4.2", default-features = false, features = ["num-bigint"] }
Expand Down
2 changes: 1 addition & 1 deletion module-lattice/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ subtle = { version = "2", optional = true, default-features = false }
zeroize = { version = "1.8.1", optional = true, default-features = false }

[dev-dependencies]
getrandom = { version = "0.4.0-rc.1", features = ["sys_rng"] }
getrandom = { version = "0.4", features = ["sys_rng"] }

[features]
subtle = ["dep:subtle", "array/subtle"]
Expand Down
10 changes: 5 additions & 5 deletions x-wing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ zeroize = ["dep:zeroize", "ml-kem/zeroize", "x25519-dalek/zeroize"]
hazmat = []

[dependencies]
kem = "0.3.0-rc.3"
kem = "0.3.0-rc.4"
ml-kem = { version = "=0.3.0-pre.6", default-features = false, features = ["hazmat"] }
rand_core = { version = "0.10.0-rc-6", default-features = false }
sha3 = { version = "0.11.0-rc.6", default-features = false }
rand_core = { version = "0.10", default-features = false }
sha3 = { version = "0.11.0-rc.7", default-features = false }
x25519-dalek = { version = "=3.0.0-pre.5", default-features = false, features = ["static_secrets"] }

# optional dependencies
zeroize = { version = "1.8.1", optional = true, default-features = true }

[dev-dependencies]
getrandom = { version = "0.4.0-rc.1", features = ["sys_rng"] }
getrandom = { version = "0.4", features = ["sys_rng"] }
hex = { version = "0.4", features = ["serde"] }
rand_core = "0.10.0-rc-6"
rand_core = "0.10"
serde = { version = "1", features = ["derive"] }
serde_json = "1"

Expand Down