Skip to content

Commit

Permalink
feat(s2n-quic-crypto): use scatter API with AWS-LC
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft committed Sep 1, 2023
1 parent d1a0702 commit 97d7adb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions quic/s2n-quic-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ s2n-quic-core = { version = "=0.27.0", path = "../s2n-quic-core", default-featur
zeroize = { version = "1", default-features = false, features = ["derive"] }

[target.'cfg(target_os = "linux")'.dependencies]
aws-lc-rs = { version = "1.0.0", default-features = false, features = ["aws-lc-sys"] }
aws-lc-rs = { version = "1.3", default-features = false, features = ["aws-lc-sys"] }

[target.'cfg(not(target_os = "linux"))'.dependencies]
ring = { version = "0.16.20", default-features = false }
ring = { version = "0.16", default-features = false }

[dev-dependencies]
aes = "0.8"
Expand Down
8 changes: 2 additions & 6 deletions quic/s2n-quic-crypto/src/aesgcm/ring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ impl aead::Aead for LessSafeKey {
type Tag = [u8; TAG_LEN];

#[inline]
#[cfg(not(target_os = "linux"))]
fn encrypt(
&self,
nonce: &[u8; NONCE_LEN],
Expand All @@ -37,11 +38,7 @@ impl aead::Aead for LessSafeKey {
Ok(())
}

/*
* TODO: enable this once the scatter API is available in AWS-LC-RS
*
* https://github.com/aws/aws-lc-rs/pull/206
*
// use the scatter API if we're using AWS-LC
#[inline]
#[cfg(target_os = "linux")]
fn encrypt(
Expand All @@ -63,7 +60,6 @@ impl aead::Aead for LessSafeKey {

Ok(())
}
*/

#[inline]
fn decrypt(
Expand Down

0 comments on commit 97d7adb

Please sign in to comment.