Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Wycheproof eddsa_test to v1 (renamed to ed25519_test) #159

Merged
merged 2 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Tests/CryptoTests/Signatures/ECDSA/ECDSASignatureTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ struct SignatureTestVector: Codable {

struct EdDSATestGroup: Codable {
let tests: [SignatureTestVector]
let key: EdDSAKey
let publicKey: EdDSAPublicKey
}

struct EdDSAKey: Codable {
struct EdDSAPublicKey: Codable {
let pk: String
}

Expand All @@ -57,7 +57,7 @@ class SignatureTests: XCTestCase {
try orFail {
try wycheproofTest(
bundleType: self,
jsonName: "eddsa_test",
jsonName: "ed25519_test",
testFunction: { (group: EdDSATestGroup) in
try orFail { try testEdGroup(group: group) }
})
Expand Down Expand Up @@ -114,7 +114,7 @@ class SignatureTests: XCTestCase {
}

func testEdGroup(group: EdDSATestGroup, file: StaticString = #file, line: UInt = #line) throws {
let keyBytes = try orFail { try Array(hexString: group.key.pk) }
let keyBytes = try orFail { try Array(hexString: group.publicKey.pk) }
let key = try orFail { try Curve25519.Signing.PublicKey(rawRepresentation: keyBytes) }

for testVector in group.tests {
Expand Down
Loading