Skip to content

Commit

Permalink
Update Wycheproof ecdsa_secp*_test.json to v1 (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjon authored Apr 6, 2023
1 parent 401a7a8 commit d1047c1
Show file tree
Hide file tree
Showing 6 changed files with 22,920 additions and 12,053 deletions.
4 changes: 2 additions & 2 deletions Tests/CryptoTests/Signatures/ECDSA/ECDSASignatureTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import XCTest

struct ECDSATestGroup: Codable {
let tests: [SignatureTestVector]
let key: ECDSAKey
let publicKey: ECDSAKey
}

struct ECDSAKey: Codable {
Expand Down Expand Up @@ -149,7 +149,7 @@ class SignatureTests: XCTestCase {
}

func testGroup<C: NISTSigning, HF: HashFunction>(group: ECDSATestGroup, curve: C.Type, hashFunction: HF.Type, file: StaticString = #file, line: UInt = #line) throws where C.ECDSASignature == C.PublicKey.Signature {
let keyBytes = try orFail(file: file, line: line) { try Array(hexString: group.key.uncompressed) }
let keyBytes = try orFail(file: file, line: line) { try Array(hexString: group.publicKey.uncompressed) }
let key = try orFail(file: file, line: line) { try C.PublicKey(x963Representation: keyBytes) }

for testVector in group.tests {
Expand Down
Loading

0 comments on commit d1047c1

Please sign in to comment.