[package] name = "pasta-tokens" version = "0.1.0-rc.7" edition = "2021" rust-version = "1.65.0" authors = ["Conrad Ludgate "] repository = "https://github.com/conradludgate/pasta-tokens" description = "Platform Agnostic SEcurity TOkens (PASETO) is a secure alternative to JOSE/JWT" license = "MIT" keywords = ["paseto", "token", "security"] categories = [ "cryptography", "authentication", "encoding", "network-programming", "web-programming", ] [workspace] members = ["fuzz"] [features] default = [] # V3 contains NIST approved algoritms only v3 = ["v3-paseto", "v3-paserk"] v3-paseto = ["v3-local", "v3-public"] v3-paserk = ["v3-id", "v3-pbkw", "v3-pke", "v3-wrap"] v3-local = ["dep:aes", "dep:ctr", "dep:hkdf", "dep:hmac", "dep:sha2"] v3-public = ["dep:p384", "dep:ecdsa"] v3-id = ["dep:sha2"] v3-pbkw = ["dep:pbkdf2", "v3-local"] v3-pke = ["v3-local", "v3-public"] v3-wrap = ["v3-local"] # V4 is recommended v4 = ["v4-paseto", "v4-paserk"] v4-paseto = ["v4-local", "v4-public"] v4-paserk = ["v4-id", "v4-pbkw", "v4-pke", "v4-wrap"] v4-local = ["dep:blake2", "dep:chacha20"] v4-public = ["dep:ed25519-dalek"] v4-id = ["dep:blake2"] v4-pbkw = ["dep:argon2", "v4-local"] v4-pke = ["v4-local", "v4-public", "dep:curve25519-dalek"] v4-wrap = ["v4-local"] [dependencies] subtle = "2.5.0" generic-array = "0.14" base64ct = { version = "1.6.0", features = ["alloc"] } cipher = "0.4.4" digest = { version = "0.10.7", features = ["mac"] } rand = "0.8.5" signature = "2.0.0" # V4 chacha20 = { version = "0.9.1", optional = true } blake2 = { version = "0.10.6", optional = true } ed25519-dalek = { version = "2.0.0", features = [ "hazmat", "digest", "zeroize", ], optional = true } curve25519-dalek = { version = "4.0.0", optional = true } argon2 = { version = "0.5.0", optional = true } # V3 aes = { version = "0.8.2", optional = true } ctr = { version = "0.9.2", optional = true } hmac = { version = "0.12.1", optional = true } sha2 = { version = "0.10.2", optional = true } p384 = { version = "0.13.0", optional = true, features = [ "ecdh", "pkcs8", "ecdsa-core", ] } ecdsa = { version = "0.16.0", optional = true, features = ["digest", "hazmat"] } hkdf = { version = "0.12.3", optional = true } pbkdf2 = { version = "0.12.1", optional = true } serde = { version = "1", features = ["derive"] } serde_json = "1" [target.'cfg(fuzzing)'.dependencies] arbitrary = { version = "1.3", features = ["derive"] } [dev-dependencies] rand = "0.8" hex = "0.4" ff = "0.13.0" time = { version = "0.3", features = ["serde", "formatting", "parsing"] } uuid = { version = "1", features = ["v4", "serde"] } libtest-mimic = "0.6.1" criterion = "0.5" [profile.dev.package."*"] opt-level = 2 debug = false incremental = false [profile.release] debug = 1 [[test]] name = "paseto-test-vectors" path = "tests/paseto.rs" harness = false [[test]] name = "paserk-test-vectors" path = "tests/paserk.rs" harness = false [[bench]] name = "bench" harness = false # Properly document all features on docs.rs [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"]