[package] name = "hpke_pq" repository = "https://github.com/bwesterb/rust-hpke" documentation = "https://docs.rs/rust-hpke" description = "Fork of hpke that adds PQ modes" readme = "README.md" version = "0.11.1" authors = ["Bas Westerbaan "] edition = "2021" license = "MIT/Apache-2.0" keywords = ["cryptography", "crypto", "key-exchange", "encryption", "aead"] categories = ["cryptography", "no-std"] [features] # "p256" enables the use of ECDH-NIST-P256 as a KEM # "p384" enables the use of ECDH-NIST-P384 as a KEM # "x25519" enables the use of the X25519 as a KEM # "xyber768d00" enables the use of X25519Kyber768Draft00 as a KEM default = ["alloc", "p256", "x25519"] x25519 = ["dep:x25519-dalek"] p384 = ["dep:p384"] p256 = ["dep:p256"] xyber768d00 = ["dep:safe_pqc_kyber", "x25519"] # Include serde Serialize/Deserialize impls for all relevant types serde_impls = ["serde", "generic-array/serde"] # Include allocating methods like open() and seal() alloc = [] # Includes an implementation of `std::error::Error` for `HpkeError`. Also does what `alloc` does. std = [] [dependencies] aead = "0.5" aes-gcm = "0.10" byteorder = { version = "1.4", default-features = false } chacha20poly1305 = "0.10" generic-array = { version = "0.14", default-features = false } digest = "0.10" hkdf = "0.12" hmac = "0.12" rand_core = { version = "0.6", default-features = false } p256 = { version = "0.13", default-features = false, features = ["arithmetic", "ecdh"], optional = true} p384 = { version = "0.13", default-features = false, features = ["arithmetic", "ecdh"], optional = true} sha2 = { version = "0.10", default-features = false } serde = { version = "1.0", default-features = false, optional = true } subtle = { version = "2.5", default-features = false } x25519-dalek = { version = "2", default-features = false, features = ["static_secrets"], optional = true } zeroize = { version = "1", default-features = false, features = ["zeroize_derive"] } [dependencies.safe_pqc_kyber] # Be careful when switching to upstream, as the latest version might not have # been reviewed for implementation mistakes, and might still use explicit # rejection. Also, enable the avx2 at your own risk, as it's not been reviewed. # Examples of earlier issues: # # https://github.com/Argyle-Software/kyber/issues/73 # https://github.com/Argyle-Software/kyber/issues/75 # https://github.com/Argyle-Software/kyber/issues/77 version = "0.6" git = "https://github.com/bwesterb/argyle-kyber" rev = "d22c627406d436fa8446a0df48715b0ab78041c4" default-features = false features = ["kyber768", "std"] # TODO get rid of std dep optional = true [dev-dependencies] criterion = { version = "0.4", features = ["html_reports"] } hex = "0.4" hex-literal = "0.4" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" rand = { version = "0.8", default-features = false, features = ["getrandom", "std_rng"] } [[example]] name = "client_server" required-features = ["x25519"] [[example]] name = "agility" required-features = ["p256", "p384", "x25519"] # Tell docs.rs to build docs with `--all-features` and `--cfg docsrs` (for nightly docs features) [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] # Criteron benches [[bench]] name = "benches" harness = false [lib] bench = false