1[package]
2authors = ["Brian Smith <brian@briansmith.org>"]
3build = "build.rs"
4categories = ["cryptography", "no-std"]
5description = "Safe, fast, small crypto using Rust."
6documentation = "https://briansmith.org/rustdoc/ring/"
7edition = "2018"
8keywords = ["crypto", "cryptography", "rand", "ECC", "RSA"]
9license-file = "LICENSE"
10name = "ring"
11readme = "doc/link-to-readme.md"
12repository = "https://github.com/briansmith/ring"
13version = "0.14.6"
14
15# Prevent multiple versions of *ring* from being linked into the same program.
16links = "ring-asm"
17
18exclude = [
19    # The presence of .gitignore is used to differentiate non-packaged builds
20    # from packaged builds in build.rs.
21    ".gitignore",
22    "pregenerated/tmp",
23]
24include = [
25    "LICENSE",
26    "Cargo.toml",
27
28    "pregenerated/*",
29
30    "build.rs",
31
32    "crypto/block.c",
33    "crypto/block.h",
34    "crypto/chacha/asm/chacha-armv4.pl",
35    "crypto/chacha/asm/chacha-armv8.pl",
36    "crypto/chacha/asm/chacha-x86.pl",
37    "crypto/chacha/asm/chacha-x86_64.pl",
38    "crypto/cipher_extra/asm/aes128gcmsiv-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/fipsmodule/aes/aes.c",
46    "crypto/fipsmodule/aes/asm/aes-586.pl",
47    "crypto/fipsmodule/aes/asm/aes-armv4.pl",
48    "crypto/fipsmodule/aes/asm/aes-x86_64.pl",
49    "crypto/fipsmodule/aes/asm/aesni-x86.pl",
50    "crypto/fipsmodule/aes/asm/aesni-x86_64.pl",
51    "crypto/fipsmodule/aes/asm/aesv8-armx.pl",
52    "crypto/fipsmodule/aes/asm/bsaes-armv7.pl",
53    "crypto/fipsmodule/aes/asm/bsaes-x86_64.pl",
54    "crypto/fipsmodule/aes/asm/vpaes-x86.pl",
55    "crypto/fipsmodule/aes/asm/vpaes-x86_64.pl",
56    "crypto/fipsmodule/bn/asm/armv4-mont.pl",
57    "crypto/fipsmodule/bn/asm/armv8-mont.pl",
58    "crypto/fipsmodule/bn/asm/x86-mont.pl",
59    "crypto/fipsmodule/bn/asm/x86_64-mont.pl",
60    "crypto/fipsmodule/bn/asm/x86_64-mont5.pl",
61    "crypto/fipsmodule/bn/generic.c",
62    "crypto/fipsmodule/bn/internal.h",
63    "crypto/fipsmodule/bn/montgomery.c",
64    "crypto/fipsmodule/bn/montgomery_inv.c",
65    "crypto/fipsmodule/ec/asm/ecp_nistz256-armv4.pl",
66    "crypto/fipsmodule/ec/asm/ecp_nistz256-armv8.pl",
67    "crypto/fipsmodule/ec/asm/ecp_nistz256-x86.pl",
68    "crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl",
69    "crypto/fipsmodule/ec/ecp_nistz.c",
70    "crypto/fipsmodule/ec/ecp_nistz.h",
71    "crypto/fipsmodule/ec/ecp_nistz256.c",
72    "crypto/fipsmodule/ec/ecp_nistz256.h",
73    "crypto/fipsmodule/ec/ecp_nistz256_table.inl",
74    "crypto/fipsmodule/ec/ecp_nistz384.h",
75    "crypto/fipsmodule/ec/ecp_nistz384.inl",
76    "crypto/fipsmodule/ec/gfp_p256.c",
77    "crypto/fipsmodule/ec/gfp_p384.c",
78    "crypto/fipsmodule/ecdsa/ecdsa_verify_tests.txt",
79    "crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl",
80    "crypto/fipsmodule/modes/asm/ghash-armv4.pl",
81    "crypto/fipsmodule/modes/asm/ghash-x86.pl",
82    "crypto/fipsmodule/modes/asm/ghash-x86_64.pl",
83    "crypto/fipsmodule/modes/asm/ghashv8-armx.pl",
84    "crypto/fipsmodule/modes/gcm.c",
85    "crypto/fipsmodule/modes/internal.h",
86    "crypto/fipsmodule/sha/asm/sha256-586.pl",
87    "crypto/fipsmodule/sha/asm/sha256-armv4.pl",
88    "crypto/fipsmodule/sha/asm/sha512-586.pl",
89    "crypto/fipsmodule/sha/asm/sha512-armv4.pl",
90    "crypto/fipsmodule/sha/asm/sha512-armv8.pl",
91    "crypto/fipsmodule/sha/asm/sha512-x86_64.pl",
92    "crypto/internal.h",
93    "crypto/limbs/limbs.c",
94    "crypto/limbs/limbs.h",
95    "crypto/limbs/limbs.inl",
96    "crypto/mem.c",
97    "crypto/perlasm/arm-xlate.pl",
98    "crypto/perlasm/x86asm.pl",
99    "crypto/perlasm/x86gas.pl",
100    "crypto/perlasm/x86nasm.pl",
101    "crypto/perlasm/x86_64-xlate.pl",
102    "crypto/poly1305/asm/poly1305-armv4.pl",
103    "crypto/poly1305/asm/poly1305-armv8.pl",
104    "crypto/poly1305/asm/poly1305-x86.pl",
105    "crypto/poly1305/asm/poly1305-x86_64.pl",
106    "examples/checkdigest.rs",
107    "include/GFp/aes.h",
108    "include/GFp/arm_arch.h",
109    "include/GFp/base.h",
110    "include/GFp/cpu.h",
111    "include/GFp/mem.h",
112    "include/GFp/type_check.h",
113    "src/aead.rs",
114    "src/aead/aes.rs",
115    "src/aead/aes_gcm.rs",
116    "src/aead/aes_tests.txt",
117    "src/aead/block.rs",
118    "src/aead/chacha.rs",
119    "src/aead/chacha_tests.txt",
120    "src/aead/chacha20_poly1305.rs",
121    "src/aead/chacha20_poly1305_openssh.rs",
122    "src/aead/gcm.rs",
123    "src/aead/nonce.rs",
124    "src/aead/poly1305.rs",
125    "src/aead/poly1305_test.txt",
126    "src/aead/quic.rs",
127    "src/aead/shift.rs",
128    "src/agreement.rs",
129    "src/arithmetic.rs",
130    "src/arithmetic/montgomery.rs",
131    "src/array.rs",
132    "src/bits.rs",
133    "src/bssl.rs",
134    "src/c.rs",
135    "src/constant_time.rs",
136    "src/cpu.rs",
137    "src/data/alg-rsa-encryption.der",
138    "src/debug.rs",
139    "src/digest.rs",
140    "src/digest/sha1.rs",
141    "src/ec/curve25519/ed25519/digest.rs",
142    "src/ec/curve25519/ed25519.rs",
143    "src/ec/curve25519/ed25519/signing.rs",
144    "src/ec/curve25519/ed25519/verification.rs",
145    "src/ec/curve25519/ed25519/ed25519_pkcs8_v2_template.der",
146    "src/ec/curve25519.rs",
147    "src/ec/curve25519/ops.rs",
148    "src/ec/curve25519/x25519.rs",
149    "src/ec.rs",
150    "src/ec/keys.rs",
151    "src/ec/suite_b/curve.rs",
152    "src/ec/suite_b/ecdh.rs",
153    "src/ec/suite_b/ecdsa/digest_scalar.rs",
154    "src/ec/suite_b/ecdsa.rs",
155    "src/ec/suite_b/ecdsa/signing.rs",
156    "src/ec/suite_b/ecdsa/verification.rs",
157    "src/ec/suite_b/ecdsa/ecdsa_digest_scalar_tests.txt",
158    "src/ec/suite_b/ecdsa/ecPublicKey_p256_pkcs8_v1_template.der",
159    "src/ec/suite_b/ecdsa/ecPublicKey_p384_pkcs8_v1_template.der",
160    "src/ec/suite_b/ecdsa/ecdsa_sign_asn1_tests.txt",
161    "src/ec/suite_b/ecdsa/ecdsa_sign_fixed_tests.txt",
162    "src/ec/suite_b.rs",
163    "src/ec/suite_b/ops/elem.rs",
164    "src/ec/suite_b/ops.rs",
165    "src/ec/suite_b/ops/p256.rs",
166    "src/ec/suite_b/ops/p256_elem_mul_tests.txt",
167    "src/ec/suite_b/ops/p256_elem_neg_tests.txt",
168    "src/ec/suite_b/ops/p256_elem_sum_tests.txt",
169    "src/ec/suite_b/ops/p256_point_double_tests.txt",
170    "src/ec/suite_b/ops/p256_point_mul_base_tests.txt",
171    "src/ec/suite_b/ops/p256_point_mul_serialized_tests.txt",
172    "src/ec/suite_b/ops/p256_point_mul_tests.txt",
173    "src/ec/suite_b/ops/p256_point_sum_mixed_tests.txt",
174    "src/ec/suite_b/ops/p256_point_sum_tests.txt",
175    "src/ec/suite_b/ops/p256_scalar_mul_tests.txt",
176    "src/ec/suite_b/ops/p256_scalar_square_tests.txt",
177    "src/ec/suite_b/ops/p384.rs",
178    "src/ec/suite_b/ops/p384_elem_div_by_2_tests.txt",
179    "src/ec/suite_b/ops/p384_elem_mul_tests.txt",
180    "src/ec/suite_b/ops/p384_elem_neg_tests.txt",
181    "src/ec/suite_b/ops/p384_elem_sum_tests.txt",
182    "src/ec/suite_b/ops/p384_point_double_tests.txt",
183    "src/ec/suite_b/ops/p384_point_mul_base_tests.txt",
184    "src/ec/suite_b/ops/p384_point_mul_tests.txt",
185    "src/ec/suite_b/ops/p384_point_sum_tests.txt",
186    "src/ec/suite_b/ops/p384_scalar_mul_tests.txt",
187    "src/ec/suite_b/private_key.rs",
188    "src/ec/suite_b/public_key.rs",
189    "src/ec/suite_b/suite_b_public_key_tests.txt",
190    "src/endian.rs",
191    "src/error.rs",
192    "src/hkdf.rs",
193    "src/hmac.rs",
194    "src/hmac_generate_serializable_tests.txt",
195    "src/io.rs",
196    "src/io/der.rs",
197    "src/io/der_writer.rs",
198    "src/io/writer.rs",
199    "src/lib.rs",
200    "src/limb.rs",
201    "src/endian.rs",
202    "src/pbkdf2.rs",
203    "src/pkcs8.rs",
204    "src/polyfill.rs",
205    "src/polyfill/convert.rs",
206    "src/rand.rs",
207    "src/rsa/bigint.rs",
208    "src/rsa/bigint_elem_exp_consttime_tests.txt",
209    "src/rsa/bigint_elem_exp_vartime_tests.txt",
210    "src/rsa/bigint_elem_mul_tests.txt",
211    "src/rsa/bigint_elem_reduced_once_tests.txt",
212    "src/rsa/bigint_elem_reduced_tests.txt",
213    "src/rsa/bigint_elem_squared_tests.txt",
214    "src/rsa/convert_nist_rsa_test_vectors.py",
215    "src/rsa.rs",
216    "src/rsa/padding.rs",
217    "src/rsa/random.rs",
218    "src/rsa/rsa_pss_padding_tests.txt",
219    "src/rsa/signature_rsa_example_private_key.der",
220    "src/rsa/signature_rsa_example_public_key.der",
221    "src/rsa/signing.rs",
222    "src/rsa/verification.rs",
223    "src/signature.rs",
224    "src/test.rs",
225    "src/test_1_syntax_error_tests.txt",
226    "src/test_1_tests.txt",
227    "src/test_3_tests.txt",
228    "tests/aead_aes_128_gcm_tests.txt",
229    "tests/aead_aes_256_gcm_tests.txt",
230    "tests/aead_chacha20_poly1305_tests.txt",
231    "tests/aead_chacha20_poly1305_openssh_tests.txt",
232    "tests/aead_tests.rs",
233    "tests/agreement_tests.rs",
234    "tests/agreement_tests.txt",
235    "tests/digest_tests.rs",
236    "tests/digest_tests.txt",
237    "tests/ecdsa_from_pkcs8_tests.txt",
238    "tests/ecdsa_tests.rs",
239    "tests/ecdsa_test_private_key_p256.p8",
240    "tests/ecdsa_test_public_key_p256.der",
241    "tests/ecdsa_test_public_key_p256_debug.txt",
242    "tests/ecdsa_sign_asn1_tests.txt",
243    "tests/ecdsa_sign_fixed_tests.txt",
244    "tests/ecdsa_verify_asn1_tests.txt",
245    "tests/ecdsa_verify_fixed_tests.txt",
246    "tests/ed25519_from_pkcs8_tests.txt",
247    "tests/ed25519_from_pkcs8_unchecked_tests.txt",
248    "tests/ed25519_tests.rs",
249    "tests/ed25519_tests.txt",
250    "tests/ed25519_test_private_key.bin",
251    "tests/ed25519_test_private_key.p8",
252    "tests/ed25519_test_public_key.bin",
253    "tests/ed25519_test_public_key.der",
254    "tests/hkdf_tests.rs",
255    "tests/hkdf_tests.txt",
256    "tests/hmac_tests.rs",
257    "tests/hmac_tests.txt",
258    "tests/pbkdf2_tests.rs",
259    "tests/pbkdf2_tests.txt",
260    "tests/quic_aes_128_tests.txt",
261    "tests/quic_aes_256_tests.txt",
262    "tests/quic_chacha20_tests.txt",
263    "tests/quic_tests.rs",
264    "tests/rsa_from_pkcs8_tests.txt",
265    "tests/rsa_pkcs1_sign_tests.txt",
266    "tests/rsa_pkcs1_verify_tests.txt",
267    "tests/rsa_primitive_verify_tests.txt",
268    "tests/rsa_pss_sign_tests.txt",
269    "tests/rsa_pss_verify_tests.txt",
270    "tests/rsa_tests.rs",
271    "tests/rsa_test_private_key_2048.p8",
272    "tests/rsa_test_public_key_2048.der",
273    "tests/rsa_test_public_key_2048_debug.txt",
274    "tests/signature_tests.rs",
275    "third_party/fiat/curve25519.c",
276    "third_party/fiat/curve25519_tables.h",
277    "third_party/fiat/internal.h",
278    "third_party/fiat/LICENSE",
279    "third_party/fiat/make_curve25519_tables.py",
280    "third_party/NIST/SHAVS/SHA1LongMsg.rsp",
281    "third_party/NIST/SHAVS/SHA1Monte.rsp",
282    "third_party/NIST/SHAVS/SHA1ShortMsg.rsp",
283    "third_party/NIST/SHAVS/SHA224LongMsg.rsp",
284    "third_party/NIST/SHAVS/SHA224Monte.rsp",
285    "third_party/NIST/SHAVS/SHA224ShortMsg.rsp",
286    "third_party/NIST/SHAVS/SHA256LongMsg.rsp",
287    "third_party/NIST/SHAVS/SHA256Monte.rsp",
288    "third_party/NIST/SHAVS/SHA256ShortMsg.rsp",
289    "third_party/NIST/SHAVS/SHA384LongMsg.rsp",
290    "third_party/NIST/SHAVS/SHA384Monte.rsp",
291    "third_party/NIST/SHAVS/SHA384ShortMsg.rsp",
292    "third_party/NIST/SHAVS/SHA512LongMsg.rsp",
293    "third_party/NIST/SHAVS/SHA512Monte.rsp",
294    "third_party/NIST/SHAVS/SHA512ShortMsg.rsp",
295]
296
297[lib]
298name = "ring"
299
300[dependencies]
301untrusted = "0.6.2"
302libc = { version = "0.2.48", default_features = false }
303
304[target.'cfg(not(target_os = "ios"))'.dependencies]
305spin = { version = "0.5.0" }
306
307[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
308
309[target.'cfg(any(target_os = "redox", all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies]
310lazy_static = "1.2"
311
312[target.'cfg(target_os = "windows")'.dependencies]
313winapi = { version = "0.3.6", default_features = false, features = ["ntsecapi", "wtypesbase"] }
314
315# Keep this in sync with `[dependencies]` in pregenerate_asm/Cargo.toml.
316[build-dependencies]
317cc = "1.0.26"
318
319[features]
320# These features are documented in the top-level module's documentation.
321default = ["use_heap", "dev_urandom_fallback"]
322dev_urandom_fallback = []
323internal_benches = []
324slow_tests = []
325test_logging = []
326use_heap = []
327
328# XXX: debug = false because of https://github.com/rust-lang/rust/issues/34122
329
330[profile.bench]
331opt-level = 3
332debug = false
333rpath = false
334lto = true
335debug-assertions = false
336codegen-units = 1
337
338[profile.release]
339opt-level = 3
340debug = false
341rpath = false
342lto = true
343debug-assertions = false
344codegen-units = 1
345