|
@@ -174,12 +174,12 @@ where
|
|
r#"
|
|
r#"
|
|
INSERT
|
|
INSERT
|
|
INTO blind_signature
|
|
INTO blind_signature
|
|
- (y, amount, keyset_id, c)
|
|
|
|
|
|
+ (blinded_message, amount, keyset_id, c)
|
|
VALUES
|
|
VALUES
|
|
- (:y, :amount, :keyset_id, :c)
|
|
|
|
|
|
+ (:blinded_message, :amount, :keyset_id, :c)
|
|
"#,
|
|
"#,
|
|
)?
|
|
)?
|
|
- .bind("y", message.to_bytes().to_vec())
|
|
|
|
|
|
+ .bind("blinded_message", message.to_bytes().to_vec())
|
|
.bind("amount", u64::from(signature.amount) as i64)
|
|
.bind("amount", u64::from(signature.amount) as i64)
|
|
.bind("keyset_id", signature.keyset_id.to_string())
|
|
.bind("keyset_id", signature.keyset_id.to_string())
|
|
.bind("c", signature.c.to_bytes().to_vec())
|
|
.bind("c", signature.c.to_bytes().to_vec())
|
|
@@ -353,17 +353,17 @@ where
|
|
c,
|
|
c,
|
|
dleq_e,
|
|
dleq_e,
|
|
dleq_s,
|
|
dleq_s,
|
|
- y
|
|
|
|
|
|
+ blinded_message,
|
|
FROM
|
|
FROM
|
|
blind_signature
|
|
blind_signature
|
|
- WHERE y IN (:y)
|
|
|
|
|
|
+ WHERE blinded_message IN (:blinded_message)
|
|
"#,
|
|
"#,
|
|
)?
|
|
)?
|
|
.bind_vec(
|
|
.bind_vec(
|
|
- "y",
|
|
|
|
|
|
+ "blinded_message",
|
|
blinded_messages
|
|
blinded_messages
|
|
.iter()
|
|
.iter()
|
|
- .map(|y| y.to_bytes().to_vec())
|
|
|
|
|
|
+ .map(|bm| bm.to_bytes().to_vec())
|
|
.collect(),
|
|
.collect(),
|
|
)
|
|
)
|
|
.fetch_all(&*conn)
|
|
.fetch_all(&*conn)
|
|
@@ -382,7 +382,7 @@ where
|
|
.collect::<Result<HashMap<_, _>, Error>>()?;
|
|
.collect::<Result<HashMap<_, _>, Error>>()?;
|
|
Ok(blinded_messages
|
|
Ok(blinded_messages
|
|
.iter()
|
|
.iter()
|
|
- .map(|y| blinded_signatures.remove(y))
|
|
|
|
|
|
+ .map(|bm| blinded_signatures.remove(bm))
|
|
.collect())
|
|
.collect())
|
|
}
|
|
}
|
|
|
|
|