ssi-jwk 0.3.1

Implementation of JWK for the ssi library.
[package]
name = "ssi-jwk"
version = "0.3.1"
edition = "2021"
authors = ["Spruce Systems, Inc."]
license = "Apache-2.0"
description = "Implementation of JWK for the ssi library."
repository = "https://github.com/spruceid/ssi/"
documentation = "https://docs.rs/ssi-jwk/"

[features]
default = ["secp256k1", "secp256r1", "ed25519", "rsa", "eip", "ripemd-160"]

## Enable secp256k1 keys.
secp256k1 = ["k256", "rand", "getrandom", "ssi-crypto/secp256k1"]

## Enable secp256r1 (p256) keys.
secp256r1 = ["p256", "rand", "getrandom"]

## Enable secp384r1 (p384) keys.
secp384r1 = ["p384", "rand", "getrandom"]

## Enable ed25519 (EdDSA) keys.
ed25519 = ["ed25519-dalek", "rand", "getrandom"]

## Enable RSA keys.
rsa = ["dep:rsa"]

## Enable aleo ecosystem keys.
## 
## Not compatible with WASM targets.
aleo = [
    "rand",
    "blake2",
    "snarkvm-dpc",
    "snarkvm-algorithms",
    "snarkvm-curves",
    "snarkvm-utilities",
    "snarkvm-parameters",
    "bs58",
]

## enable ripemd-160 hashing for keys, e.g. for bitcoin.
ripemd-160 = ["ssi-crypto/ripemd-160", "secp256k1"]

## enable ethereum style key hashing.
eip = ["ssi-crypto/keccak", "k256", "secp256k1"]

## enable tezos style key hashing.
tezos = ["blake2b_simd", "secp256k1", "secp256r1", "bs58"]

ring = ["dep:ring"]

bbs = ["ssi-bbs", "rand"]

[dependencies]
ssi-claims-core.workspace = true
num-bigint = "0.4"
simple_asn1 = "^0.5.2"
zeroize = { version = "1.5", features = ["zeroize_derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json.workspace = true
serde_jcs.workspace = true
base64.workspace = true
thiserror = "1.0"
ssi-crypto.workspace = true
k256 = { workspace = true, optional = true, features = ["ecdsa"] }
p256 = { workspace = true, optional = true, features = ["ecdsa"] }
p384 = { workspace = true, optional = true, features = ["ecdsa"] }
ring = { version = "0.16", optional = true }
rsa = { workspace = true, optional = true }
rand = { workspace = true, optional = true }
ed25519-dalek = { workspace = true, optional = true, features = ["rand_core"] }
lazy_static = "1.4"
bs58 = { workspace = true, features = ["check"], optional = true }
ssi-bbs = { workspace = true, optional = true }

blake2b_simd = { version = "0.5", optional = true }
multibase = "0.9.1"
num-traits = "0.2"
num-derive = "0.3"
ssi-multicodec.workspace = true
linked-data.workspace = true
json-syntax = { workspace = true, features = ["serde", "canonicalize"] }

# Required only for aleo
# All of these dependencies are out of date becaus `snarkvm` since dropped
# support for the `Schnorr` scheme, required by aleo.
blake2 = { version = "0.9", optional = true }
snarkvm-dpc = { version = "0.7.9", optional = true }
snarkvm-algorithms = { version = "0.7.9", optional = true }
snarkvm-curves = { version = "0.7.9", optional = true }
snarkvm-utilities = { version = "0.7.9", optional = true }
snarkvm-parameters = { version = "0.7.9", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { workspace = true, features = ["js"], optional = true }

[dev-dependencies]
hex.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]