Skip to content

v0.2.12

Choose a tag to compare

@github-actions github-actions released this 03 Oct 17:20
· 113 commits to master since this release
5c2f1be

Language

  • Secret is text that must not leak: hide(text) answers a Result<Secret, SecretError> kept in memory that is never swapped to disk, and reveal(secret) is the only way back to a Str.
  • bypass(text) is a Secret that cannot fail, kept in ordinary memory that may be swapped out.
  • hive.Secret and hive.SecretError reach the builtins from a program that declares its own.
  • A Secret is never shown: echo, panic, interpolation, encode and a service message refuse one, or anything holding one, at compile time.
  • == on secrets compares what they hold, in constant time.

Standard library

  • hive.crypto.encrypt and decrypt keep the plaintext a Secret, under a Secret password, and hmacSha256 and jwtCodec take a Secret key.
  • hive.term.readSecret() answers a Result<Secret, SecretError>, read straight into locked memory, and hive.file.writeSecret and hive.syslink.setKey take a Secret.
  • hive.env.getSecret(name) is get answering a Secret, and hive.crypto.randomSecret(bytes) is randomHex drawn into locked memory, answering a Result.
  • hive.ui.touch(name) makes any widget a thumb control. While a finger is on it, a scene's onPad hears pad -1: name is 1 while the finger is down and 0 once it lifts, and nameX and nameY are where on the widget it is, -1 to 1 from the middle and held inside a circle. Every finger is followed on its own, so a stick and a button can be held together, and the widget's box is taken when the finger goes down, so a repaint under it moves nothing. The page neither scrolls nor zooms under one.

Tooling

  • hive test <directory> runs every test under it that git does not ignore, plus those of anything outside it that a file inside imports, each file's tests once.

Breaking

was is
hive.crypto.encrypt(text, password) hive.crypto.encrypt(bypass(text), bypass(password))
hive.crypto.decrypt(sealed, password) → Result<Str, _> hive.crypto.decrypt(sealed, bypass(password)) → Result<Secret, _>
hive.crypto.hmacSha256(input, key), hive.crypto.jwtCodec(key) bypass(key)
hive.term.readSecret() → Str → Result<Secret, SecretError>; reveal the Secret for the text
hive.file.writeSecret(path, text), hive.syslink.setKey(key) bypass(text), bypass(key)

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.2.12
asset:  hivec-linux-amd64
sha256: a9fb972dc42fe5707352b4268c36c77aa3018cd195bf216944f60e014f529f1d