Skip to content

Commit

Permalink
variable issue oops
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Quijano committed Mar 3, 2024
1 parent e7955c5 commit a5c60af
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/security/socialistmillionaire/alice.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ public boolean Protocol1(BigInteger x)

// Step 1: Get Y bits from Bob
Encrypted_Y = get_encrypted_bits();
BigInteger early_terminate = unequal_bit_check(x, Encrypted_Y);
if (early_terminate.equals(BigInteger.ONE)) {
return true;
}
else if (early_terminate.equals(BigInteger.ZERO)) {
return false;
}

// Otherwise, if the bit size is equal, proceed!
// Step 2: compute Encrypted X XOR Y
Expand Down

0 comments on commit a5c60af

Please sign in to comment.