feat(ffi): external-token Ed25519 sign callback for federation-identity mint (Android YubiKey/NFC) - #115
Open
emooreatx wants to merge 1 commit into
Open
feat(ffi): external-token Ed25519 sign callback for federation-identity mint (Android YubiKey/NFC)#115emooreatx wants to merge 1 commit into
emooreatx wants to merge 1 commit into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…ty mint Adds `ciris_verify_create_federation_identity_with_callback` + a `CallbackHardwareSigner` (impl `HardwareSigner`) so a YubiKey-backed federation identity can be minted when the token is reachable only by an app's native layer (e.g. YubiKit over NFC on Android), not by this library. The core composes the `self_key_record` + the platform-sealed ML-DSA-65 half exactly as `create_federation_identity` does, and delegates ONLY the one classical Ed25519 signature to a caller-supplied C callback. The caller pre-reads the 32-byte Ed25519 public key + (optionally) the slot-9c PIV attestation DER, so the core never touches the token. Unit-tested (delegation plumbing + failure path). Builds on the v6.13.0 #112/#113 YubiKey provisioning fixes. Additive: a new FFI symbol + module, no breaking changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GG4YtiJZkpoJWeS8Y8bMdY
emooreatx
force-pushed
the
feat/federation-identity-callback-signer
branch
from
July 1, 2026 13:32
90daf88 to
f0d3cf4
Compare
Contributor
Author
|
Rebased onto v8.3.0 main (was ~5 releases stale, cut against v6.13.0-era main).
Mergeable again. Fresh CI running. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
ciris_verify_create_federation_identity_with_callback+ aCallbackHardwareSigner(implHardwareSigner) so a YubiKey-backed federation identity can be minted when the token is reachable only by an app's native layer (e.g. YubiKit over NFC on Android), not by this library.Why
On desktop the node opens the YubiKey locally via ykcs11. On a phone the runtime is sandboxed and can't reach an NFC/USB token — the hardware ops must run in the app (YubiKit). The existing
ciris_verify_create_federation_identitybuilds its own signer internally (get_platform_ed25519_signer) with no way to inject an app-provided one. This adds that seam.How
The core composes the
self_key_record+ the platform-sealed ML-DSA-65 half exactly ascreate_federation_identitydoes, and delegates only the one classical Ed25519 signature to a caller-supplied C callback:CallbackHardwareSigner::sign()invokessign_cbsynchronously;public_key()returns the passed-in key;attestation()reports the external-token tier. The app pre-reads the pubkey + attestation, so the core never touches the token.Testing
callback_signer::tests): delegation plumbing + callback-failure path — both green.cargo build -p ciris-verify-ffi+cargo test -p ciris-verify-ffipass; pre-commit (fmt/clippy/doc/version) green.Scope / notes
Java_…_nativeCreateFederationIdentityWithCallback, which bridgessign_cbback into a Kotlin/YubiKitsignEd25519) is the remaining Android glue — deferred to device testing. Client-side scaffolding (KMPYubiKeyPivSignerexpect/actual) lives in CIRISServer.🤖 Generated with Claude Code