1[package]
2authors = ["Brian Smith <brian@briansmith.org>"]
3build = "build.rs"
4categories = ["cryptography", "no-std"]
5description = "Safe, fast, small crypto using Rust."
6edition = "2021"
7keywords = ["crypto", "cryptography", "rand", "ECC", "RSA"]
8license-file = "LICENSE"
9name = "ring"
10repository = "https://github.com/briansmith/ring"
11
12# Keep in sync with .github/workflows/ci.yml ("MSRV") and see the MSRV note
13# in cpu/arm.rs
14rust-version = "1.61.0"
15
16# Keep in sync with `links` below.
17version = "0.17.8"
18
19# Keep in sync with `version` above.
20#
21# "ring_core_" + version, replacing punctuation with underscores.
22#
23# build.rs uses this to derive the prefix for FFI symbols and the file names
24# of the FFI libraries, so it must be a valid identifier prefix and a valid
25# filename prefix.
26links = "ring_core_0_17_8"
27
28include = [
29 "LICENSE",
30 "Cargo.toml",
31
32 "pregenerated/*",
33
34 "benches/*.rs",
35 "build.rs",
36
37 "crypto/chacha/asm/chacha-armv4.pl",
38 "crypto/chacha/asm/chacha-armv8.pl",
39 "crypto/chacha/asm/chacha-x86.pl",
40 "crypto/chacha/asm/chacha-x86_64.pl",
41 "crypto/cipher_extra/test/aes_128_gcm_siv_tests.txt",
42 "crypto/cipher_extra/test/aes_256_gcm_siv_tests.txt",
43 "crypto/constant_time_test.c",
44 "crypto/cpu_intel.c",
45 "crypto/crypto.c",
46 "crypto/curve25519/asm/x25519-asm-arm.S",
47 "crypto/curve25519/curve25519.c",
48 "crypto/curve25519/curve25519_64_adx.c",
49 "crypto/curve25519/curve25519_tables.h",
50 "crypto/curve25519/internal.h",
51 "crypto/fipsmodule/aes/aes_nohw.c",
52 "crypto/fipsmodule/aes/asm/aesni-x86.pl",
53 "crypto/fipsmodule/aes/asm/aesni-x86_64.pl",
54 "crypto/fipsmodule/aes/asm/aesv8-armx.pl",
55 "crypto/fipsmodule/aes/asm/bsaes-armv7.pl",
56 "crypto/fipsmodule/aes/asm/bsaes-x86_64.pl",
57 "crypto/fipsmodule/aes/asm/vsaes-armv7.pl",
58 "crypto/fipsmodule/aes/asm/vpaes-x86.pl",
59 "crypto/fipsmodule/aes/asm/vpaes-x86_64.pl",
60 "crypto/fipsmodule/bn/asm/armv4-mont.pl",
61 "crypto/fipsmodule/bn/asm/armv8-mont.pl",
62 "crypto/fipsmodule/bn/asm/x86-mont.pl",
63 "crypto/fipsmodule/bn/asm/x86_64-mont.pl",
64 "crypto/fipsmodule/bn/asm/x86_64-mont5.pl",
65 "crypto/fipsmodule/bn/internal.h",
66 "crypto/fipsmodule/bn/montgomery.c",
67 "crypto/fipsmodule/bn/montgomery_inv.c",
68 "crypto/fipsmodule/ec/asm/p256-armv8-asm.pl",
69 "crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl",
70 "crypto/fipsmodule/ec/ecp_nistz.c",
71 "crypto/fipsmodule/ec/ecp_nistz.h",
72 "crypto/fipsmodule/ec/ecp_nistz384.h",
73 "crypto/fipsmodule/ec/ecp_nistz384.inl",
74 "crypto/fipsmodule/ec/gfp_p256.c",
75 "crypto/fipsmodule/ec/gfp_p384.c",
76 "crypto/fipsmodule/ec/p256.c",
77 "crypto/fipsmodule/ec/p256-nistz-table.h",
78 "crypto/fipsmodule/ec/p256-nistz.c",
79 "crypto/fipsmodule/ec/p256-nistz.h",
80 "crypto/fipsmodule/ec/p256_shared.h",
81 "crypto/fipsmodule/ec/p256_table.h",
82 "crypto/fipsmodule/ec/util.h",
83 "crypto/fipsmodule/ecdsa/ecdsa_verify_tests.txt",
84 "crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl",
85 "crypto/fipsmodule/modes/asm/ghash-armv4.pl",
86 "crypto/fipsmodule/modes/asm/ghash-x86.pl",
87 "crypto/fipsmodule/modes/asm/ghash-x86_64.pl",
88 "crypto/fipsmodule/modes/asm/ghashv8-armx.pl",
89 "crypto/fipsmodule/modes/asm/aesv8-gcm-armv8.pl",
90 "crypto/fipsmodule/sha/asm/sha256-armv4.pl",
91 "crypto/fipsmodule/sha/asm/sha512-armv4.pl",
92 "crypto/fipsmodule/sha/asm/sha512-armv8.pl",
93 "crypto/fipsmodule/sha/asm/sha512-x86_64.pl",
94 "crypto/internal.h",
95 "crypto/limbs/limbs.c",
96 "crypto/limbs/limbs.h",
97 "crypto/limbs/limbs.inl",
98 "crypto/mem.c",
99 "crypto/perlasm/arm-xlate.pl",
100 "crypto/perlasm/x86asm.pl",
101 "crypto/perlasm/x86gas.pl",
102 "crypto/perlasm/x86nasm.pl",
103 "crypto/perlasm/x86_64-xlate.pl",
104 "crypto/poly1305/internal.h",
105 "crypto/poly1305/poly1305.c",
106 "crypto/poly1305/poly1305_arm.c",
107 "crypto/poly1305/poly1305_arm_asm.S",
108 "crypto/poly1305/poly1305_vec.c",
109 "crypto/cipher_extra/asm/chacha20_poly1305_armv8.pl",
110 "crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl",
111 "examples/**/*.rs",
112 "include/ring-core/aes.h",
113 "include/ring-core/arm_arch.h",
114 "include/ring-core/asm_base.h",
115 "include/ring-core/base.h",
116 "include/ring-core/check.h",
117 "include/ring-core/mem.h",
118 "include/ring-core/poly1305.h",
119 "include/ring-core/target.h",
120 "include/ring-core/type_check.h",
121 "src/**/*.rs",
122 "src/aead/poly1305_test.txt",
123 "src/data/alg-rsa-encryption.der",
124 "src/ec/curve25519/ed25519/ed25519_pkcs8_v2_template.der",
125 "src/ec/suite_b/ecdsa/ecPublicKey_p256_pkcs8_v1_template.der",
126 "src/ec/suite_b/ecdsa/ecPublicKey_p384_pkcs8_v1_template.der",
127 "src/rsa/signature_rsa_example_private_key.der",
128 "src/rsa/signature_rsa_example_public_key.der",
129 "tests/**/*.rs",
130 "tests/ecdsa_test_private_key_p256.p8",
131 "tests/ecdsa_test_public_key_p256.der",
132 "tests/ecdsa_test_public_key_p256_debug.txt",
133 "tests/ed25519_test_private_key.bin",
134 "tests/ed25519_test_private_key.p8",
135 "tests/ed25519_test_public_key.bin",
136 "tests/ed25519_test_public_key.der",
137 "tests/rsa_test_private_key_2048.p8",
138 "tests/rsa_test_public_key_2048.der",
139 "tests/rsa_test_public_key_2048_debug.txt",
140 "tests/rsa_test_public_modulus.bin",
141 "third_party/fiat/asm/fiat_curve25519_adx_mul.S",
142 "third_party/fiat/asm/fiat_curve25519_adx_square.S",
143 "third_party/fiat/curve25519_32.h",
144 "third_party/fiat/curve25519_64.h",
145 "third_party/fiat/curve25519_64_adx.h",
146 "third_party/fiat/curve25519_64_msvc.h",
147 "third_party/fiat/p256_32.h",
148 "third_party/fiat/p256_64.h",
149 "third_party/fiat/p256_64_msvc.h",
150 "third_party/fiat/LICENSE",
151 "third_party/NIST/SHAVS/SHA1LongMsg.rsp",
152 "third_party/NIST/SHAVS/SHA1Monte.rsp",
153 "third_party/NIST/SHAVS/SHA1ShortMsg.rsp",
154 "third_party/NIST/SHAVS/SHA224LongMsg.rsp",
155 "third_party/NIST/SHAVS/SHA224Monte.rsp",
156 "third_party/NIST/SHAVS/SHA224ShortMsg.rsp",
157 "third_party/NIST/SHAVS/SHA256LongMsg.rsp",
158 "third_party/NIST/SHAVS/SHA256Monte.rsp",
159 "third_party/NIST/SHAVS/SHA256ShortMsg.rsp",
160 "third_party/NIST/SHAVS/SHA384LongMsg.rsp",
161 "third_party/NIST/SHAVS/SHA384Monte.rsp",
162 "third_party/NIST/SHAVS/SHA384ShortMsg.rsp",
163 "third_party/NIST/SHAVS/SHA512LongMsg.rsp",
164 "third_party/NIST/SHAVS/SHA512Monte.rsp",
165 "third_party/NIST/SHAVS/SHA512ShortMsg.rsp",
166]
167
168[package.metadata.docs.rs]
169all-features = true
170
171[lib]
172name = "ring"
173
174[dependencies]
175cfg-if = { version = "1.0.0", default-features = false }
176getrandom = { version = "0.2.10" }
177untrusted = { version = "0.9" }
178
179[target.'cfg(any(target_arch = "aarch64", target_arch = "arm", target_arch = "x86",target_arch = "x86_64"))'.dependencies]
180spin = { version = "0.9.8", default-features = false, features = ["once"] }
181
182[target.'cfg(all(any(target_os = "android", target_os = "linux"), any(target_arch = "aarch64", target_arch = "arm")))'.dependencies]
183libc = { version = "0.2.148", default-features = false }
184
185[target.'cfg(all(target_arch = "aarch64", target_os = "windows"))'.dependencies]
186windows-sys = { version = "0.52", features = ["Win32_Foundation", "Win32_System_Threading"] }
187
188[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies]
189wasm-bindgen-test = { version = "0.3.37", default-features = false }
190
191[target.'cfg(any(unix, windows, target_os = "wasi"))'.dev-dependencies]
192libc = { version = "0.2.148", default-features = false }
193
194[build-dependencies]
195cc = { version = "1.0.83", default-features = false }
196
197[features]
198# These features are documented in the top-level module's documentation.
199default = ["alloc", "dev_urandom_fallback"]
200alloc = []
201dev_urandom_fallback = []
202less-safe-getrandom-custom-or-rdrand = []
203slow_tests = []
204std = ["alloc"]
205unstable-testing-arm-no-hw = []
206unstable-testing-arm-no-neon = []
207test_logging = []
208wasm32_unknown_unknown_js = ["getrandom/js"]
209
210# XXX: debug = false because of https://github.com/rust-lang/rust/issues/34122
211
212[profile.bench]
213opt-level = 3
214debug = false
215rpath = false
216lto = true
217debug-assertions = false
218codegen-units = 1
219
220[profile.release]
221opt-level = 3
222debug = false
223rpath = false
224lto = true
225debug-assertions = false
226codegen-units = 1
227
228[workspace]
229members = [
230 # intentionally not a default member so that `cargo test` doesn't cause criterion.rs and all its
231 # dependencies to get built.
232 "bench",
233]
234