Add no_std support to transcript, dalek-ff-group, ed448, ciphersuite, multiexp, schnorr, and monero-generators

transcript, dalek-ff-group, ed449, and ciphersuite are all usable with no_std
alone. The rest additionally require alloc.

Part of #279.
This commit is contained in:
Luke Parker
2023-04-22 04:38:47 -04:00
parent ef0c901455
commit 1e448dec21
38 changed files with 445 additions and 76 deletions

View File

@@ -1,4 +1,7 @@
use std::io::{self, Read, Write};
use std_shims::{
vec::Vec,
io::{self, Read, Write},
};
use zeroize::Zeroize;

View File

@@ -1,8 +1,15 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc = include_str!("../README.md")]
#![cfg_attr(not(feature = "std"), no_std)]
use core::ops::Deref;
use std::io::{self, Read, Write};
#[cfg(not(feature = "std"))]
#[macro_use]
extern crate alloc;
use std_shims::{
vec::Vec,
io::{self, Read, Write},
};
use rand_core::{RngCore, CryptoRng};