-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
113 lines (97 loc) · 3.9 KB
/
Cargo.toml
File metadata and controls
113 lines (97 loc) · 3.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
[package]
name = "libpep"
edition = "2021"
version = "0.12.0"
authors = ["Bernard van Gastel <bvgastel@bitpowder.com>", "Job Doesburg <job@jobdoesburg.nl>"]
homepage = "https://github.com/NOLAI/libpep"
repository = "https://github.com/NOLAI/libpep"
documentation = "https://docs.rs/libpep"
license = "Apache-2.0"
keywords = ["crypto", "pep", "pseudonymization"]
categories = ["cryptography", "algorithms"]
description = "Library for polymorphic encryption and pseudonymization"
readme = "README.md"
[features]
default = ["build-binary", "long", "offline", "batch", "serde", "json"]
serde = ["dep:serde"] # For (de)serialization support via Serde
elgamal3 = [] # For ElGamal triple encryption, including the recipient's public key in message encoding
offline = [] # For encryption towards global keys (instead of encryption with session keys)
batch = [] # For batch transcryption with reordering to prevent linkability
long = [] # For long pseudonyms and attributes over 15 bytes
json = ["long", "serde", "dep:serde_json"] # For JSON encryption/decryption support
global-pseudonyms = ["offline"] # Allow pseudonyms in a global domain (uses global pseudonyms with reshuffle factor 1), which is potentially insecure
legacy = ["elgamal3", "offline", "global-pseudonyms"] # For compatibility with the legacy PEP repository implementation
insecure = [] # Enable insecure methods that typically should not be used in production (does not include "global-pseudonyms", which is a separate feature)
build-binary = ["buildinfy","commandy","commandy_macros","rand"] # Build the peppy command line utility
wasm = ["wasm-bindgen", "serde-wasm-bindgen", "js-sys", "getrandom", "rand"] # For building WebAssembly bindings via wasm-bindgen
python = ["pyo3", "rand"] # For building Python bindings via PyO3
# Note: python and wasm are mutually exclusive and should not be enabled together.
# PyO3 builds a cdylib that links to the Python interpreter, while wasm-bindgen builds
# a cdylib targeting WebAssembly - they have incompatible linking requirements.
[lib]
name = "libpep"
crate-type = ["cdylib", "rlib"]
path = "src/lib/lib.rs"
[[bin]]
name = "peppy"
required-features = ["build-binary"]
[dependencies]
curve25519-dalek = { version = "=5.0.0-pre.6", features = ["rand_core", "lizard"] }
rand_core = "^0.10"
rand = { version = "^0.10", optional = true }
sha2 = "^0.11.0-rc.5"
hmac = "^0.13.0-rc.5"
derive_more = { version = "^2.0", features = ["deref", "from", "into"] }
hex = "^0.4"
base64 = "^0.22"
serde = { version = "^1.0", features = ["derive"], optional = true }
serde_json = { version = "^1.0", optional = true }
wasm-bindgen = { version = "^0.2", optional = true }
serde-wasm-bindgen = { version = "^0.6", optional = true }
js-sys = { version = "^0.3", optional = true }
getrandom = { version = "^0.4", features = ["wasm_js"], optional = true }
pyo3 = { version = "0.28", features = ["extension-module"], optional = true }
buildinfy = { version = "^0.2", optional = true }
commandy = { version = "^0.2", optional = true }
commandy_macros = { version = "^0.2", optional = true }
thiserror = "^2.0"
[dev-dependencies]
serde_json = "^1.0"
rand = "^0.10"
criterion = { version = "^0.8", features = ["html_reports"] }
energy-bench = "^0.2.0"
[[bench]]
name = "base"
harness = false
[[bench]]
name = "quick"
harness = false
[[bench]]
name = "distributed"
harness = false
[[bench]]
name = "energy_base"
harness = false
[[bench]]
name = "energy_distributed"
harness = false
[package.metadata.deb]
name = "peppy"
depends = ""
assets = [
["peppy.1", "usr/man/man1/", "444"],
["target/release/peppy", "usr/bin/peppy", "555"],
]
[package.metadata.freebsd]
assets = [
["peppy.1", "man/man1/", "444"],
["target/release/peppy", "bin/peppy", "555"],
]
[package.metadata.docs.rs]
features = ["offline", "batch", "long", "serde", "elgamal3", "insecure"]
rustdoc-args = ["--cfg", "docsrs"]
[lints.rust]
unsafe_code = "deny"
[lints.clippy]
unwrap_used = "deny"
expect_used = "deny"