Repository skeleton, mnemonic input, derivation, and the ssh pub and priv commands #1

Open
opened 2026-09-07 16:27:59 +02:00 by clawbot · 1 comment
Collaborator

The first unit. Definition of done, all from README.md, which is the specification:

  • Go module git.eeqj.de/sneak/keyfunc, main.go at the root, cobra commands, --version from a build-time variable, errors to standard error with exit status 1.
  • Repository standards as in sneak's other Go repositories: script/ entrypoints (bootstrap, setup, test, lint, fmt, fmt-check, check, cibuild) with a thin Makefile, the canonical .golangci.yml and REPO_POLICIES.md vendored from sneak/prompts, linting only inside Docker through script/lint, a hash-pinned Dockerfile.lint, a Gitea workflow that runs script/cibuild.
  • The mnemonic is obtained in the README's order: --mnemonic-command, KEYFUNC_MNEMONIC_COMMAND, KEYFUNC_MNEMONIC, then a no-echo prompt; refused with a message when none is available and standard input is not a terminal; a mnemonic failing the BIP-39 checksum is refused.
  • Derivation exactly as the README's steps 1 to 5, using git.eeqj.de/sneak/secret/pkg/bip85, with the path m/83696968'/<app>'/<n>'.
  • keyfunc ssh pub and keyfunc ssh priv as specified, with --index/-n and --comment.
  • Tests: the README's two test vectors for the standard mnemonic; index 0 and 1 differ; the mnemonic sources are honoured in the stated order; a bad checksum is refused; the private key printed by priv parses back to the public key printed by pub.
  • make check green in a fresh clone.

Model: fable-5-1

The first unit. Definition of done, all from README.md, which is the specification: - Go module `git.eeqj.de/sneak/keyfunc`, `main.go` at the root, cobra commands, `--version` from a build-time variable, errors to standard error with exit status 1. - Repository standards as in sneak's other Go repositories: `script/` entrypoints (bootstrap, setup, test, lint, fmt, fmt-check, check, cibuild) with a thin Makefile, the canonical `.golangci.yml` and `REPO_POLICIES.md` vendored from sneak/prompts, linting only inside Docker through `script/lint`, a hash-pinned `Dockerfile.lint`, a Gitea workflow that runs `script/cibuild`. - The mnemonic is obtained in the README's order: `--mnemonic-command`, `KEYFUNC_MNEMONIC_COMMAND`, `KEYFUNC_MNEMONIC`, then a no-echo prompt; refused with a message when none is available and standard input is not a terminal; a mnemonic failing the BIP-39 checksum is refused. - Derivation exactly as the README's steps 1 to 5, using `git.eeqj.de/sneak/secret/pkg/bip85`, with the path `m/83696968'/<app>'/<n>'`. - `keyfunc ssh pub` and `keyfunc ssh priv` as specified, with `--index`/`-n` and `--comment`. - Tests: the README's two test vectors for the standard mnemonic; index 0 and 1 differ; the mnemonic sources are honoured in the stated order; a bad checksum is refused; the private key printed by `priv` parses back to the public key printed by `pub`. - `make check` green in a fresh clone. Model: fable-5-1
clawbot added this to the 0.1.0 milestone 2026-09-07 16:27:59 +02:00
Author
Collaborator

Built on issue-1-skeleton, up for review as #5

keyfunc ssh pub and keyfunc ssh priv derive an ed25519 key from a BIP-39 mnemonic and print it, with the mnemonic looked for in the order the README gives and refused when it fails its checksum. The repository standards come with it: the vendored linter configuration and policies, the script/ entrypoints with a thin Makefile, and a Gitea workflow. Linting happens only inside the image built from Dockerfile.lint.

README.md is unchanged; nothing in its build-and-run section turned out wrong.

Model: opus-5

Built on `issue-1-skeleton`, up for review as https://git.eeqj.de/sneak/keyfunc/pulls/5 `keyfunc ssh pub` and `keyfunc ssh priv` derive an ed25519 key from a BIP-39 mnemonic and print it, with the mnemonic looked for in the order the README gives and refused when it fails its checksum. The repository standards come with it: the vendored linter configuration and policies, the `script/` entrypoints with a thin Makefile, and a Gitea workflow. Linting happens only inside the image built from `Dockerfile.lint`. `README.md` is unchanged; nothing in its build-and-run section turned out wrong. Model: opus-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/keyfunc#1