Skip to content

feat: derive product entropy from rootEntropySource (RFC-7)#205

Merged
johnthecat merged 6 commits into
mainfrom
feat/entropy-from-root-entropy-source
Jun 5, 2026
Merged

feat: derive product entropy from rootEntropySource (RFC-7)#205
johnthecat merged 6 commits into
mainfrom
feat/entropy-from-root-entropy-source

Conversation

@TorstenStueber

@TorstenStueber TorstenStueber commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Wire the RFC-0007 rootEntropySource through the SSO handshake so a host can serve host_derive_entropy deterministically without holding the raw root account secret.

  • host-papp — append rootEntropySource ([u8; 32]) to the HandshakeSuccessV2 body (258 bytes; null for older peers). This revision is not yet pinned in the Mobile SSO spec (latest defined is v0.2.2, kept as HandshakeSuccessV2_v022). Thread it through the success state and persist it in userSecretRepository as Option(Bytes(32)), exposed via papp.secrets.
  • host-container — add deriveProductEntropyFromSource(rootEntropySource, productId, key) (RFC-7 layers 2–3); deriveProductEntropy now delegates to it.

Closes #204.

@TorstenStueber TorstenStueber force-pushed the feat/entropy-from-root-entropy-source branch from 9ce96fe to 340c62d Compare June 4, 2026 20:05
@johnthecat

Copy link
Copy Markdown
Contributor

Will fix codecs and then LGTM

…pySource (RFC-7)

Wire the RFC-0007 `rootEntropySource` through the SSO handshake so a host can
serve `host_derive_entropy` deterministically without holding the raw root
account secret.

- host-papp: append `rootEntropySource` ([u8; 32]) to the `HandshakeSuccessV2`
  body (258 bytes; null for older peers). This revision is not yet pinned in
  the Mobile SSO spec (latest defined is v0.2.2, kept as
  `HandshakeSuccessV2_v022`). Thread it through the success state and persist it
  in `userSecretRepository` as `Option(Bytes(32))`, exposed via `papp.secrets`.
- host-container: add `deriveProductEntropyFromSource(rootEntropySource,
  productId, key)` (layers 2-3); `deriveProductEntropy` now delegates to it.

Refs #204.
@johnthecat johnthecat force-pushed the feat/entropy-from-root-entropy-source branch from 340c62d to 7e1b3d2 Compare June 5, 2026 09:27
@johnthecat johnthecat merged commit 112e98a into main Jun 5, 2026
5 checks passed
@johnthecat johnthecat deleted the feat/entropy-from-root-entropy-source branch June 11, 2026 09:07
johnthecat added a commit that referenced this pull request Jun 12, 2026
Main (0.8.7) had independently absorbed nearly all of this branch's work
via PRs #178/#202/#205/#206/#212/#215/#216, with newer/cleaner versions.

Conflict resolution (38 files):
- package.json (x14), package-lock.json, CHANGELOG.md, migration doc:
  took main (newer versions, canonical release history). Dropped the
  unused `verifiablejs` dep.
- All SSO V2, statement-store, handoff-service, and host-chat *impl*
  files: took main — strictly newer (ECDH session-key derivation #206,
  RFC-7 entropy #205, statement-store fix #215). The branch's parallel
  May implementations are superseded.
- watchIdentity series: already identical in main (no real conflict).
- Kept BRANCH version for two files where it is genuinely ahead:
  * identity/rpcAdapter.ts — defensive snake_case/camelCase Resources
    decode (fixes "Unknown user" regression on V2 runtime); a clean
    superset of main's version.
  * host-chat/codec/attachment.spec.ts — extra blurhash-thumbnail and
    NodeEndpoint round-trip tests against a byte-identical codec impl.

Verified: build, typecheck, lint (0 errors), 679/679 tests pass.
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.

Use rootEntropySource from HandshakeSuccessV2

2 participants