[package] name = "sequoia-openpgp" description = "OpenPGP data types and associated machinery" version = "1.21.2" authors = [ "Igor Matuszewski ", "Justus Winter ", "Kai Michaelis ", "Neal H. Walfield ", "Nora Widdecke ", "Wiktor Kwapisiewicz ", ] build = "build.rs" documentation = "https://docs.rs/sequoia-openpgp" autobenches = false homepage = "https://sequoia-pgp.org/" repository = "https://gitlab.com/sequoia-pgp/sequoia" readme = "README.md" keywords = ["cryptography", "openpgp", "pgp", "encryption", "signing"] categories = ["cryptography", "authentication", "email"] license = "LGPL-2.0-or-later" edition = "2021" rust-version = "1.67" [badges] gitlab = { repository = "sequoia-pgp/sequoia" } maintenance = { status = "actively-developed" } [dependencies] anyhow = "1.0.18" buffered-reader = { path = "../buffered-reader", version = "1.3.0", default-features = false } base64 = ">= 0.21, < 0.23" bzip2 = { version = "0.4", optional = true } dyn-clone = "1" flate2 = { version = "1.0.1", optional = true } idna = ">= 0.5, < 2" lalrpop-util = "0.20" lazy_static = "1.4.0" libc = "0.2.66" memsec = { version = ">=0.5, <0.8", default-features = false } nettle = { version = "7.3", optional = true } once_cell = "1" regex = "1" regex-syntax = "0.8" sha1collisiondetection = { version = "0.3.1", default-features = false, features = ["std"] } thiserror = "1.0.2" xxhash-rust = { version = "0.8", features = ["xxh3"] } # At least 0.10.55 is needed due `no-ocb` check: # https://github.com/sfackler/rust-openssl/blob/master/openssl/CHANGELOG.md openssl = { version = "0.10.55", optional = true } # We need to directly depend on the sys crate so that the metadata produced # in its build script is passed to sequoia-openpgp's build script # see: https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key openssl-sys = { version = "0.9.90", optional = true } # Botan. botan = { version = "0.10.6", optional = true } # RustCrypto crates. aes = { version = "0.8", optional = true, features = ["zeroize"] } aes-gcm = { version = "0.10", optional = true, features = ["std"] } block-padding = { version = "0.3", optional = true } blowfish = { version = "0.9", optional = true, features = ["zeroize"] } camellia = { version = "0.1", optional = true, features = ["zeroize"] } cast5 = { version = "0.11", optional = true, features = ["zeroize"] } cipher = { version = "0.4", optional = true, features = ["std", "zeroize"] } cfb-mode = { version = "0.8", optional = true } des = { version = "0.8", optional = true, features = ["zeroize"] } digest = { version = "0.10", optional = true } dsa = { version = "0.6", optional = true } eax = { version = "0.5", optional = true } ecb = { version = "0.1", optional = true } ecdsa = { version = "0.16", optional = true, features = ["hazmat", "arithmetic"] } # XXX # We don't directly use ed25519, but ed25519-dalek reexports it and we # need the std feature, at least so that ed25519::Error implements # std::error::Error. ed25519 = { version = "2", default-features = false, features = ["std"], optional = true } ed25519-dalek = { version = "2", features = ["rand_core", "zeroize"], optional = true } idea = { version = "0.5", optional = true, features = ["zeroize"] } md-5 = { version = "0.10", features = ["oid"], optional = true } num-bigint-dig = { version = "0.8", default-features = false, optional = true } p256 = { version = "0.13", optional = true, features = ["ecdh", "ecdsa"] } p384 = { version = "0.13", optional = true, features = ["ecdh", "ecdsa"] } p521 = { version = "0.13", optional = true, features = ["ecdh", "ecdsa"] } rand = { version = "0.8", optional = true, default-features = false } rand_core = { version = "0.6", optional = true } ripemd = { version = "0.1", features = ["oid"], optional = true } rsa = { version = "0.9.0", optional = true } sha2 = { version = "0.10", features = ["oid"], optional = true } twofish = { version = "0.7", optional = true, features = ["zeroize"] } typenum = { version = "1.12.0", optional = true } x25519-dalek = { version = "2", optional = true, default-features = false, features = ["static_secrets", "zeroize"] } [target.'cfg(windows)'.dependencies] win-crypto-ng = { version = "0.5.1", features = ["rand", "block-cipher"], optional = true } winapi = { version = "0.3.8", default-features = false, features = ["bcrypt"], optional = true } [target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies] chrono = { version = "0.4.10", default-features = false, features = ["std", "wasmbind", "clock"] } getrandom = { version = "0.2", features = ["js"] } [build-dependencies] lalrpop = { version = "0.20", default-features = false } [dev-dependencies] quickcheck = { version = "1", default-features = false } rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] } rpassword = "7.0" criterion = { version = "0.5", features = ["html_reports"] } [features] default = ["compression", "crypto-nettle"] # TODO(#333): Allow for/implement more backends crypto-nettle = ["dep:nettle"] crypto-rust = [ "dep:aes", "dep:block-padding", "dep:blowfish", "dep:camellia", "dep:cast5", "dep:cfb-mode", "dep:cipher", "dep:des", "dep:digest", "dep:eax", "dep:ecb", "dep:ed25519", "dep:ed25519-dalek", "dep:idea", "dep:md-5", "dep:num-bigint-dig", "dep:ripemd", "dep:rsa", "dep:sha2", "sha1collisiondetection/digest-trait", "sha1collisiondetection/oid", "dep:twofish", "dep:typenum", "dep:x25519-dalek", "dep:p256", "dep:p384", "dep:p521", "dep:rand", "rand?/getrandom", "dep:rand_core", "rand_core?/getrandom", "dep:ecdsa", "dep:aes-gcm", "dep:dsa" ] crypto-cng = [ "dep:cipher", "dep:eax", "dep:winapi", "dep:win-crypto-ng", "dep:ed25519", "dep:ed25519-dalek", "dep:num-bigint-dig", "dep:aes-gcm", "dep:rand_core" ] crypto-openssl = ["dep:openssl", "dep:openssl-sys"] crypto-botan = ["dep:botan", "botan?/botan3"] crypto-botan2 = ["dep:botan"] crypto-fuzzing = [] __implicit-crypto-backend-for-tests = [] # Experimental and variable-time cryptographic backends opt-ins allow-experimental-crypto = [] allow-variable-time-crypto = [] # The compression algorithms. compression = ["compression-deflate", "compression-bzip2"] compression-deflate = ["dep:flate2", "buffered-reader/compression-deflate"] compression-bzip2 = ["dep:bzip2", "buffered-reader/compression-bzip2"] [lib] bench = false [[example]] name = "pad" required-features = ["compression-deflate"] [[bench]] name = "run_benchmarks" harness = false [[example]] name = "secret-leak-detector" path = "tests/secret-leak-detector/detector.rs"