[package] name = "dup-crypto" version = "0.58.0" authors = ["elois "] description = "Manage cryptographic operations for DUniter Protocols and the Duniter eco-system most broadly." repository = "https://git.duniter.org/libs/dubp-rs-libs" readme = "README.md" keywords = ["keys", "cryptography", "duniter", "dunitrust"] license = "AGPL-3.0" edition = "2018" [lib] path = "src/lib.rs" [dependencies] arrayvec = { version = "0.7", optional = true } base64 = "0.13.0" blake3 = { version = "0.3.7", features = ["rayon"] } bs58 = "0.4.0" byteorder = "1.3.4" curve25519-dalek = { version = "3.1", optional = true } chacha20poly1305 = { version = "0.7.1", optional = true, features = ["reduced-round"] } ed25519-bip32 = { version = "0.3.2", optional = true } hex = "0.4.2" once_cell = { version = "1.5.2", optional = true, default-features = false, features = ["std"] } serde = { version = "1.0.123", features = ["derive"] } thiserror = "1.0.24" zerocopy = "0.3.0" zeroize = { version = "1.2.0", features = ["zeroize_derive"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] cryptoxide = { version = "0.3.2", optional = true } getrandom = { version = "0.2.2" } ring = "0.16.20" [target.'cfg(target_arch = "wasm32")'.dependencies] cryptoxide = "0.3.2" getrandom = { version = "0.2.2", features = ["js"] } [dev-dependencies] bincode = "1.3.1" sodiumoxide = "0.2.6" unwrap = "1.2.1" # Benches dependencies criterion = { version = "0.3.4" } [[bench]] harness = false name = "ring_vs_sodium" [[bench]] harness = false name = "vanity" [features] #default = ["client"] # meta-feature for "standard" clients (gcli, gecko, etc) client = ["bip32-ed25519", "dewif", "encrypt_tx_comment", "mnemonic", "mnemonic_french", "mnemonic_spanish"] # meta-feature for duniter duniter = [] bip32-ed25519 = ["arrayvec", "cryptoxide", "ed25519-bip32", "mnemonic"] dewif = ["arrayvec", "bip32-ed25519", "mnemonic"] encrypt_tx_comment = ["cryptoxide", "x25519"] x25519 = ["curve25519-dalek", "pubkey_check"] mnemonic = ["once_cell"] private_message = ["arrayvec", "chacha20poly1305", "x25519"] pubkey_check = ["curve25519-dalek"] # mnemonic languages features (English is the default language, so always included) mnemonic_all_languages = ["mnemonic_chinese_simplified", "mnemonic_chinese_traditional", "mnemonic_french", "mnemonic_italian", "mnemonic_japanese", "mnemonic_korean", "mnemonic_spanish"] mnemonic_chinese_simplified = [] mnemonic_chinese_traditional = [] mnemonic_french = [] mnemonic_italian = [] mnemonic_japanese = [] mnemonic_korean = [] mnemonic_spanish = [] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"]