-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
202 lines (188 loc) · 9.47 KB
/
Cargo.toml
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
[package]
name = "ursa"
version = "0.3.7"
authors = ["Hyperledger Ursa Contributors"]
description = "This is the shared crypto library for Hyperledger components."
license = "Apache-2.0"
readme = "../README.md"
repository = "https://github.com/hyperledger/ursa"
documentation = "https://docs.rs/ursa"
homepage = "https://crates.io/crates/ursa"
keywords = ["cryptography", "aead", "hash", "signature", "zero-knowledge"]
include = [
"src/bls/**/*.rs",
"src/bn/**/*.rs",
"src/cl/**/*.rs",
"src/encoding/**/*.rs",
"src/encryption/**/*.rs",
"src/errors/**/*.rs",
"src/hash/**/*.rs",
"src/kex/**/*.rs",
"src/pair/**/*.rs",
"src/sharing/**/*.rs",
"src/signatures/**/*.rs",
"src/utils/**/*.rs",
"src/wasm/**/*.rs",
"src/*.rs",
"Cargo.toml",
"LICENSE",
"CHANGELOG"
]
[lib]
name = "ursa"
path = "src/lib.rs"
crate-type = ["staticlib", "rlib", "cdylib"]
[[bin]]
name = "test_aescbc"
path = "bin/test_aescbc.rs"
required-features = ["benchmarkaescbc"]
[[bin]]
name = "test_aesgcm"
path = "bin/test_aesgcm.rs"
required-features = ["benchmarkaesgcm"]
[[bin]]
name = "test_secp256k1"
path = "bin/test_secp256k1.rs"
required-features = ["benchmarksecp256k1"]
[[bin]]
name = "test_ed25519"
path = "bin/test_ed25519.rs"
required-features = ["benchmarked25519"]
[[bin]]
name = "test_xchacha20poly1305"
path = "bin/test_xchacha20poly1305.rs"
required-features = ["benchmarkxchacha20poly1305"]
[features]
default = ["encryption", "ffi", "hashes", "kex", "serde", "signatures_native", "sharing_native"]
aescbc = ["aead", "aes", "block-modes", "block-padding", "hex", "hmac", "rand", "sha2/std", "subtle", "zeroize"]
aescbc_native = ["aead", "hex", "rand", "openssl", "zeroize"]
aesgcm_native = ["aead", "hex", "rand", "openssl", "zeroize"]
aesgcm = ["aead", "aes-gcm", "hex", "rand", "zeroize"]
asm = ["encryption_asm", "ffi", "hashes_asm", "serde", "signatures_asm"]
benchmarkaescbc = ["openssl"]
benchmarkaesgcm = ["openssl"]
benchmarked25519 = ["ed25519"]
benchmarksecp256k1 = ["bitcoinsecp256k1", "openssl"]
benchmarkxchacha20poly1305 = ["chacha20poly1305"]
bls_bls12381 = ["amcl_wrapper", "hex", "hkdf", "sha2/std", "zeroize"]
bls_bn254 = ["amcl", "failure", "log", "rand", "sha2/std", "sha3"]
bls_bn254_asm = ["amcl", "failure", "log", "rand", "sha2/asm", "sha3"]
cl = ["amcl", "failure", "glass_pumpkin", "int_traits", "lazy_static", "log", "num-bigint", "num-integer", "num-traits", "rand", "sha2/std"]
cl_onchain = ["amcl_onchain", "failure", "lazy_static", "log", "num-bigint-onchain", "num-integer", "num-traits", "sha2/std"]
cl_native = ["amcl", "failure", "int_traits", "lazy_static", "log", "openssl", "rand"]
chacha20poly1305 = ["aead", "hex", "rand", "rustchacha20poly1305", "zeroize"]
chacha20poly1305_native = ["chacha20poly1305"]
ecdh_secp256k1 = ["amcl", "arrayref", "failure", "hex", "rand", "rand_chacha", "k256", "sha2/std", "zeroize"]
ecdh_secp256k1_native = ["arrayref", "failure", "hex", "log", "rand", "bitcoinsecp256k1", "rand_chacha", "sha2/std", "zeroize"]
ecdh_secp256k1_asm = ["arrayref", "failure", "hex", "log", "rand", "bitcoinsecp256k1", "rand_chacha", "sha2/asm", "zeroize"]
ecdsa_secp256k1 = ["amcl", "arrayref", "failure", "hex", "rand", "rand_chacha", "k256", "sha2/std", "zeroize"]
ecdsa_secp256k1_native = ["arrayref", "failure", "hex", "log", "rand", "bitcoinsecp256k1", "rand_chacha", "sha2/std", "zeroize"]
ecdsa_secp256k1_asm = ["arrayref", "failure", "hex", "log", "rand", "bitcoinsecp256k1", "rand_chacha", "sha2/asm", "zeroize"]
ed25519 = ["arrayref", "ed25519-dalek/std", "ed25519-dalek/u64_backend", "hex", "rand", "rand_chacha", "sha2/std", "zeroize"]
ed25519_asm = ["arrayref", "ed25519-dalek/nightly", "ed25519-dalek/simd_backend", "hex", "rand", "rand_chacha", "sha2/asm", "zeroize"]
encryption = ["aescbc", "aesgcm", "chacha20poly1305"]
encryption_asm = ["aescbc_native", "aesgcm_native", "chacha20poly1305"]
ffi = ["failure", "ffi-support", "logger", "serde", "serde_json"]
hashes = ["blake2/std", "sha2/std", "sha3"]
hashes_asm = ["blake2/simd_asm", "sha2/asm", "sha3"]
kex = ["ecdh_secp256k1", "x25519"]
kex_native = ["ecdh_secp256k1_native", "x25519"]
kex_asm = ["ecdh_secp256k1_asm", "x25519_asm"]
logger = ["env_logger", "log"]
portable = ["clear_on_drop/no_cc", "encryption", "hashes", "kex", "serde", "signatures", "sharing"]
portable_wasm = ["portable", "wasm"]
sharing = ["failure", "glass_pumpkin", "int_traits", "lazy_static", "num-bigint", "num-integer", "num-traits", "log", "rand", "sha2/std"]
sharing_native = ["failure", "int_traits", "lazy_static", "log", "openssl", "rand"]
signatures = ["cl", "ed25519", "ecdsa_secp256k1", "bls_bls12381", "bls_bn254"]
signatures_native = ["cl_native", "ed25519", "ecdsa_secp256k1_native", "bls_bls12381", "bls_bn254"]
signatures_asm = ["cl_native", "ed25519_asm", "ecdsa_secp256k1_asm", "bls_bls12381", "bls_bn254_asm"]
wasm = ["console_error_panic_hook", "failure", "hex", "js-sys", "log", "rand/wasm-bindgen", "serde", "serde_json", "wasm-bindgen", "zeroize"]
x25519 = ["arrayref", "curve25519-dalek/std", "curve25519-dalek/u64_backend", "hex", "rand", "rand_chacha", "sha2/std", "x25519-dalek/std", "x25519-dalek/u64_backend", "zeroize"]
x25519_asm = ["arrayref", "curve25519-dalek/nightly", "curve25519-dalek/avx2_backend", "hex", "rand", "rand_chacha", "sha2/asm", "x25519-dalek/nightly", "x25519-dalek/u64_backend", "zeroize"]
[dependencies]
aead = { version = "0.3", optional = true }
aes = { version = "0.6", optional = true }
aes-gcm = { version = "0.8", optional = true }
amcl = { version = "0.2", optional = true, default-features = false, features = ["bn254"]}
amcl_onchain = { package = "amcl", git = "https://github.com/whalelephant/incubator-milagro-crypto-rust", branch = "onchain", default-features = false, features = ["onchain"], optional = true}
amcl_wrapper = {version = "0.4.0", features = ["bls381"], optional = true }
arrayref = { version = "0.3.5", optional = true }
blake2 = { version = "0.9", default-features = false, optional = true }
block-modes = { version = "0.7", optional = true }
block-padding = { version = "0.2", optional = true }
clear_on_drop = { version = "0.2.4", optional = true }
console_error_panic_hook = { version = "0.1.5", optional = true }
curve25519-dalek = { version = "3.1", default-features = false, optional = true }
ed25519-dalek = { version = "1.0", default-features = false, optional = true }
env_logger = { version = "0.7.0", optional = true }
failure = { version = "0.1.6", optional = true }
ffi-support = { version = "0.4", optional = true }
glass_pumpkin = { version = "0.4", optional = true }
hex = { version = "0.4.0", optional = true }
hkdf = { version = "0.11.0", optional = true }
hmac = { version = "0.11.0", optional = true }
int_traits = { version = "0.1.1", optional = true }
js-sys = { version = "0.3.13", optional = true }
lazy_static = { version = "1.4", optional = true }
log = { version = "0.4.8", optional = true }
num-bigint = { version = "0.3.0", features = ["rand"], optional = true}
num-bigint-onchain = { git = "https://github.com/whalelephant/num-bigint", rev = "d74a4d6", package = "num-bigint", default-features = false, features = ["no-f64-convert-opcode"], version = "0.3.0", optional = true}
num-integer = { version = "=0.1.42", optional = true }
num-traits = { version = "=0.2.11", optional = true, default-features = false }
openssl = { version = "0.10", optional = true }
# TODO: Find out if the wasm-bindgen feature can be made dependent on our own wasm feature
rand = { version = "0.7", features = ["wasm-bindgen"], optional = true }
rand_chacha = { version = "=0.2.1", optional = true }
rustchacha20poly1305 = { version = "0.7", package = "chacha20poly1305", optional = true }
k256 = { version = "0.9.6", optional = true, features = ["ecdh", "ecdsa", "sha256"]}
bitcoinsecp256k1 = { version = "0.19", package = "secp256k1", optional = true, features = ["rand", "serde"]}
serde = { version = "1.0", features = ["derive"], optional = true}
serde_json = { version = "1.0", optional = true }
sha2 = { version = "0.9.5", default-features = false, optional = true }
sha3 = { version = "0.9.1", optional = true }
subtle = { version = "2.3", optional = true }
wasm-bindgen = { version = "0.2", optional = true, features = ["serde-serialize"] }
x25519-dalek = { version = "1.1", optional = true, default-features = false }
zeroize = { version = "1.1", features = ["zeroize_derive"], optional = true }
[dev-dependencies]
bytebuffer-rs = "0.3.0"
criterion = "0.3"
openssl = "0.10"
k256 = { version = "0.9.6"}
bitcoinsecp256k1 = { version = "0.19", package = "secp256k1"}
serde_json = "1.0"
[[bench]]
name = "cks_revok"
harness = false
[[bench]]
name = "encryption"
harness = false
[[bench]]
name = "bls"
harness = false
[package.metadata.deb]
maintainer = "Hyperledger"
license-file = ["../LICENSE", "0"]
copyright = "2019, Hyperledger"
depends = "$auto"
extended-description = """\
Rust written reliable, secure, easy-to-use, and pluggable cryptographic implementations."""
section = "admin"
revision = "1"
priority = "optional"
assets = [
["../target/release/libursa.a", "usr/lib/libursa.a", "644"],
["../target/release/libursa.so", "usr/lib/libursa.so", "644"],
["include/ursa_crypto.h", "usr/include/ursa/ursa_crypto.h", "644"],
["include/ursa_crypto_ed25519.h", "usr/include/ursa/ursa_crypto_ed25519.h", "644"]
]
[package.metadata.rpm]
maintainer = "Hyperledger"
license-file = ["../LICENSE", "0"]
copyright = "2018, Hyperledger"
depends = "$auto"
extended-description = """\
Rust written reliable, secure, easy-to-use, and pluggable cryptographic implementations."""
section = "admin"
revision = "1"
priority = "optional"