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

add ed25519 functions #23

Merged
merged 3 commits into from
Jun 26, 2024
Merged

add ed25519 functions #23

merged 3 commits into from
Jun 26, 2024

Conversation

qiweiii
Copy link
Contributor

@qiweiii qiweiii commented Jun 26, 2024

#3

Copy link
Member

@xlc xlc left a comment

Choose a reason for hiding this comment

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

we will want some abstraction over the crypto functions so that for example we can replace the ed25519 crypto to a dummy one for testing / debugging purpose. but that can happen later


public func sign(message: Data) throws -> Data64 {
guard let signature = try? secretKey.signature(for: message) else {
throw SigningError.signatureError
Copy link
Member

Choose a reason for hiding this comment

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

we don't really want to hide the upstream error. just let it propagate will be enough

@qiweiii qiweiii merged commit a1718fe into master Jun 26, 2024
2 checks passed
@qiweiii qiweiii deleted the ed25519 branch June 26, 2024 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants