mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-08 06:35:52 +01:00
feat(NUT12): rename BlindSignatureDleq
This commit is contained in:
@@ -48,6 +48,6 @@ pub use nut10::{Kind, Secret as Nut10Secret, SecretData};
|
||||
#[cfg(feature = "nut11")]
|
||||
pub use nut11::{P2PKConditions, SigFlag, Signatures, SigningKey, VerifyingKey};
|
||||
#[cfg(feature = "nut12")]
|
||||
pub use nut12::{BlindedSignatureDleq, ProofDleq};
|
||||
pub use nut12::{BlindSignatureDleq, ProofDleq};
|
||||
|
||||
pub type Proofs = Vec<Proof>;
|
||||
|
||||
@@ -8,7 +8,7 @@ use std::str::FromStr;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[cfg(feature = "nut12")]
|
||||
use super::{BlindedSignatureDleq, ProofDleq};
|
||||
use super::{BlindSignatureDleq, ProofDleq};
|
||||
use super::{Id, Proofs, PublicKey};
|
||||
use crate::error::Error;
|
||||
#[cfg(feature = "nut11")]
|
||||
@@ -424,7 +424,7 @@ pub struct BlindedSignature {
|
||||
pub c: PublicKey,
|
||||
/// DLEQ Proof
|
||||
#[cfg(feature = "nut12")]
|
||||
pub dleq: Option<BlindedSignatureDleq>,
|
||||
pub dleq: Option<BlindSignatureDleq>,
|
||||
}
|
||||
|
||||
/// Proofs [NUT-00]
|
||||
|
||||
@@ -26,7 +26,7 @@ pub enum Error {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct BlindedSignatureDleq {
|
||||
pub struct BlindSignatureDleq {
|
||||
pub e: SecretKey,
|
||||
pub s: SecretKey,
|
||||
}
|
||||
@@ -79,7 +79,7 @@ fn calculate_dleq(
|
||||
blinded_signature: k256::PublicKey,
|
||||
blinded_message: &k256::PublicKey,
|
||||
mint_secretkey: &k256::SecretKey,
|
||||
) -> Result<BlindedSignatureDleq, Error> {
|
||||
) -> Result<BlindSignatureDleq, Error> {
|
||||
// Random nonce
|
||||
let r: k256::SecretKey = SecretKey::random().into();
|
||||
|
||||
@@ -100,7 +100,7 @@ fn calculate_dleq(
|
||||
|
||||
let s: k256::SecretKey = k256::SecretKey::new(s.into());
|
||||
|
||||
Ok(BlindedSignatureDleq {
|
||||
Ok(BlindSignatureDleq {
|
||||
e: e_sk.into(),
|
||||
s: s.into(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user