From 985d651bf0a3ef5f791b6028ea61406c77d7dae8 Mon Sep 17 00:00:00 2001 From: Vecna Date: Sun, 13 Nov 2022 11:33:57 -0500 Subject: [PATCH] Make Issuer Keys (de)serializable. --- crates/lox-library/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/lox-library/src/lib.rs b/crates/lox-library/src/lib.rs index c74686c..f46e0bf 100644 --- a/crates/lox-library/src/lib.rs +++ b/crates/lox-library/src/lib.rs @@ -47,6 +47,8 @@ use migration_table::{MigrationTable, MigrationType}; use lazy_static::lazy_static; +use serde::{Serialize, Deserialize}; + lazy_static! { pub static ref CMZ_A: RistrettoPoint = RistrettoPoint::hash_from_bytes::(b"CMZ Generator A"); @@ -56,7 +58,7 @@ lazy_static! { dalek_constants::RISTRETTO_BASEPOINT_TABLE; } -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct IssuerPrivKey { x0tilde: Scalar, x: Vec, @@ -77,7 +79,7 @@ impl IssuerPrivKey { } } -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct IssuerPubKey { X: Vec, }