Skip to content

Documentation cleanup and idiomatic, faster word load/store - #11

Merged
schultz-is merged 2 commits into
trunkfrom
chore/readme-license-typos
Aug 3, 2026
Merged

Documentation cleanup and idiomatic, faster word load/store#11
schultz-is merged 2 commits into
trunkfrom
chore/readme-license-typos

Conversation

@schultz-is

Copy link
Copy Markdown
Owner

No description provided.

- Remove the Go Report Card badge from the README.
- Update the copyright email in LICENSE to schultz@sent.com.
- Fix "block ciphers modes" -> "block cipher modes" (README, twice).
- Correct New1024 doc comment: the key must be 128 bytes, not 64 (copy-paste
  from New512; the code already enforces 128 via blockSize1024).
- Replace the package-level loadWord/storeWord function-value aliases with direct
  binary.LittleEndian.Uint64/PutUint64 calls. Assigning stdlib functions to
  package vars is non-idiomatic, and calling through the variable is an indirect
  call the compiler cannot inline -- it defeats the single-instruction intrinsic
  these normally compile to. Removing the indirection is measurably faster
  (Apple M1 Ultra, Go 1.26): geomean -8.2%, e.g. Threefish1024/encrypt -15.5%,
  Threefish512/encrypt -10.9%, Threefish256/encrypt -6.5% (256-decrypt is
  unchanged -- it is dependency-chain bound, not load/store bound).

- Add compile-time interface assertions (var _ cipher.Block = (*cipherN)(nil))
  documenting and enforcing that each cipher type satisfies crypto/cipher.Block.

Behavior is unchanged; the known-answer vectors still pass.
@schultz-is
schultz-is merged commit 30fd14e into trunk Aug 3, 2026
3 checks passed
@schultz-is
schultz-is deleted the chore/readme-license-typos branch August 3, 2026 07:29
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