1 | [package] |
2 | authors = ["Brian Smith <brian@briansmith.org>" ] |
3 | build = "build.rs" |
4 | categories = ["cryptography" , "no-std" ] |
5 | description = "Safe, fast, small crypto using Rust." |
6 | edition = "2021" |
7 | keywords = ["crypto" , "cryptography" , "rand" , "ECC" , "RSA" ] |
8 | license-file = "LICENSE" |
9 | name = "ring" |
10 | repository = "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 |
14 | rust-version = "1.63.0" |
15 | |
16 | # Keep in sync with `links` below. |
17 | version = "0.17.9" |
18 | |
19 | # Keep in sync with `version` above. |
20 | # |
21 | # build.rs verifies that this equals "ring_core_{major}_{minor}_{patch}_{pre}" |
22 | # as keeping this in sync with the symbol prefixing is crucial for ensuring |
23 | # the safety of multiple versions of *ring* being used in a program. |
24 | links = "ring_core_0_17_9_" |
25 | |
26 | include = [ |
27 | "LICENSE" , |
28 | "Cargo.toml" , |
29 | |
30 | "pregenerated/*" , |
31 | |
32 | "benches/*.rs" , |
33 | "build.rs" , |
34 | |
35 | "crypto/chacha/asm/chacha-armv4.pl" , |
36 | "crypto/chacha/asm/chacha-armv8.pl" , |
37 | "crypto/chacha/asm/chacha-x86.pl" , |
38 | "crypto/chacha/asm/chacha-x86_64.pl" , |
39 | "crypto/cipher_extra/test/aes_128_gcm_siv_tests.txt" , |
40 | "crypto/cipher_extra/test/aes_256_gcm_siv_tests.txt" , |
41 | "crypto/constant_time_test.c" , |
42 | "crypto/cpu_intel.c" , |
43 | "crypto/crypto.c" , |
44 | "crypto/curve25519/asm/x25519-asm-arm.S" , |
45 | "crypto/curve25519/curve25519.c" , |
46 | "crypto/curve25519/curve25519_64_adx.c" , |
47 | "crypto/curve25519/curve25519_tables.h" , |
48 | "crypto/curve25519/internal.h" , |
49 | "crypto/fipsmodule/aes/aes_nohw.c" , |
50 | "crypto/fipsmodule/aes/asm/aesni-x86.pl" , |
51 | "crypto/fipsmodule/aes/asm/aesni-x86_64.pl" , |
52 | "crypto/fipsmodule/aes/asm/aesv8-armx.pl" , |
53 | "crypto/fipsmodule/aes/asm/bsaes-armv7.pl" , |
54 | "crypto/fipsmodule/aes/asm/bsaes-x86_64.pl" , |
55 | "crypto/fipsmodule/aes/asm/vsaes-armv7.pl" , |
56 | "crypto/fipsmodule/aes/asm/vpaes-armv7.pl" , |
57 | "crypto/fipsmodule/aes/asm/vpaes-armv8.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-neon-armv8.pl" , |
87 | "crypto/fipsmodule/modes/asm/ghash-x86.pl" , |
88 | "crypto/fipsmodule/modes/asm/ghash-x86_64.pl" , |
89 | "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" , |
90 | "crypto/fipsmodule/modes/asm/aesv8-gcm-armv8.pl" , |
91 | "crypto/fipsmodule/sha/asm/sha256-armv4.pl" , |
92 | "crypto/fipsmodule/sha/asm/sha512-armv4.pl" , |
93 | "crypto/fipsmodule/sha/asm/sha512-armv8.pl" , |
94 | "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" , |
95 | "crypto/internal.h" , |
96 | "crypto/limbs/limbs.c" , |
97 | "crypto/limbs/limbs.h" , |
98 | "crypto/limbs/limbs.inl" , |
99 | "crypto/mem.c" , |
100 | "crypto/perlasm/arm-xlate.pl" , |
101 | "crypto/perlasm/x86asm.pl" , |
102 | "crypto/perlasm/x86gas.pl" , |
103 | "crypto/perlasm/x86nasm.pl" , |
104 | "crypto/perlasm/x86_64-xlate.pl" , |
105 | "crypto/poly1305/poly1305.c" , |
106 | "crypto/poly1305/poly1305_arm.c" , |
107 | "crypto/poly1305/poly1305_arm_asm.S" , |
108 | "crypto/cipher_extra/asm/chacha20_poly1305_armv8.pl" , |
109 | "crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl" , |
110 | "examples/**/*.rs" , |
111 | "include/ring-core/aes.h" , |
112 | "include/ring-core/arm_arch.h" , |
113 | "include/ring-core/asm_base.h" , |
114 | "include/ring-core/base.h" , |
115 | "include/ring-core/check.h" , |
116 | "include/ring-core/mem.h" , |
117 | "include/ring-core/target.h" , |
118 | "include/ring-core/type_check.h" , |
119 | "src/**/*.rs" , |
120 | "src/aead/poly1305_test.txt" , |
121 | "src/data/alg-rsa-encryption.der" , |
122 | "src/ec/curve25519/ed25519/ed25519_pkcs8_v2_template.der" , |
123 | "src/ec/suite_b/ecdsa/ecPublicKey_p256_pkcs8_v1_template.der" , |
124 | "src/ec/suite_b/ecdsa/ecPublicKey_p384_pkcs8_v1_template.der" , |
125 | "src/rsa/signature_rsa_example_private_key.der" , |
126 | "src/rsa/signature_rsa_example_public_key.der" , |
127 | "tests/**/*.rs" , |
128 | "tests/ecdsa_test_private_key_p256.p8" , |
129 | "tests/ecdsa_test_public_key_p256.der" , |
130 | "tests/ecdsa_test_public_key_p256_debug.txt" , |
131 | "tests/ed25519_test_private_key.bin" , |
132 | "tests/ed25519_test_private_key.p8" , |
133 | "tests/ed25519_test_public_key.bin" , |
134 | "tests/ed25519_test_public_key.der" , |
135 | "tests/rsa_test_private_key_2048.p8" , |
136 | "tests/rsa_test_public_key_2048.der" , |
137 | "tests/rsa_test_public_key_2048_debug.txt" , |
138 | "tests/rsa_test_public_modulus.bin" , |
139 | "third_party/fiat/asm/fiat_curve25519_adx_mul.S" , |
140 | "third_party/fiat/asm/fiat_curve25519_adx_square.S" , |
141 | "third_party/fiat/curve25519_32.h" , |
142 | "third_party/fiat/curve25519_64.h" , |
143 | "third_party/fiat/curve25519_64_adx.h" , |
144 | "third_party/fiat/curve25519_64_msvc.h" , |
145 | "third_party/fiat/p256_32.h" , |
146 | "third_party/fiat/p256_64.h" , |
147 | "third_party/fiat/p256_64_msvc.h" , |
148 | "third_party/fiat/LICENSE" , |
149 | ] |
150 | |
151 | [package.metadata.docs.rs] |
152 | all-features = true |
153 | |
154 | [lib] |
155 | name = "ring" |
156 | |
157 | [dependencies] |
158 | cfg-if = { version = "1.0.0" , default-features = false } |
159 | getrandom = { version = "0.2.10" } |
160 | untrusted = { version = "0.9" } |
161 | |
162 | [target.'cfg(all(any(all(target_arch = "aarch64", target_endian = "little"), all(target_arch = "arm", target_endian = "little")), any(target_os = "android", target_os = "linux")))'.dependencies] |
163 | libc = { version = "0.2.148" , default-features = false } |
164 | |
165 | [target.'cfg(all(all(target_arch = "aarch64", target_endian = "little"), target_vendor = "apple", any(target_os = "ios", target_os = "macos", target_os = "tvos", target_os = "visionos", target_os = "watchos")))'.dependencies] |
166 | libc = { version = "0.2.155" , default-features = false } |
167 | |
168 | [target.'cfg(all(all(target_arch = "aarch64", target_endian = "little"), target_os = "windows"))'.dependencies] |
169 | windows-sys = { version = "0.52" , features = ["Win32_Foundation" , "Win32_System_Threading" ] } |
170 | |
171 | [target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies] |
172 | wasm-bindgen-test = { version = "0.3.37" , default-features = false, features = ["std" ] } |
173 | |
174 | [target.'cfg(any(unix, windows, target_os = "wasi"))'.dev-dependencies] |
175 | libc = { version = "0.2.148" , default-features = false } |
176 | |
177 | [build-dependencies] |
178 | cc = { version = "1.0.83" , default-features = false } |
179 | |
180 | # At least 1.0.93 is requried for visionOS, but some versions around that point |
181 | # have bugs that seem to have been fixed in 1.0.97 or so. |
182 | [target.'cfg(all(target_vendor = "apple", target_os = "visionos"))'.build-dependencies] |
183 | cc = { version = "1.0.97" , default-features = false } |
184 | |
185 | [features] |
186 | # These features are documented in the top-level module's documentation. |
187 | default = ["alloc" , "dev_urandom_fallback" ] |
188 | alloc = [] |
189 | dev_urandom_fallback = [] |
190 | less-safe-getrandom-custom-or-rdrand = [] |
191 | less-safe-getrandom-espidf = [] |
192 | slow_tests = [] |
193 | std = ["alloc" ] |
194 | unstable-testing-arm-no-hw = [] |
195 | unstable-testing-arm-no-neon = [] |
196 | test_logging = [] |
197 | wasm32_unknown_unknown_js = ["getrandom/js" ] |
198 | |
199 | # XXX: debug = false because of https://github.com/rust-lang/rust/issues/34122 |
200 | |
201 | [profile.bench] |
202 | opt-level = 3 |
203 | debug = false |
204 | rpath = false |
205 | lto = true |
206 | debug-assertions = false |
207 | codegen-units = 1 |
208 | |
209 | [profile.release] |
210 | opt-level = 3 |
211 | debug = false |
212 | rpath = false |
213 | lto = true |
214 | debug-assertions = false |
215 | codegen-units = 1 |
216 | |
217 | [workspace] |
218 | members = [ |
219 | # intentionally not a default member so that `cargo test` doesn't cause criterion.rs and all its |
220 | # dependencies to get built. |
221 | "bench" , |
222 | |
223 | "cavp" , |
224 | ] |
225 | default-members = [ |
226 | "." , |
227 | "cavp" |
228 | ] |
229 | |