feat: add getCurves() to enumerate supported EC curves#913
Merged
Conversation
Add getSupportedCurves() native method using OpenSSL's EC_get_builtin_curves and expose it as getCurves() in the public API, matching Node.js crypto.getCurves(). Includes tests verifying expected curves are present and results are sorted.
Defer HybridObject allocation until getCurves() is actually called, avoiding an unnecessary native object creation at module import time.
Contributor
🤖 End-to-End Test Results - AndroidStatus: ✅ Passed 📸 Final Test ScreenshotScreenshot automatically captured from End-to-End tests and will expire in 30 days This comment is automatically updated on each test run. |
Contributor
🤖 End-to-End Test Results - iOSStatus: ✅ Passed 📸 Final Test ScreenshotScreenshot automatically captured from End-to-End tests and will expire in 30 days This comment is automatically updated on each test run. |
boorad
added a commit
that referenced
this pull request
Feb 11, 2026
Add AES-OCB support to subtle.encrypt/decrypt/generateKey/importKey/ exportKey/wrapKey/unwrapKey, matching Node.js WebCrypto behavior. - Add aesOcbCipher() with OCB-specific validation (tag lengths 64/96/128, IV max 15 bytes) - Fix OCBCipher.cpp tag length minimum from 12 to 8 bytes - Add AesOcbParams type and wire AES-OCB through all subtle API paths - Fix stale coverage docs: wrap/unwrap from #914, getCurves from #913 - Add 11 AES-OCB tests (roundtrip, key sizes, AAD, tag lengths, tampering, wrap/unwrap) Closes #382
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Implements
crypto.getCurves()which returns a sorted array of supported EC curve names from OpenSSL, matching the Node.js API.Changes
getSupportedCurves()native method onHybridEcKeyPairusingEC_get_builtin_curves+OBJ_nid2snecKeyPair.nitro.ts) and regenerate nitrogen bindingsgetCurves()as both a named export and on the defaultQuickCryptoobjectgetCurves() === crypto.getCurves()Testing
Run the ECDH test suite in the example app — two new
getCurvestests are included.Closes #911