Fixes T10 of the review of the session of 1 and 2 October: no test checked
that Go opens what encryptFiles writes today, since capsule-vectors.json
came from c3c124a, with an area of 512 bytes and no note.
- capsule-ts-samples.mjs writes format 2 with encryptVectors of
testing/encrypt.ts, as a generator of test vectors, and format 3 with
encryptFiles, as any caller writes it: the six samples of before, now
with the area of 32 KiB, and two more with a public note, one out of
ASCII, and one of 1024 bytes in time_and_key beside another noncritical
extension of the header.
- capsule-go-verdicts.go records the size of the area that capsule.Open
gives, the note that Header.PublicNote reads, the text of capsule.Encrypt
for a public note in format 2, and the text of capsule.EncryptFiles for
nine public notes that break their rules.
- interop.test.ts requires Go to open each of the 21 samples with each
credential, to find the area of 32 KiB in format 3 and to read the note
written, and this library to read the same note; and the texts of the 22
options and of the 9 notes to be those of Go.
Go at spec-v0.11 (ae33434) opens the 21 samples with each credential and
with all of them, encodes their objects again byte for byte, and gives the
texts of this library for the 22 options and the 9 notes; the four mixes,
the 500 inputs of the encoder differential and the 22 recipients give what
they gave. npm run verify passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
// The public note of spec v0.11 §24.1, in PUBLIC_HEADER, which Go reads with
// Header.PublicNote: one out of ASCII, and one of the 1024 bytes of the most,
// beside a noncritical extension of the header, in time_and_key.
samples.push(awaitfilesSample('format 3: a public note',[['carta.txt',content(500,15)]],base({publicNote:'Cartas del viaje a Lisboa · 2026, para abrir en familia'})));
samples.push(
awaitfilesSample(
'format 3: time_and_key, a portable key and a public note of 1024 bytes',
@ -147,30 +160,36 @@ describe('capsules of the writer, opened by the Go reference (capsule-vectors.js
]);
});
it('holds the samples of format 3: one file, a tree over two chunks, a comment alone, bloque256, time_and_key and head extensions',()=>{
it('holds the samples of format 3, written as any caller writes them: one file, a tree over two chunks, a comment alone, bloque256, time_and_key, head extensions and public notes',()=>{