[package] name = "libp2p-identity" version = "0.2.9" edition = "2021" description = "Data structures and algorithms for identifying peers in libp2p." rust-version = "1.73.0" # MUST NOT inherit from workspace because we don't want to publish breaking changes to `libp2p-identity`. license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking", "cryptography"] categories = ["cryptography"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] asn1_der = { version = "0.7.6", optional = true } bs58 = { version = "0.5.1", optional = true } ed25519-dalek = { version = "2.1", optional = true } hkdf = { version = "0.12.4", optional = true } libsecp256k1 = { version = "0.7.0", optional = true } tracing = { workspace = true } multihash = { version = "0.19.1", optional = true } p256 = { version = "0.13", default-features = false, features = ["ecdsa", "std", "pem"], optional = true } quick-protobuf = "0.8.1" rand = { version = "0.8", optional = true } sec1 = { version = "0.7", default-features = false, optional = true } serde = { version = "1", optional = true, features = ["derive"] } sha2 = { version = "0.10.8", optional = true } thiserror = { version = "1.0", optional = true } void = { version = "1.0", optional = true } zeroize = { version = "1.8", optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] ring = { workspace = true, features = ["alloc", "std"], optional = true } [features] secp256k1 = ["dep:libsecp256k1", "dep:asn1_der", "dep:sha2", "dep:hkdf", "dep:zeroize"] ecdsa = ["dep:p256", "dep:void", "dep:zeroize", "dep:sec1", "dep:sha2", "dep:hkdf"] rsa = ["dep:ring", "dep:asn1_der", "dep:rand", "dep:zeroize"] ed25519 = ["dep:ed25519-dalek", "dep:zeroize", "dep:sha2", "dep:hkdf"] peerid = ["dep:multihash", "dep:bs58", "dep:thiserror", "dep:sha2", "dep:hkdf"] rand = ["dep:rand", "ed25519-dalek?/rand_core"] [dev-dependencies] quickcheck = { workspace = true } base64 = "0.22.1" serde_json = "1.0" rmp-serde = "1.3" criterion = "0.5" hex-literal = "0.4.1" [[bench]] name = "peer_id" harness = false # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true [lints] workspace = true