mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Enable no_std on transcript
Removes the Vec challenge for an associated type. Fixes the merlin feature which was horribly broken. Also adds no_std to dalek-ff-group.
This commit is contained in:
@@ -62,6 +62,8 @@ pub trait Algorithm<C: Curve>: Clone {
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct IetfTranscript(Vec<u8>);
|
||||
impl Transcript for IetfTranscript {
|
||||
type Challenge = Vec<u8>;
|
||||
|
||||
fn domain_separate(&mut self, _: &[u8]) {}
|
||||
|
||||
fn append_message(&mut self, _: &'static [u8], message: &[u8]) {
|
||||
|
||||
@@ -164,7 +164,7 @@ fn sign_with_share<C: Curve, A: Algorithm<C>>(
|
||||
transcript.append_message(b"message", &C::hash_msg(&msg));
|
||||
|
||||
// Calculate the binding factor
|
||||
C::hash_binding_factor(&transcript.challenge(b"binding"))
|
||||
C::hash_binding_factor(transcript.challenge(b"binding").as_ref())
|
||||
};
|
||||
|
||||
// Process the addendums
|
||||
|
||||
Reference in New Issue
Block a user