9 Commits

Author SHA1 Message Date
JanKaul
2019d8482f Add support for wasm32-wasi.
[The files changed in this commit were part of the original PR. The
original PR also changed other files, but those changes were removed.]
2023-10-14 16:50:18 -07:00
Tom Dryer
2afc921340 Allow accessing signature::UnparsedPublicKey bytes
Implement `AsRef<[u8]>` for `signature::UnparsedPublicKey`, making it
possible to access the bytes of the public key. For consistency, I did
the same for `agreement::UnparsedPublicKey`, although it already has a
`bytes` method. `agreement::PublicKey` already uses the `AsRef<[u8]>`
approach.

Also, add missing `Debug` implementation for
`signature::UnparsedPublicKey`.

I agree to license my contributions to each file under the terms given
at the top of each file I changed.
2023-10-06 11:07:03 -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
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
0c407e4c31 Remove failed attempt at a generic public key signing API. 2018-12-21 15:21:50 -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
6e98bf0568 Reformat tests/, except AEAD tests.
AEAD tests will be reformatted later.
2018-11-15 16:17:49 -10:00
Brian Smith
e5a4fe96f7 Initial ECDSA signing implementation.
Nonce reuse hardening and more tests will be added later.
2018-05-31 08:18:58 -10:00
Brian Smith
7a6f3c8ddd Derive Copy and Clone for ring::signature::Signature.
Derive `Copy` and `Clone` for `Signature`.

Add some utilities for testing `Clone`, `Copy`, `Send`, and `Sync`
and use them to test that `Signature` implements these traits.
2017-12-27 15:53:35 -10:00