• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

homebridge / HAP-NodeJS / 40112594215
67%
master: 66%

Build:
Build:
LAST BUILD BRANCH: deps/ciao-1.3.13-beta.8
DEFAULT BRANCH: master
Ran 24 Oct 2026 04:40PM UTC
Jobs 3
Files 50
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Oct 2026 04:39PM UTC coverage: 67.026% (+0.06%) from 66.966%
40112594215

push

github

web-flow
perf: use the native crypto of Node.js for Curve25519 and Ed25519 (#1135)

* perf: use the native crypto of Node.js for Curve25519 and Ed25519

Pair verify and pair setup did their X25519 and Ed25519 with tweetnacl,
in JavaScript. On a Raspberry Pi one pair verify (key pair, shared
secret, sign, verify) took about 115 ms, with the crypto built into
Node.js (OpenSSL) about 2 ms. After a restart every controller connects
to every bridge at once; on a Raspberry Pi with 7 bridges that kept the
event loop busy for seconds (6.5 s of CPU in a profile of one start),
and reads of the controllers timed out meanwhile.

hapCrypto now has generateEd25519KeyPair, ed25519Sign and ed25519Verify
next to the Curve25519 functions, all native. Ed25519 secret keys keep
the 64-byte layout of tweetnacl (seed and public key), so the stored
long-term keys of accessories work unchanged, and the signatures are the
same (Ed25519 is deterministic). generateCurve25519SharedSecKey still
returns zeros for a public key of small order, as tweetnacl did, where
OpenSSL refuses it. ed25519Verify returns false for a signature or
public key of the wrong size instead of throwing.

tweetnacl is only used by the tests now (the test clients and the
cross-checks), so it moves to the devDependencies. The engines field
already requires Node.js 22, which has X25519 and Ed25519.

* fix: return zeros only for a Curve25519 public key of small order

generateCurve25519SharedSecKey returned an all-zero secret for any
error of OpenSSL. Only a public key of small order makes OpenSSL fail
the derivation (ERR_OSSL_FAILED_DURING_DERIVATION) once the key sizes
are checked; that one still gives the zeros tweetnacl returned, any
other error is thrown. The test covers four points of small order (0,
1, a point of order 8, p - 1).

* Potential fix for pull request finding 'Correct comment on small-order key fallback preserving authentication only'

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@... (continued)

2010 of 3471 branches covered (57.91%)

Branch coverage included in aggregate %.

34 of 36 new or added lines in 3 files covered. (94.44%)

6822 of 9706 relevant lines covered (70.29%)

365.63 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
93.94
-0.96% src/lib/util/hapCrypto.ts
Jobs
ID Job ID Ran Files Coverage
1 run-26 - 40112594215.1 24 Oct 2026 04:40PM UTC 50
67.0
GitHub Action Run
2 run-24 - 40112594215.2 24 Oct 2026 04:40PM UTC 50
67.03
GitHub Action Run
3 run-22 - 40112594215.3 24 Oct 2026 04:40PM UTC 50
67.03
GitHub Action Run
Source Files on build 40112594215
  • Tree
  • List 50
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #40112594215
  • f1d8ee7c on github
  • Prev Build on latest (#39332793186)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc