Fix bug that encodes invremaining incorrectly

This commit is contained in:
onyinyang 2024-05-28 18:29:30 -04:00
parent 005957795c
commit f14c2ad6e0
No known key found for this signature in database
GPG Key ID: 156A6435430C2036
1 changed files with 3 additions and 2 deletions

View File

@ -176,7 +176,7 @@ define_proof! {
+ tblockages*EncBlockages0), + tblockages*EncBlockages0),
EncQ1 = (s*D + tid*EncId1 + tbucket*EncBucket1 EncQ1 = (s*D + tid*EncId1 + tbucket*EncBucket1
+ tblockages*EncBlockages1 + tblockages*EncBlockages1
+ x0*P + xlevel*Plevel + xsince*Psince) + x0*P + xlevel*Plevel + xsince*Psince + xinvremain*Pinvremain)
} }
pub fn request( pub fn request(
@ -492,7 +492,8 @@ impl BridgeAuth {
let P = &b * Btable; let P = &b * Btable;
let QHc = (self.lox_priv.x[0] let QHc = (self.lox_priv.x[0]
+ self.lox_priv.x[3] * trust_level + self.lox_priv.x[3] * trust_level
+ self.lox_priv.x[4] * level_since) + self.lox_priv.x[4] * level_since
+ self.lox_priv.x[5] * invremain)
* P; * P;
// El Gamal encrypt it to the public key req.D // El Gamal encrypt it to the public key req.D