no_std support (#225)

* No std implementation

* Run tests with std

* Adding wasm32-unknown-unknown target

Co-authored-by: Kevin Lewi <[email protected]>
This commit is contained in:
daxpedda
2021-08-11 21:25:07 -07:00
committed by GitHub
co-authored by Kevin Lewi
parent 88673d8e05
commit 8a7bcf9097
23 changed files with 179 additions and 128 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ use rand::{CryptoRng, RngCore};
/// Used to store the OPRF input and blinding factor
#[cfg_attr(feature = "serialize", derive(serde::Deserialize, serde::Serialize))]
pub struct Token<Grp: Group> {
pub(crate) data: Vec<u8>,
pub(crate) data: alloc::vec::Vec<u8>,
pub(crate) blind: Grp::Scalar,
}
@@ -154,7 +154,7 @@ mod tests {
#[test]
fn oprf_inversion_unsalted() {
let mut rng = OsRng;
let mut input = vec![0u8; 64];
let mut input = alloc::vec![0u8; 64];
rng.fill_bytes(&mut input);
let (token, alpha) = blind::<_, RistrettoPoint, sha2::Sha512>(&input, &mut rng).unwrap();
let res =