Repository navigation
fix(ncrypto): align prime-check cancellation and SEC1 empty-passphrase export with Node f39899d - #1095
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Nov 10, 2026
boorad
force-pushed
the
fix/1094-align-ncrypto-prime-sec1
branch
from
November 10, 2026 12:36
df74177 to
a1912d1
Compare
Collaborator
Author
Collaborator
Author
This branch was successfully deployed
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
Aligns vendored ncrypto with Node
f39899d(nodejs/node#67039):BignumPointer::isPrimenow invokes the callback between repeatedBN_check_prime()rounds, so trial-division primes (e.g.311) can be cancelled.WriteEncryptedTraditionalPEMtakes an encoderselection: PKCS#1 keepsOSSL_KEYMGMT_SELECT_KEYPAIR, SEC1 empty-passphrase export passesOSSL_KEYMGMT_SELECT_ALL.Changes
ef5d829→14d6023: still one RNQC compat commit (EVP-only profile + these fixes) on upstreamc954a1a, now on fork branchboorad/ncrypto:rnqc/evp-only. New gtests: cancel between Miller-Rabin rounds (2^127-1, 65 checks), cancel trial-division prime (311,INT_MAXchecks → one callback,-1), explicit-curve SEC1 empty-passphrase round-trip.boorad/ncryptomainreset to mirrornodejs/ncrypto:main(c954a1a); old pin preserved atbackup/ef5d829so existingmaincheckouts still fetch.create_keys.tsSEC1 encrypted-PEM test now also rejects missing and wrong passphrases (binary passphrase with NUL; empty-passphrase case round-trips).plans/done/1094-align-ncrypto-prime-sec1.md.Note: on OpenSSL 3.6.2,
SELECT_KEYPAIRalready emits explicit-curve parameters for SEC1 type-specific encoding (the new explicit-curve gtest passes pre-fix).SELECT_ALLis kept for Node parity; the gtest is a regression guard.HybridPrimepasses no callback, so the cancel path is not reachable from JS.Testing
14d6023— ncrypto gtest (NCRYPTO_SHARED_LIBS=ON NCRYPTO_EVP_ONLY=ON, openssl@3 3.6.2, googletest 1.18.0) — 37/37 pass; both new prime-cancel tests fail on the pre-fix source — macOS host.14d6023—clang-format --dry-run --Werroron changed ncrypto files — pass.14d6023—OPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3 scripts/check-ncrypto-openssl-deprecations.sh— pass.15a3fc91—bun tsc,bun lint, prettier, pre-commit hooks — pass.a1912d1b(rebased ontomainafter fix(ios): unblock iOS E2E on Xcode 27 / iOS 27 and any checkout path #1096): signed AgentSCM attestation46a39821…, 41 suites / 2,208 tests / 0 failures on each platform, including the new SEC1 passphrase-rejection checks; attestation and screenshots posted as comments.Delivery
Native C++ change: reaches consumers after an npm release and an app rebuild.
Closes #1094
🤖 Generated with Claude Code