Brian Smith
155231fb01
signature: Enable Ed25519 support for wasm32 targets.
...
Ed25519 was disabled for WebAssembly due to some unrelated issues with
getting the X25519 code working in WebAssembly. Temporarily remove the
`agreement` API when targetting WebAssembly to work around those issues
in a way that lets us enabled Ed25519.
2022-04-06 12:54:49 -07:00
Brian Smith
32b2c6c39e
Ed25519 PKCS#8 testing: Pass all test vectors to both variants.
2022-02-20 19:48:19 -08:00
Brian Smith
d03059e81a
Ed25519 PKCS#8 Testing: Verify that the resultant public key is correct.
2022-02-20 19:48:19 -08:00
Brian Smith
edc5916264
Ed25519 PKCS#8 Testing: Require explicit indication of success in test input.
...
Instead of assuming the call should be successful if there is no error, instead
require an explicit "Result = OK".
2022-02-20 19:48:19 -08:00
Brian Smith
b1d54a89b9
Ed25519 PKCS#8 testing: Factor out common logic in from_pkcs8 tests.
...
Prepare for improving both sets of tests.
2022-02-20 19:48:19 -08:00
Brian Smith
d93b954901
Remove definitions of deprecated Error::description()
/cause()
.
2021-02-04 17:07:41 -08:00
Brian Smith
6e3c8a331e
Ed25519 Tests: Import Ed25519 malleability test case from BoringSSL.
2020-12-17 20:55:22 -08:00
Brian Smith
47dfb4814f
Ed25519 Tests: Refactor tests to prepare for more complete testing of invalid signatures.
2020-12-17 20:55:22 -08: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
d57c8d56a2
Signature tests: Remove redundant clones found by Clippy.
2020-12-03 17:40:33 -08:00
Brian Smith
4be97e91e2
Revert "Remove definitions of deprecated Error::description()
..."
...
This reverts commit f06811a150fcded1555911678bbca6dcb5440cda because it changed the
pulic API in a non-backward-compatible way.
2020-11-18 16:20:48 -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
3de43630d9
ED25519 tests: Remove useless static lifetime annotation.
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
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
d56ca70fd0
Add negative tests for Ed25519 signature verification.
2019-04-05 16:25:51 -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
c40df473cb
Update to latest untrusted
prerelease.
2019-04-05 09:45:53 -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
d81973cf4c
Define a signature::KeyPair
trait and implement it for Ed25519.
2018-12-21 15:30:47 -10:00
Brian Smith
8f4ecf8e1d
Make PKCS#8 generation of Ed25519 keys use pkcs8::Document
.
2018-12-14 11:39:34 -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
ec2a92a4ae
Clean up imports in ed25519_tests.rs.
2018-12-08 21:39:17 -10:00
Brian Smith
948846061e
cargo fix --edition && cargo +nightly fmt
.
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
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
7b7d562e76
Be stricter with lints in the rest of tests/*.rs.
2017-08-27 12:31:17 -10:00
Brian Smith
74c54980ea
Add some PKCS#8 v2 Ed25519 private key test cases.
2017-05-07 13:30:42 -10:00
Brian Smith
0f60416266
Update Ed25519 PKCS#8 support to account for extra octet string.
...
The private key is wrapped in an extra octet string.
2017-05-07 11:42:22 -10:00
Brian Smith
eacd3b8fa0
Add Ed25519 PKCS#8 support.
2017-05-07 10:21:18 -10:00
Brian Smith
79207747a4
Replace Ed25519KeyPair::from_bytes()
with from_seed_and_public_key()
.
2017-05-07 09:28:28 -10:00
Brian Smith
f587947fd7
Convert Ed25519 tests to from unit tests to integration tests.
...
They are integration tests.
2017-05-07 09:23:58 -10:00