Brian Smith
8015140fa6
Constant-time tests: Replace clone with copy.
2020-11-11 16:46:41 -08:00
Brian Smith
524c37bace
ECDSA/ED25519 tests: Improve Copy/Clone tests based on Clippy's feedback.
2020-11-11 16:46:41 -08:00
Brian Smith
bd7f4ca82d
AEAD tests: Take Clippy's advice regarding op_ref
.
2020-11-11 16:46:41 -08:00
Brian Smith
aa7a962f9f
Constant-time tests: Remove useless clone.
2020-11-11 16:46:41 -08:00
Brian Smith
3de43630d9
ED25519 tests: Remove useless static lifetime annotation.
2020-11-11 16:46:41 -08:00
Brian Smith
5fe025b16e
AEAD tests: Remove useless let () =
.
2020-11-11 16:46:41 -08:00
Brian Smith
ded14f067e
Agreement Tests: Remove unneeded lifetime annotations.
2020-11-11 16:46:41 -08:00
Brian Smith
898a93f632
Tests: Silence some Clippy warnings.
2020-11-11 16:46:41 -08:00
Brian Smith
bc2d01adfb
Agreement tests: Address clippy::needless_return
.
2020-11-11 16:46:41 -08:00
Brian Smith
f06811a150
Remove definitions of deprecated Error::description()
and
...
`Error::cause()`.
2020-06-19 11:50:49 -05:00
Brian Smith
432670f135
Implement ECDSA nonce hardening to pretect against bad PRNG.
2020-05-29 21:43:35 -05:00
Brian Smith
e8bdd5b7b1
Make RSA work for WebAssembly targets when the "wasm32_c" feature is enabled.
...
Run the RSA and signature tests in WebAssembly.
Implement Elem*Elem multiplication for platforms for which we have no assembly
language implementation of it. Refactor the code to accomodate this.
`elem_reduced` was infallible previously as it always ensured the prerequisites
for the reduction were met. Make this clear in the return type, as a side-effect
of the refactoring needed for implementing the multiplication.
This implementation is far from efficient. More work needs to be done to make it
faster.
2020-05-29 21:07:20 -05:00
Brian Smith
0d5ab53e50
Simplify wasm32 test conditional use
s.
2020-05-28 11:12:37 -05:00
Brian Smith
0c5f61b14f
Merge BoringSSL c556d87: Add aes_nohw.c fallback AES implementation.
...
Add the BoringSSL aes_nohw implementation with minimal changes needed to
build. Enable the AES-GCM AEAD tests for wasm32 targets gated on the "wasm_c"
feature.
2020-05-28 10:51:03 -05:00
Brian Smith
10c4b68e63
Add new "wasm32_c" feature to enable more functionality for wasm32 targets.
2020-05-27 14:59:52 -05:00
Brian Smith
42f110abe5
Clean up conditional compilation logic w.r.t wasm_bindgen_test.
...
When I wrote the tests, `#[cfg_attr(not(target_arch = "wasm32"), test)]` seemed
to be necessary, but now `#[test]` works.
2020-05-27 14:59:52 -05:00
Brian Smith
12c02bfa04
Add tests specifically for constant_time::verify_slices_are_equal
.
2020-05-27 14:59:52 -05:00
Marek Vavrusa
f376d70669
Regenerated tests for rsa_pkcs1_sign_tests, rsa_pkcs1_verify_tests
...
I agree to license my contributions to each file under the terms given
at the top of each file I changed.
2020-04-28 11:23:00 -05:00
Marek Vavrusa
5b3dc70fc3
Add support for verifying 1024-bit RSA SHA-512 signatures
...
I agree to license my contributions to each file under the terms given
at the top of each file I changed.
2020-04-28 11:23:00 -05:00
Brian Smith
6d9bedcafa
Clarify RSA signature test bit length checks.
2020-02-04 12:35:32 -06:00
Andrew Tunnell-Jones
682ad80784
Test that RSA PKCS1 variants only accept appropriately sized keys
...
I agree to license my contributions to each file under the terms given
at the top of each file I changed.
2020-02-04 12:29:55 -06:00
Andrew Tunnell-Jones
bbbe6edce0
Add support for verifying 1024-bit RSA SHA-1 and SHA-256 signatures
...
I agree to license my contributions to each file under the terms given
at the top of each file I changed.
2020-02-04 12:29:55 -06:00
Andrew Tunnell-Jones
31ddaf6864
2040-bit RSA SHA-256 case should pass when 1024-bit support is introduced
...
I agree to license my contributions to each file under the terms given
at the top of each file I changed.
2020-02-04 12:29:55 -06:00
Andrew Tunnell-Jones
e927b6de98
Generate SHA-1 and SHA-256 1024-bit RSA verify cases
...
I agree to license my contributions to each file under the terms given
at the top of each file I changed.
2020-02-04 12:29:55 -06:00
Brian Smith
f15828a7a6
Stop disabling legacy_directory_ownership to fix Rust 1.41 beta channel builds.
2019-12-23 18:41:07 -06:00
Brian Smith
7adacd3070
Revert "Add support for random nonce generation to ring::aead
."
...
This reverts commit 88d5aa7fd072d50be716abae4339be8463d665bb. It was a breaking change
in 0.16.8, which wasn't intended. Defaulting the parameter worked for many projects but
apparently not `biscuit` and some others.
2019-08-30 05:46:15 -10:00
Brian Smith
88d5aa7fd0
Add support for random nonce generation to ring::aead
.
2019-08-30 05:39:37 -10:00
Brian Smith
20582aa39a
Improve labeling in Debug
implementation for LessSafeKey
.
2019-08-11 18:10:31 -10:00
Brian Smith
fe1a947b59
0.16.7: &
-> &dyn
in agreement_tests.rs to fix beta/nightly build.
2019-08-11 16:08:00 -10:00
Brian Smith
2fe7ed15d4
Improve usability of ring::agreement
.
...
Implement `Debug` and `algorithm()` accessors.
Add tests for traits.
2019-08-11 14:46:48 -10:00
Brian Smith
6ec6e11ab0
Test HKDF output length error handling.
2019-08-11 14:17:26 -10:00
Brian Smith
524c6af2dc
Add seal_in_place_separate_tag
and `seal_in_place_append_tag
.
2019-07-23 10:25:56 -10:00
Brian Smith
845a0e8b8e
Simplify bounds checking in open_within()
.
...
I'm not sure we actually need the full generality of `RangeBounds`.
Generalizing this to `RangeBounds` later should be a source-compatible
change if/when we find it useful to do so. Until then, avoid supporting
untested kinds of bounds.
2019-07-17 19:26:14 -10:00
Brian Smith
76f1f76c66
Rename open_in_place
to open_overlapping
; add new open_in_place
.
2019-07-17 19:25:38 -10:00
Brian Smith
ce4953d846
Make aead::open_in_place
easier to understand.
2019-07-17 19:25:38 -10:00
Brian Smith
185da62457
Make the aead::seal_in_place
API easier to understand.
2019-07-17 19:25:38 -10:00
Brian Smith
8af770d0d3
Remove obsolete TODO in aead_test.rs.
...
The comment no longer applies since the API was changed to prevent this
type of failure using the type system.
2019-07-17 19:25:38 -10:00
Brian Smith
490f7eeb7f
derive Clone
and Debug
for SystemRandom
.
2019-07-16 11:12:08 -10:00
Brian Smith
b791dd6585
Remove deprecated signature::verify
API.
2019-07-15 17:52:27 -10:00
Brian Smith
c23d537847
Restore the OpeningKey
and SealingKey
naming.
...
Experiments with the `Role` pattern indicate that it might not work as
well as initially hoped. Replace it with the pattern more common in Rust.
2019-07-13 14:50:42 -10:00
Brian Smith
38462247ac
Add LessSafeKey
to ring::aead
.
2019-07-13 14:50:42 -10:00
Brian Smith
c24f737dfa
Refactor AEAD tests in preparation for extending the AEAD API.
2019-07-13 14:50:42 -10:00
Brian Smith
7bc1661fe9
Simplify aead::Key
tests.
2019-07-13 14:50:42 -10:00
Brian Smith
6c3805840e
Rename RSA_PKCS1_2048_8192_SHA1
=> RSA_PKCS1_2048_8192_SHA1_FOR_LEGACY_USE_ONLY
.
2019-07-10 10:26:04 -10:00
Brian Smith
7071dda618
Replace use_heap
feature with alloc
and std
features; use alloc
crate.
2019-07-09 21:15:18 -10:00
Brian Smith
7d36600ec8
Use alloc
instead of std
when possible.
2019-07-09 21:15:18 -10:00
Brian Smith
0c962674a1
Fix SHA-1 slow tests.
2019-07-09 17:47:52 -10:00
Brian Smith
d367526a27
Remove 32-bit x86 SHA-2 assembly code.
2019-07-09 17:25:46 -10:00
Brian Smith
7b6e9dd911
Rename SHA1
to SHA1_FOR_LEGACY_USE_ONLY
.
2019-07-09 14:16:39 -10:00
Brian Smith
c3d13e8851
Refactor AEAD key management.
2019-07-07 16:47:48 -10:00