Rebased on stage 6b. The hook of the signature of alg 1, which 6b named
AuthorKey, is now AuthorSigner, and AuthorKey of authorkey.dart implements
it. The tests of the writer sign the capsules of alg 1 with the AuthorKey
of Go's seed instead of replaying the recorded signature, and write the
bytes of Go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lib/datekeys.dart exports the writer of capsules, and what its options
take: X25519Recipient and checkX25519Recipient, RandomSource and
secureRandom. The tests that imported them from their modules no longer
need to. tool/encrypt3_bench.dart times the writer on the VM and in
Node.js.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing reaches the sink before the signature; the sink receives the
prelude first, each buffer its own; a sink that fails stops the writing
with its error and is aborted, one that fails to close is not; a hook or a
source that throws a DateKeysException keeps its code, anything else is a
CapsuleWriteException with its cause; a string that is not well-formed
UTF-16 is not valid UTF-8 for Go; a source is read in streaming; the
result and its .dkk; and, on the VM, two capsules of the CSPRNG differ and
open.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>