Skip to content

Use Node OpenSSL for iOS backend curve operations - #3541

Closed
holmesworcester wants to merge 1 commit into
10.0.0from
fix/ios-openssl-crypto
Closed

holmesworcester wants to merge 1 commit into
10.0.0from
fix/ios-openssl-crypto

Conversation

@holmesworcester

@holmesworcester holmesworcester commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

iOS Node Mobile runs libsodium's JavaScript curve operations without JIT or WASM. This adapter uses the OpenSSL already shipped in Node for six Ed25519/X25519 operations, preserving sodium wire formats, output behavior, and rejection policy.

This is the native-crypto portion split out of #3539. It is kept as a draft alternative while a native libsodium implementation is being developed. It targets 10.0.0 directly, retains that branch's existing auth submodule revision, and has no dependency on the indexing or LFA caching changes.

The change contains only the iOS-gated adapter, webpack loader, documentation, and crypto tests. Capability/version checks retain the original implementation on unsupported runtimes; exceptional Ed25519 encodings still undergo sodium verification. Other platforms keep their existing implementation. No QSS release or data migration is required.

Validation: all 13 native differential/webpack tests pass on Node 18.20.4 and 20.20.1. Coverage includes 151 Ed25519 and 518 X25519 Wycheproof cases, tampering, malformed keys, atomic initialization/fallback, and real webpack activation across five platform identities. The adapter and tests are byte-for-byte the previously audited final implementation. Daybreak Blue accepted the native-only split with no concrete findings; its independent 16-test adversarial suite also passed. The earlier combined iPhone performance results do not measure this branch alone.

Related to #3538. The processing changes remain in #3539 and TryQuiet/auth#39.

@holmesworcester

Copy link
Copy Markdown
Collaborator Author

We'll use libsodium natively in a later fix.

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.

1 participant