Make Issuer Keys (de)serializable.
This commit is contained in:
parent
ae3fc8f1a2
commit
b607f3bc37
|
@ -47,6 +47,8 @@ use migration_table::{MigrationTable, MigrationType};
|
||||||
|
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
|
|
||||||
|
use serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref CMZ_A: RistrettoPoint =
|
pub static ref CMZ_A: RistrettoPoint =
|
||||||
RistrettoPoint::hash_from_bytes::<Sha512>(b"CMZ Generator A");
|
RistrettoPoint::hash_from_bytes::<Sha512>(b"CMZ Generator A");
|
||||||
|
@ -56,7 +58,7 @@ lazy_static! {
|
||||||
dalek_constants::RISTRETTO_BASEPOINT_TABLE;
|
dalek_constants::RISTRETTO_BASEPOINT_TABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub struct IssuerPrivKey {
|
pub struct IssuerPrivKey {
|
||||||
x0tilde: Scalar,
|
x0tilde: Scalar,
|
||||||
x: Vec<Scalar>,
|
x: Vec<Scalar>,
|
||||||
|
@ -77,7 +79,7 @@ impl IssuerPrivKey {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub struct IssuerPubKey {
|
pub struct IssuerPubKey {
|
||||||
X: Vec<RistrettoPoint>,
|
X: Vec<RistrettoPoint>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue