Brian Smith
8ac90f4c3e
RSA: Move test_signature_rsa_pkcs1_sign_output_buffer_len
to tests/.
...
It's only using the public API so it should be an integration test.
2021-09-22 13:55:57 -07:00
Brian Smith
9accd874cb
WebAssembly: Reduce boilerplate for running tests in WebAssembly.
...
Skip `digest_tests.rs` since it doesn't get built by wasm-bindgen
correctly when we do this.
2021-04-20 18:22:20 -07:00
Brian Smith
b9d7d089d9
Remove #![forbid(warnings)]
; reply on Clippy in CI/CD instead.
...
The newest Rust Nightly is getting stricter about `forbid(warnings)`
which breaks the build.
Use "deny" instead of "forbid". And only deny when running Clippy in
CI/CD, so that when hacking on *ring* we don't have to deal with
warnings right away; we now only have to deal with them when we're ready
to submit a change to be merged.
2020-12-03 17:40:33 -08: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
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
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
b791dd6585
Remove deprecated signature::verify
API.
2019-07-15 17:52:27 -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
9f211157a8
Refactor low-level RSA signature verification API.
...
Replace `(n, e)` tuple with a structure with named `n` and `e` fields
to improve safety. Remove the use of `untrusted`.
2019-04-05 16:53:13 -10:00
Brian Smith
2ca83cc4a0
Remove untrusted
from io::Positive
API.
2019-04-05 16:21:41 -10:00
Brian Smith
cfe46261e8
Remove untrusted
from the ring::signature
signing API.
2019-04-05 16:21:41 -10:00
Brian Smith
306d163613
Refactor ring::signature
verification API.
...
Introduce `UnparsedPublicKey`. Remove public use of `untrusted::Input`.
Replace `signature::verify()` with `UnparsedPublicKey::verify()`.
2019-04-05 16:21:40 -10:00
Brian Smith
d712f6493b
Avoid unnecessarily-named explicit lifetime parameters.
2019-03-06 14:04:39 -10:00
Brian Smith
ab0726d0cd
Embed test data into test executables.
...
Embed test data files into test executables so that file I/O isn't
necessary during tests. This allows the tests to run on platforms that
don't have file I/O. It also makes it easier to run the tests on a
separate (virtual) machine from the build machine since the test
automation no longer needs to keep track of the test files.
2019-02-02 13:21:02 -10:00
Brian Smith
1445fa4367
Improve and test various key type Clone
/Debug
implementations.
2019-01-19 19:56:02 -10:00
Brian Smith
5997093fb0
Implement signature::KeyPair
for RSA.
2018-12-21 15:39:26 -10:00
Brian Smith
faaef278dc
Move der under IO.
2018-12-21 15:22:30 -10:00
Brian Smith
6609177e63
Rename RSA*
to Rsa*
.
2018-12-21 15:21:50 -10:00
Brian Smith
69e1ad202a
Remove RSASigningState
.
2018-12-12 20:09:46 -10:00
Brian Smith
67425b7463
Enable RSA signign by default; remove rsa_signing
feature.
2018-12-12 20:09:46 -10:00
Brian Smith
2843931bb7
Switch to Rust 2018 Edition.
...
Switch to Rust 2018 Edition. Fix up some build breakage for different
configurations that were found in the process of testing this,
particularly `--no-default-features`.
2018-12-08 21:39:17 -10:00
Brian Smith
9968baa55d
Report some details of why asymmetric keys were rejected.
2018-11-28 11:52:18 -10:00
Brian Smith
6e98bf0568
Reformat tests/, except AEAD tests.
...
AEAD tests will be reformatted later.
2018-11-15 16:17:49 -10:00
Brian Smith
3220b58eee
Simplify RSA test and fix the build.
2018-06-04 16:51:24 -10:00
Brian Smith
6ac5b5254f
Implement Debug
for RSAKeyPair
.
2018-05-28 12:36:07 -10:00
Brian Smith
2776bc7094
Don't impl Clone
for RSAKeyPair
yet.
...
I want to explore some new RSA functionality that might make `Clone`
difficult to implement, so I'm going to revert this change before
people start depending on it.
2018-05-15 08:43:41 -10:00
Brian Smith
2b06760de8
Implement Clone
for RSAKeyPair
.
2018-05-07 14:04:50 -10:00
Brian Smith
a9fabeb5f2
Improve RSAKeyPair
and RSASigningState
Send
/Sync
test.
...
Use the new utility functions in `ring::test` instead of the previous
hacky way.
2017-12-27 18:13:39 -10:00
Brian Smith
72f5e2ebf0
Avoid trying to disable removed fat_ptr_transmutes
antifeature.
...
The antifeature was removed from rustc in 2014, according to a new warning,
so this was doing nothing.
2017-12-24 09:50:10 -10:00
Brian Smith
270226b23f
Do strict linting in tests/rsa_tests.rs.
2017-08-27 12:26:06 -10:00
Brian Smith
f66121467d
Switch to ?
syntax in ring::rsa
.
2017-05-17 21:41:17 -10:00
Brian Smith
30093dd947
Convert RSA PKCS#8 tests to file tests.
2017-05-16 18:00:02 -10:00
Brian Smith
e52904256b
Move RSA signing & verification functional tests to tests/.
2017-05-13 22:37:26 -10:00
Brian Smith
93cdb56916
Rename tests/pkcs8_test.rs to tests/rsa_tests.rs.
2017-05-12 16:26:50 -10:00