Skip to content

Adhal 0.1.2

Latest

Choose a tag to compare

@khartig khartig released this 28 Oct 04:06

Two fixes in @ad-hal/engine, and none in how a drop works: the wire
format is unchanged, the CLI behaves as before, and a 0.1.0, 0.1.1, or
0.1.2 peer can drop files to any of the others.

npm install --global @ad-hal/cli

Node.js ≥ 24, on macOS or Linux. The packages are
@ad-hal/cli and
@ad-hal/engine, which
the CLI depends on. Any other package that claims to be Adhal is
unofficial.

Security fixes in this release: none that a peer can reach. One
hardens the handshake classes against a caller that misuses them
(Q-22, below). 0.1.0 and 0.1.1 are not deprecated.

What changed

  • A handshake object ends at its first failure, as at its success
    (Q-22). Initiator and Responder wipe their secret material whichever
    way a step ends, but they locked themselves only after a success. So a
    program that called one again after a failure, on the same object, had
    it compute with zeros. A REPLY forged without the code was accepted, or
    a HELLO under an all-zero password was answered. No peer could reach
    this: the CLI, and every entry point the engine's README lists, build a
    new handshake object for each connection and stop using it once it
    throws. Only code calling the two exported classes directly could. Now
    any call after a failure throws "the handshake has already failed".
  • A reason a peer sends is cut at a character boundary. The reason
    in a CANCEL, a DECLINE, or a RESULT error is capped at 256 bytes. Cut
    inside a multi-byte character, it decoded to a replacement character
    and came out up to two bytes over the cap.

Behind both: the first full mutation run over the engine modules that
enforce the protocol, with every surviving mutant triaged and a test
added for each gap it showed, so 92.5% of 751 mutants are now killed
(history/W12-MUTATION-TRIAGE.md).
The tests are not part of either package.

Checking this release

Each of these runs on its own:

npm view @ad-hal/cli@0.1.2 dist.attestations.provenance.predicateType
gh release download v0.1.2 --repo khartig/adhal
sha256sum -c SHA256SUMS
gh attestation verify ad-hal-cli-0.1.2.tgz --repo khartig/adhal
gh attestation verify ad-hal-engine-0.1.2.tgz --repo khartig/adhal

The first command prints https://slsa.dev/provenance/v1. On macOS,
use shasum -a 256 -c SHA256SUMS in place of sha256sum. After an
install, npm audit signatures verifies the registry signatures of
everything installed, and the attestations of both Adhal packages.

The SBOMs list the dependency tree that was locked and tested. Neither
package ships a lockfile, so an install can resolve newer versions of
the packages that Adhal's dependencies depend on. npm sbom describes
what an install actually resolved.

Before you use it

  • Adhal is not anonymous. Each side's IP address is visible to the
    other, and to the DHT nodes near the drop's topic.
  • The code is a bearer capability. Whoever holds it can complete the
    drop.
  • Windows is not supported for security purposes yet.
  • The cryptographic composition has not been independently reviewed.
    The primitives come from @noble and OpenSSL, and the CPace
    implementation reproduces the CFRG test vectors. The review in
    SECURITY-REVIEW.md,
    21 findings and one found since, was AI-assisted, not independent.
  • The JavaScript API of @ad-hal/engine is not stable before 1.0, and
    the CLI's flags may still change. The wire protocol will not.
  • Not built yet: LAN discovery, a relay for networks where a direct
    connection fails, and stable --json events.

What a drop does, the protocol, and what has been measured are in the
0.1.0 release notes.

Support

The latest npm release and the default branch are supported. Report a
vulnerability privately, as
SECURITY.md
describes, not in a public issue. A version with a known vulnerability
will be deprecated on npm, so installing it prints a warning.