Skip to content

crypto: one verb: crypto::encode and crypto::decode removed, crypto's types declared to codecs, PEM's label in its type - #23

Merged
pinhopro merged 26 commits into
mainfrom
crypto/one-verb
Dec 3, 2026
Merged

pinhopro merged 26 commits into
mainfrom
crypto/one-verb

Conversation

@pinhopro

@pinhopro pinhopro commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

crypto's change one-verb (webcpporg/proposals, libraries/crypto/openspec/changes/one-verb/, owner decision 29). It builds on codecs#3.

  • crypto::encode and crypto::decode are removed with no alias. Every caller, test, example and page now writes codecs::encode and codecs::decode, and the members are unchanged.
  • crypto's types are declared to codecs through codecs::value_formats. D3's sentences keep their texts, and codecs gives the type's list for a format the type does not have.
  • formats::pem_t<F> is codecs::over<codecs::formats::basic_armor<detail::pem_label<F>>, F>. No verb can write or read another label, and every PEM result is exactly as long as its longest text.
  • PEM decodes through codecs' over in place. detail::decode_pem is removed.
  • An input past a pair's bound is codecs::error::input_too_long on every path, and each pair's largest valid input is pinned to decode.
  • secp256k1's keypair::decode(format, input, memory_resource) accepts raw, pkcs8 and pem(pkcs8). Any other format stops the build with one sentence.
  • The guide, the README, the tables and the changelog's source entry are updated, and every generated file is regenerated.

Verified locally on the final head, with no CI run (owner's rule):

  • the five lanes from scratch over crypto's test, example and fuzz;
  • the doc, with generate.py --check and generate_test;
  • MSVC 14.3 and 14.5 x64 debug, the test/msvc twins included;
  • arm64 14.5's timing set;
  • crypto's constant-time and fuzz lanes on Linux;
  • the macOS and Linux full lints;
  • the native dudect programs (release).

🤖 Generated with Claude Code

R added 26 commits December 2, 2026 21:56
…e_pem removed; an input past a pair's bound is input_too_long on every path
…rmor's own state's wipes, a payload of its size in the corpus
…EM's label is in its type; the members call codecs' verbs
…ith one sentence; an armor label compared by its value; the JWK toy's list noted
…the same errors on every toolchain; messages page regenerated
…'s label in its type and input_too_long past a format's bound
…thin it; the resource member's refusal as built; lines wrapped
…ugh every verb, past the bound of 48; the size rows within the bound; README and formats.adoc lines wrapped
…es with crypto's sentence that it decodes from a text, its one error
@pinhopro
pinhopro merged commit b19a26e into main Dec 3, 2026
1 of 8 checks passed
@pinhopro
pinhopro deleted the crypto/one-verb branch December 3, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant