Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

secp256k1 key generation, signing, and verification #3

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Conversation

amika-sq
Copy link
Contributor

This PR implements secp256k1 key generation, signing, and verification in Swift.

The secp256k1 algorithm is provided by the secp256k1.swift package. This PR hooks up that algorithm to the various functions we use in web5/tbDEX to convert to/from JWKs.

This PR also uses the test vectors from web5-js to ensure compatibility with our other SDKs. Reviewers can skip over these JSON files, as they're just copy pasted from that repo.

I also went ahead and re-created the tests from web5-js that weren't covered by the test vectors, just to ensure that Swift was doing things properly.

@@ -29,7 +29,8 @@ let package = Package(
name: "tbDEXTests",
dependencies: ["tbDEX"],
resources: [
.copy("TestVectors/ed25519")
.copy("TestVectors/ed25519"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, is it expected for there to be an ed25519 folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amika-sq amika-sq merged commit 78d3e4f into main Dec 19, 2023
1 check passed
@amika-sq amika-sq deleted the secp256k1 branch December 19, 2023 14:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants