-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reconstructKey: Remove ciphertext padding
Previously, the ciphertext was padded. However, ciphertexts should in general not be padded, as it leads to decryption errors. Here we remove the padding.
- Loading branch information
1 parent
61b3668
commit 5ab777a
Showing
2 changed files
with
23 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -413,10 +413,9 @@ final class SapphireTest: XCTestCase { | |
} | ||
} | ||
|
||
func testAggregrateLogin() async throws { | ||
func testAggregrateLoginWithEmail(email: String) async throws { | ||
let exp1 = XCTestExpectation(description: "Should be able to aggregate login") | ||
|
||
let email = generateRandomEmail(of: 6) | ||
|
||
print("email", email) | ||
let verifier: String = TORUS_TEST_AGGREGATE_VERIFIER | ||
let verifierID: String = email | ||
|
@@ -447,4 +446,16 @@ final class SapphireTest: XCTestCase { | |
} | ||
} | ||
|
||
func testAggregateLoginWithFixedEmail() async throws { | ||
// This fixed email was previously known to trigger an edge case that | ||
// revealed a bug in our share decryption implementation. | ||
let email = "[email protected]" | ||
try await testAggregrateLoginWithEmail(email: email) | ||
} | ||
|
||
func testAggregateLoginWithRandomEmail() async throws { | ||
let email = generateRandomEmail(of: 6) | ||
try await testAggregrateLoginWithEmail(email: email) | ||
} | ||
|
||
} |