|
@@ -22,6 +22,9 @@ use zkp::CompactProof;
|
|
use zkp::ProofError;
|
|
use zkp::ProofError;
|
|
use zkp::Transcript;
|
|
use zkp::Transcript;
|
|
|
|
|
|
|
|
+use serde::{Serialize, Deserialize};
|
|
|
|
+use serde_big_array::big_array;
|
|
|
|
+
|
|
use super::super::bridge_table;
|
|
use super::super::bridge_table;
|
|
use super::super::bridge_table::BridgeLine;
|
|
use super::super::bridge_table::BridgeLine;
|
|
use super::super::cred;
|
|
use super::super::cred;
|
|
@@ -30,16 +33,20 @@ use super::super::OPENINV_LENGTH;
|
|
use super::super::{BridgeAuth, BridgeDb, IssuerPubKey};
|
|
use super::super::{BridgeAuth, BridgeDb, IssuerPubKey};
|
|
use super::super::{CMZ_A, CMZ_A_TABLE, CMZ_B, CMZ_B_TABLE};
|
|
use super::super::{CMZ_A, CMZ_A_TABLE, CMZ_B, CMZ_B_TABLE};
|
|
|
|
|
|
|
|
+big_array! { BigArray; }
|
|
|
|
+
|
|
/// The request message for this protocol
|
|
/// The request message for this protocol
|
|
|
|
+#[derive(Serialize, Deserialize)]
|
|
pub struct Request {
|
|
pub struct Request {
|
|
|
|
+ #[serde(with = "BigArray")]
|
|
invite: [u8; OPENINV_LENGTH],
|
|
invite: [u8; OPENINV_LENGTH],
|
|
D: RistrettoPoint,
|
|
D: RistrettoPoint,
|
|
EncIdClient: (RistrettoPoint, RistrettoPoint),
|
|
EncIdClient: (RistrettoPoint, RistrettoPoint),
|
|
piUserBlinding: CompactProof,
|
|
piUserBlinding: CompactProof,
|
|
}
|
|
}
|
|
|
|
|
|
-#[derive(Debug)]
|
|
|
|
/// The client state for this protocol
|
|
/// The client state for this protocol
|
|
|
|
+#[derive(Debug)]
|
|
pub struct State {
|
|
pub struct State {
|
|
d: Scalar,
|
|
d: Scalar,
|
|
D: RistrettoPoint,
|
|
D: RistrettoPoint,
|
|
@@ -48,6 +55,7 @@ pub struct State {
|
|
}
|
|
}
|
|
|
|
|
|
/// The response message for this protocol
|
|
/// The response message for this protocol
|
|
|
|
+#[derive(Serialize, Deserialize)]
|
|
pub struct Response {
|
|
pub struct Response {
|
|
P: RistrettoPoint,
|
|
P: RistrettoPoint,
|
|
EncQ: (RistrettoPoint, RistrettoPoint),
|
|
EncQ: (RistrettoPoint, RistrettoPoint),
|