apple / apple/swift-crypto

Support for XSalsa20Poly1305

Open
#272 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Assembly
Stars
1.7k
Forks
223
Avg merge
1d 2h
Merged PRs (30d)
7

Description

Many other systems and languages use something like `libsodium` for AEAD. libsodium uses `XSalsa20Poly1305` and not `ChaCha20Poly1305` which means that we cannot easily support communication with these other systems, without introducing a dependency on the libsodium `C` library, for example on iOS or server-side.

Is the `swift-crypto` team open to the idea of adding support for `XSalsa20` in the `_CryptosExtras`? Unfortunately, BoringSSL does not provide any APIs for this (but they do for Poly1305). The implementation of `xsalsa20` would be written in Swift. However, I was uncertain whether any non-boringSSL APIs were allowed in this library or not.

I'd be happy to help drive the implementation forward!

Contributor guide

Open the contributing guide

Research direction

Review the existing _CryptosExtras APIs and the available BoringSSL Poly1305 support first. Confirm the project's policy on non-BoringSSL Swift implementations, then define the XSalsa20Poly1305 API and interoperability expectations with libsodium; done means supported communication without a libsodium C dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cryptography, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.