|
@@ -41,7 +41,7 @@ use std::collections::HashMap;
|
|
|
use super::super::cred;
|
|
|
use super::super::dup_filter::SeenType;
|
|
|
use super::super::migration_table;
|
|
|
-use super::super::{pt_dbl, scalar_dbl, scalar_u64};
|
|
|
+use super::super::{pt_dbl, scalar_dbl, scalar_u32};
|
|
|
use super::super::{BridgeAuth, IssuerPubKey};
|
|
|
use super::super::{CMZ_A, CMZ_A_TABLE, CMZ_B, CMZ_B_TABLE};
|
|
|
|
|
@@ -52,7 +52,7 @@ use super::super::{CMZ_A, CMZ_A_TABLE, CMZ_B, CMZ_B_TABLE};
|
|
|
/// The implementation also puts an upper bound of UNTRUSTED_INTERVAL +
|
|
|
/// 511 days, which is not unreasonable; we want users to be engaging
|
|
|
/// with the system in order to move up trust levels.
|
|
|
-pub const UNTRUSTED_INTERVAL: u64 = 30;
|
|
|
+pub const UNTRUSTED_INTERVAL: u32 = 30;
|
|
|
|
|
|
pub struct Request {
|
|
|
// Fields for blind showing the Lox credential
|
|
@@ -157,7 +157,7 @@ define_proof! {
|
|
|
pub fn request(
|
|
|
lox_cred: &cred::Lox,
|
|
|
lox_pub: &IssuerPubKey,
|
|
|
- today: u64,
|
|
|
+ today: u32,
|
|
|
) -> Result<(Request, State), ProofError> {
|
|
|
let A: &RistrettoPoint = &CMZ_A;
|
|
|
let B: &RistrettoPoint = &CMZ_B;
|
|
@@ -166,7 +166,7 @@ pub fn request(
|
|
|
|
|
|
// Ensure the credential can be correctly shown: it must be the case
|
|
|
// that level_since + UNTRUSTED_INTERVAL <= today.
|
|
|
- let level_since: u64 = match scalar_u64(&lox_cred.level_since) {
|
|
|
+ let level_since: u32 = match scalar_u32(&lox_cred.level_since) {
|
|
|
Some(v) => v,
|
|
|
None => return Err(ProofError::VerificationFailure),
|
|
|
};
|