Skip to content

keymaster: sign challenge (UTF-8), genesis note, session vault sync#42

Merged
Undline merged 1 commit intomainfrom
dev
Apr 7, 2026
Merged

keymaster: sign challenge (UTF-8), genesis note, session vault sync#42
Undline merged 1 commit intomainfrom
dev

Conversation

@Undline
Copy link
Copy Markdown
Contributor

@Undline Undline commented Apr 7, 2026

Add GET/POST /identities/{id}/sign: paste challenge text, sign UTF-8 bytes with Ed25519, show hex and copy. New profile_sign template, link from profile detail, textarea styles, and a compact genesis tracking strip below the header row (keeps theme toggle on the same line as the nav dock).

Introduce sign_challenge_utf8 with a size cap; document the route in README.

replace_session_vault now updates every in-memory session after a disk write so additional tabs see new identities; only the requesting session gets touch() for idle timing.

Tests: sign round-trip and HTTP flow; session vault sync across two session ids.

Add GET/POST /identities/{id}/sign: paste challenge text, sign UTF-8 bytes with Ed25519, show hex and copy. New profile_sign template, link from profile detail, textarea styles, and a compact genesis tracking strip below the header row (keeps theme toggle on the same line as the nav dock).

Introduce sign_challenge_utf8 with a size cap; document the route in README.

replace_session_vault now updates every in-memory session after a disk write so additional tabs see new identities; only the requesting session gets touch() for idle timing.

Tests: sign round-trip and HTTP flow; session vault sync across two session ids.
Made-with: Cursor
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a371ad4fb4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +423 to +425
try:
sig = sign_challenge_utf8(profile.private_key, challenge)
sig_hex = sig.hex()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize textarea newlines before signing payload

For multi-line challenges submitted through the browser form, <textarea> values are normalized to CRLF line endings on submit, and this handler signs the resulting challenge string as-is. That means a challenge whose canonical bytes use LF can produce a different signature here and fail verification in Core. This issue is input-dependent (multi-line payloads) but directly affects signature correctness; normalize line endings to the agreed canonical form before calling sign_challenge_utf8.

Useful? React with 👍 / 👎.

@Undline Undline merged commit 9152aa5 into main Apr 7, 2026
1 check passed
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