[package]
edition = "2024"
rust-version = "1.87"
name = "ssh-key"
version = "0.7.0"
authors = ["RustCrypto Developers"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
Pure Rust implementation of SSH key file format decoders/encoders as described
in RFC4251/RFC4253 and OpenSSH key formats, as well as "sshsig" signatures and
certificates (including certificate validation and certificate authority support),
with further support for the `authorized_keys` and `known_hosts` file formats.
"""
homepage = "https://github.com/RustCrypto/SSH/tree/master/ssh-key"
readme = "README.md"
keywords = [
"crypto",
"certificate",
"openssh",
"ssh",
"sshsig",
]
categories = [
"authentication",
"cryptography",
"encoding",
"no-std",
"parser-implementations",
]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/RustCrypto/SSH"
resolver = "2"
[package.metadata.docs.rs]
all-features = true
[features]
alloc = [
"encoding/alloc",
"ml-dsa?/alloc",
"signature/alloc",
"zeroize/alloc",
]
crypto = [
"ed25519",
"p256",
"p384",
"p521",
"rsa",
]
default = [
"ecdsa",
"rand_core",
"sha2",
"std",
]
dsa = [
"dep:dsa",
"dep:sha1",
"alloc",
"encoding/bigint",
"signature/rand_core",
]
ecdsa = ["dep:sec1"]
ed25519 = [
"dep:curve25519-dalek",
"dep:ed25519-dalek",
"rand_core",
"sha2",
]
encryption = [
"dep:bcrypt-pbkdf",
"alloc",
"cipher/aes",
"cipher/chacha20poly1305",
"rand_core",
]
getrandom = [
"cipher/getrandom",
"rand_core",
]
mldsa = [
"dep:ml-dsa",
"ml-dsa/rand_core",
"rand_core",
"sha2",
"signature/rand_core",
]
mldsa44-ed25519 = [
"mldsa",
"ed25519",
]
mldsa87-p384 = [
"mldsa",
"p384",
]
p256 = [
"dep:p256",
"ecdsa",
"sha2",
]
p384 = [
"dep:p384",
"ecdsa",
"sha2",
]
p521 = [
"dep:p521",
"ecdsa",
"sha2",
]
ppk = [
"dep:hex",
"alloc",
"cipher/aes",
"dep:hmac",
"dep:argon2",
"dep:sha1",
"sha2",
]
rand_core = [
"dep:rand_core",
"cipher/rand_core",
]
rsa = [
"dep:rsa",
"alloc",
"encoding/bigint",
"rand_core",
"sha2",
]
sha1 = ["dep:sha1"]
sha2 = ["dep:sha2"]
std = ["alloc"]
tdes = [
"cipher/tdes",
"encryption",
]
[lib]
name = "ssh_key"
path = "src/lib.rs"
[[test]]
name = "algorithm_name"
path = "tests/algorithm_name.rs"
[[test]]
name = "authorized_keys"
path = "tests/authorized_keys.rs"
[[test]]
name = "certificate"
path = "tests/certificate.rs"
[[test]]
name = "certificate_builder"
path = "tests/certificate_builder.rs"
[[test]]
name = "dot_ssh"
path = "tests/dot_ssh.rs"
[[test]]
name = "ecdsa_private_key"
path = "tests/ecdsa_private_key.rs"
[[test]]
name = "encrypted_private_key"
path = "tests/encrypted_private_key.rs"
[[test]]
name = "known_hosts"
path = "tests/known_hosts.rs"
[[test]]
name = "mldsa44_ed25519"
path = "tests/mldsa44_ed25519.rs"
[[test]]
name = "mldsa87_p384"
path = "tests/mldsa87_p384.rs"
[[test]]
name = "private_key"
path = "tests/private_key.rs"
[[test]]
name = "public_key"
path = "tests/public_key.rs"
[[test]]
name = "sshsig"
path = "tests/sshsig.rs"
[dependencies.argon2]
version = "0.6"
features = ["alloc"]
optional = true
default-features = false
[dependencies.bcrypt-pbkdf]
version = "0.11"
features = ["alloc"]
optional = true
default-features = false
[dependencies.cipher]
version = "0.4"
features = [
"encoding",
"zeroize",
]
package = "ssh-cipher"
[dependencies.ctutils]
version = "0.4.8"
default-features = false
[dependencies.curve25519-dalek]
version = "5.1"
optional = true
default-features = false
[dependencies.dsa]
version = "0.7"
features = ["hazmat"]
optional = true
default-features = false
[dependencies.ed25519-dalek]
version = "3"
optional = true
default-features = false
[dependencies.encoding]
version = "0.4"
features = [
"base64",
"derive",
"digest",
"pem",
"ctutils",
"zeroize",
]
package = "ssh-encoding"
[dependencies.hex]
version = "0.4"
features = ["alloc"]
optional = true
default-features = false
[dependencies.hmac]
version = "0.13"
optional = true
[dependencies.ml-dsa]
version = "0.1"
features = ["zeroize"]
optional = true
default-features = false
[dependencies.p256]
version = "0.14"
features = ["ecdsa"]
optional = true
default-features = false
[dependencies.p384]
version = "0.14"
features = ["ecdsa"]
optional = true
default-features = false
[dependencies.p521]
version = "0.14"
features = ["ecdsa"]
optional = true
default-features = false
[dependencies.rand_core]
version = "0.10"
optional = true
default-features = false
[dependencies.rsa]
version = "0.10"
features = ["pkcs1v15"]
optional = true
default-features = false
[dependencies.sec1]
version = "0.8"
features = ["point"]
optional = true
default-features = false
[dependencies.serde]
version = "1.0.16"
optional = true
[dependencies.sha1]
version = "0.11"
features = ["oid"]
optional = true
default-features = false
[dependencies.sha2]
version = "0.11"
optional = true
default-features = false
[dependencies.signature]
version = "3"
default-features = false
[dependencies.zeroize]
version = "1.9"
default-features = false
[dev-dependencies.chacha20]
version = "0.10"
features = ["rng"]
[dev-dependencies.getrandom]
version = "0.4"
features = ["sys_rng"]
[dev-dependencies.hex-literal]
version = "1"
[lints.clippy]
as_conversions = "warn"
borrow_as_ptr = "warn"
cast_lossless = "warn"
cast_possible_truncation = "warn"
cast_possible_wrap = "warn"
cast_precision_loss = "warn"
cast_sign_loss = "warn"
checked_conversions = "warn"
implicit_saturating_sub = "warn"
integer_division_remainder_used = "warn"
manual_assert = "warn"
map_unwrap_or = "warn"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
mod_module_files = "warn"
must_use_candidate = "warn"
needless_range_loop = "allow"
ptr_as_ptr = "warn"
redundant_closure_for_method_calls = "warn"
ref_as_ptr = "warn"
return_self_not_must_use = "warn"
semicolon_if_nothing_returned = "warn"
std_instead_of_alloc = "warn"
std_instead_of_core = "warn"
trivially_copy_pass_by_ref = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unwrap_used = "warn"
[lints.rust]
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unreachable_pub = "warn"
unsafe_code = "forbid"
unused_lifetimes = "warn"
unused_qualifications = "warn"