René's URL Explorer Experiment


Title: Refactor EC key padding length lookup into shared cryptoECC helper; add BN-254 support by Copilot · Pull Request #26 · microsoft/MSR-JavaScript-Crypto · GitHub

Open Graph Title: Refactor EC key padding length lookup into shared cryptoECC helper; add BN-254 support by Copilot · Pull Request #26 · microsoft/MSR-JavaScript-Crypto

X Title: Refactor EC key padding length lookup into shared cryptoECC helper; add BN-254 support by Copilot · Pull Request #26 · microsoft/MSR-JavaScript-Crypto

Description: PR #25’s leading-zero padding logic introduced four duplicated curve-length tables in ECDH/ECDSA, and all four omitted BN-254. This change consolidates curve element-length resolution into a single shared source and makes lookups case-insensitive to avoid drift and mismatches. Shared curve element-length source in cryptoECC Added curveElementLengths in src/cryptoECC.js with the full supported set, including "BN-254": 32. Added/exported cryptoECC.curveElementLength(curveName) to normalize via toUpperCase() and return the fixed element byte length. Replaced duplicated partLen tables (4 call sites) src/ecdh.js generateKey importKey (p.format === "jwk") src/ecdsa.js generateKey importKey (p.format === "jwk") Each now reads from cryptoECC.curveElementLength(...) instead of inline object literals. Targeted BN-254 coverage updates in existing ECC tests Added BN-254 key-generation test cases in test/Test.Ecdh.js and test/Test.Ecdsa.js. Updated test key-length checks to use cryptoECC.curveElementLength(...) directly instead of duplicated ecdhKeyLengths / ecdsaKeyLengths tables. Example of the lookup change: // before var partLen = { "P-256": 32, "P-384": 48, "P-521": 66, "NUMSP256D1": 32, "NUMSP256T1": 32, "NUMSP384D1": 48, "NUMSP384T1": 48, "NUMSP512D1": 64, "NUMSP512T1": 64 }[p.algorithm.namedCurve]; // after var partLen = cryptoECC.curveElementLength(p.algorithm.namedCurve);

Open Graph Description: PR #25’s leading-zero padding logic introduced four duplicated curve-length tables in ECDH/ECDSA, and all four omitted BN-254. This change consolidates curve element-length resolution into a single...

X Description: PR #25’s leading-zero padding logic introduced four duplicated curve-length tables in ECDH/ECDSA, and all four omitted BN-254. This change consolidates curve element-length resolution into a single...

Opengraph URL: https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:21119f1b-c1c0-94bf-cde0-027968a48e00
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8A30:C1A48:5975B2:79070B:6A629FDD
html-safe-nonce4bfe46aba85348261911fd78d37f897f655be1f7962643f9b1268e6db8952c5a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTMwOkMxQTQ4OjU5NzVCMjo3OTA3MEI6NkE2MjlGREQiLCJ2aXNpdG9yX2lkIjoiMjYxNzA1MDI2Mzg4Nzk3ODQ2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0bb45099f4b588ac37be55b9c78c8cd5898cd89a51ec8534c95ab1a5018b810a
hovercard-subject-tagpull_request:3948491120
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
twitter:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
og:image:altPR #25’s leading-zero padding logic introduced four duplicated curve-length tables in ECDH/ECDSA, and all four omitted BN-254. This change consolidates curve element-length resolution into a single...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonea6443033349a18134b517627f043d4a59a5110337b879810c7229c2c7e28eda0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/microsoft/MSR-JavaScript-Crypto git https://github.com/microsoft/MSR-JavaScript-Crypto.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id198688283
octolytics-dimension-repository_nwomicrosoft/MSR-JavaScript-Crypto
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id198688283
octolytics-dimension-repository_network_root_nwomicrosoft/MSR-JavaScript-Crypto
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released6c6cacbe32d3ddfd1796fbd1a39b8fb47b87daf
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FMSR-JavaScript-Crypto%2Fpull%2F26%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FMSR-JavaScript-Crypto%2Fpull%2F26%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=microsoft%2FMSR-JavaScript-Crypto
Reloadhttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
Reloadhttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
Reloadhttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
Please reload this pagehttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
microsoft https://github.com/microsoft
MSR-JavaScript-Cryptohttps://github.com/microsoft/MSR-JavaScript-Crypto
Notifications https://github.com/login?return_to=%2Fmicrosoft%2FMSR-JavaScript-Crypto
Fork 32 https://github.com/login?return_to=%2Fmicrosoft%2FMSR-JavaScript-Crypto
Star 67 https://github.com/login?return_to=%2Fmicrosoft%2FMSR-JavaScript-Crypto
Code https://github.com/microsoft/MSR-JavaScript-Crypto
Issues 1 https://github.com/microsoft/MSR-JavaScript-Crypto/issues
Pull requests 0 https://github.com/microsoft/MSR-JavaScript-Crypto/pulls
Actions https://github.com/microsoft/MSR-JavaScript-Crypto/actions
Models https://github.com/microsoft/MSR-JavaScript-Crypto/models
Security and quality 0 https://github.com/microsoft/MSR-JavaScript-Crypto/security
Insights https://github.com/microsoft/MSR-JavaScript-Crypto/pulse
Code https://github.com/microsoft/MSR-JavaScript-Crypto
Issues https://github.com/microsoft/MSR-JavaScript-Crypto/issues
Pull requests https://github.com/microsoft/MSR-JavaScript-Crypto/pulls
Actions https://github.com/microsoft/MSR-JavaScript-Crypto/actions
Models https://github.com/microsoft/MSR-JavaScript-Crypto/models
Security and quality https://github.com/microsoft/MSR-JavaScript-Crypto/security
Insights https://github.com/microsoft/MSR-JavaScript-Crypto/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fmicrosoft%2FMSR-JavaScript-Crypto%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmicrosoft%2FMSR-JavaScript-Crypto%2Fissues%2Fnew%2Fchoose
ljoy913https://github.com/ljoy913
ljoy/update-build-dependencieshttps://github.com/microsoft/MSR-JavaScript-Crypto/tree/ljoy/update-build-dependencies
copilot/fix-bn-254-padding-issuehttps://github.com/microsoft/MSR-JavaScript-Crypto/tree/copilot/fix-bn-254-padding-issue
Conversation 1 https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26
Commits 3 https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/commits
Checks 1 https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/checks
Files changed https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
Please reload this pagehttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
Refactor EC key padding length lookup into shared cryptoECC helper; add BN-254 support https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#top
Show all changes 3 commits https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
0f09596 Initial plan Copilot Jun 27, 2026 https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/commits/0f09596fda6effb83de839c36353462e06ba1f12
9d1221a Apply remaining changes Copilot Jun 27, 2026 https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/commits/9d1221addf0d85846deec304288cd38d2d46562a
36444a3 Apply remaining changes Copilot Jun 27, 2026 https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/commits/36444a3a486b3e3c1969a2ffca3cfd468a93c010
Clear filters https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
Please reload this pagehttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
Please reload this pagehttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files
cryptoECC.js https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-3e4180f7905a0121b35b6f5e505b6bd1063a078045d6b1b0fbfa170b476c22ef
ecdh.js https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-66e433e4ced51b534307ff3b7b9cfd5546d2690df268c959d0c1c99c2cf7b916
ecdsa.js https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-7f52b21d9e51e486f00cacf34e70845b387fb766667d32df3f27c2628a02ebff
Test.Ecdh.js https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-8c44d2a332b7d673a5e619875a27498465a109caa2e3df888c450c8a81f79b5e
Test.Ecdsa.js https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-cae5e99c3151bc1b40098498fbd2a0de930fea32f0e06b31ce057949eca89822
src/cryptoECC.jshttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-3e4180f7905a0121b35b6f5e505b6bd1063a078045d6b1b0fbfa170b476c22ef
View file https://github.com/microsoft/MSR-JavaScript-Crypto/blob/36444a3a486b3e3c1969a2ffca3cfd468a93c010/src/cryptoECC.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/{{ revealButtonHref }}
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-3e4180f7905a0121b35b6f5e505b6bd1063a078045d6b1b0fbfa170b476c22ef
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-3e4180f7905a0121b35b6f5e505b6bd1063a078045d6b1b0fbfa170b476c22ef
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-3e4180f7905a0121b35b6f5e505b6bd1063a078045d6b1b0fbfa170b476c22ef
src/ecdh.jshttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-66e433e4ced51b534307ff3b7b9cfd5546d2690df268c959d0c1c99c2cf7b916
View file https://github.com/microsoft/MSR-JavaScript-Crypto/blob/36444a3a486b3e3c1969a2ffca3cfd468a93c010/src/ecdh.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/{{ revealButtonHref }}
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-66e433e4ced51b534307ff3b7b9cfd5546d2690df268c959d0c1c99c2cf7b916
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-66e433e4ced51b534307ff3b7b9cfd5546d2690df268c959d0c1c99c2cf7b916
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-66e433e4ced51b534307ff3b7b9cfd5546d2690df268c959d0c1c99c2cf7b916
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-66e433e4ced51b534307ff3b7b9cfd5546d2690df268c959d0c1c99c2cf7b916
src/ecdsa.jshttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-7f52b21d9e51e486f00cacf34e70845b387fb766667d32df3f27c2628a02ebff
View file https://github.com/microsoft/MSR-JavaScript-Crypto/blob/36444a3a486b3e3c1969a2ffca3cfd468a93c010/src/ecdsa.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/{{ revealButtonHref }}
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-7f52b21d9e51e486f00cacf34e70845b387fb766667d32df3f27c2628a02ebff
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-7f52b21d9e51e486f00cacf34e70845b387fb766667d32df3f27c2628a02ebff
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-7f52b21d9e51e486f00cacf34e70845b387fb766667d32df3f27c2628a02ebff
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-7f52b21d9e51e486f00cacf34e70845b387fb766667d32df3f27c2628a02ebff
test/Test.Ecdh.jshttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-8c44d2a332b7d673a5e619875a27498465a109caa2e3df888c450c8a81f79b5e
View file https://github.com/microsoft/MSR-JavaScript-Crypto/blob/36444a3a486b3e3c1969a2ffca3cfd468a93c010/test/Test.Ecdh.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/{{ revealButtonHref }}
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-8c44d2a332b7d673a5e619875a27498465a109caa2e3df888c450c8a81f79b5e
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-8c44d2a332b7d673a5e619875a27498465a109caa2e3df888c450c8a81f79b5e
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-8c44d2a332b7d673a5e619875a27498465a109caa2e3df888c450c8a81f79b5e
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-8c44d2a332b7d673a5e619875a27498465a109caa2e3df888c450c8a81f79b5e
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-8c44d2a332b7d673a5e619875a27498465a109caa2e3df888c450c8a81f79b5e
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-8c44d2a332b7d673a5e619875a27498465a109caa2e3df888c450c8a81f79b5e
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-8c44d2a332b7d673a5e619875a27498465a109caa2e3df888c450c8a81f79b5e
test/Test.Ecdsa.jshttps://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-cae5e99c3151bc1b40098498fbd2a0de930fea32f0e06b31ce057949eca89822
View file https://github.com/microsoft/MSR-JavaScript-Crypto/blob/36444a3a486b3e3c1969a2ffca3cfd468a93c010/test/Test.Ecdsa.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/{{ revealButtonHref }}
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-cae5e99c3151bc1b40098498fbd2a0de930fea32f0e06b31ce057949eca89822
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-cae5e99c3151bc1b40098498fbd2a0de930fea32f0e06b31ce057949eca89822
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-cae5e99c3151bc1b40098498fbd2a0de930fea32f0e06b31ce057949eca89822
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-cae5e99c3151bc1b40098498fbd2a0de930fea32f0e06b31ce057949eca89822
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-cae5e99c3151bc1b40098498fbd2a0de930fea32f0e06b31ce057949eca89822
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-cae5e99c3151bc1b40098498fbd2a0de930fea32f0e06b31ce057949eca89822
https://github.com/microsoft/MSR-JavaScript-Crypto/pull/26/files#diff-cae5e99c3151bc1b40098498fbd2a0de930fea32f0e06b31ce057949eca89822
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.