mirror of
https://github.com/serai-dex/serai.git
synced 2025-01-03 17:40:34 +00:00
Have transcripted versions specify their minor version pre-1.0
This commit is contained in:
parent
bacf31378d
commit
3b4c600c60
4 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
c# Ciphersuite
|
||||
# Ciphersuite
|
||||
|
||||
Ciphersuites for elliptic curves premised on ff/group.
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ impl<Id: Eq + Hash, C: Ciphersuite> Encryption<Id, C> {
|
|||
fn cipher(&self, participant: Id, encrypt: bool) -> ChaCha20 {
|
||||
// Ideally, we'd box this transcript with ZAlloc, yet that's only possible on nightly
|
||||
// TODO: https://github.com/serai-dex/serai/issues/151
|
||||
let mut transcript = RecommendedTranscript::new(b"DKG Encryption v0");
|
||||
let mut transcript = RecommendedTranscript::new(b"DKG Encryption v0.2");
|
||||
transcript.domain_separate(self.dst);
|
||||
|
||||
let other = self.enc_keys[&participant];
|
||||
|
|
|
@ -27,7 +27,7 @@ use crate::{
|
|||
|
||||
#[allow(non_snake_case)]
|
||||
fn challenge<C: Ciphersuite>(context: &str, l: u16, R: &[u8], Am: &[u8]) -> C::F {
|
||||
let mut transcript = RecommendedTranscript::new(b"DKG FROST v0");
|
||||
let mut transcript = RecommendedTranscript::new(b"DKG FROST v0.2");
|
||||
transcript.domain_separate(b"Schnorr Proof of Knowledge");
|
||||
transcript.append_message(b"context", context.as_bytes());
|
||||
transcript.append_message(b"participant", l.to_le_bytes());
|
||||
|
|
|
@ -28,7 +28,7 @@ pub trait CiphersuitePromote<C2: Ciphersuite> {
|
|||
}
|
||||
|
||||
fn transcript<G: GroupEncoding>(key: G, i: u16) -> RecommendedTranscript {
|
||||
let mut transcript = RecommendedTranscript::new(b"DKG Generator Promotion v0");
|
||||
let mut transcript = RecommendedTranscript::new(b"DKG Generator Promotion v0.2");
|
||||
transcript.append_message(b"group_key", key.to_bytes());
|
||||
transcript.append_message(b"participant", i.to_be_bytes());
|
||||
transcript
|
||||
|
|
Loading…
Reference in a new issue