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

Replace Sodium with CryptoSwift #140

Merged
merged 1 commit into from
Apr 5, 2024
Merged

Conversation

tyiu
Copy link
Contributor

@tyiu tyiu commented Apr 5, 2024

Using Sodium, which is backed by a C library, broke documentation generation for some reason. We were using it for the ChaCha20 cipher for NIP-44 encryption, introduced in this commit: f1384b7

This PR replaces Sodium with CryptoSwift, a pure Swift library, which implements the ChaCha20 cipher and seems to fix documentation generation. I tried it both locally and on the main remote branch on my fork.

The fact that NIP44v2EncryptingTests passes gives me confidence that the CryptoSwift usage is functionally equivalent to what we were doing with Sodium.

@tyiu tyiu requested a review from bryanmontz April 5, 2024 03:44
Copy link
Collaborator

@bryanmontz bryanmontz left a comment

Choose a reason for hiding this comment

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

I'm way out of my depth here. But I love the fact that you changed the guts and didn't have to touch the related tests. 👍

@bryanmontz bryanmontz merged commit 3454d4b into main Apr 5, 2024
4 checks passed
@bryanmontz bryanmontz deleted the tyiu/sodium-to-cryptoswift branch April 5, 2024 11:55
RandyMcMillan pushed a commit to RandyMcMillan/nostr-sdk-ios that referenced this pull request Sep 1, 2024
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