feat(wasm): org_unwrap_key — ECIES unwrap into a session handle

Expose org_unwrap_key(keys_blob, device_private_openssh) to let the
extension SW unwrap a member's ECIES-wrapped org master key into an
ordinary Zeroizing session handle. The returned handle is key-agnostic
and works with the existing item_decrypt/manifest_decrypt AEAD.

Key-form finding: device private keys are OpenSSH PEM blobs produced by
relicario_core::device::generate_keypair(), not base64 raw bytes. The
plan's "device_private_key_base64" parameter name was misleading; all
code and the .d.ts declaration use "device_private_openssh" to match
the spec and reality.

Adds ssh-key dep to relicario-wasm for PEM parsing in decode_device_seed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014s527M917W47LDrfQ4t47g
This commit is contained in:
adlee-was-taken
2026-06-25 21:02:54 -04:00
parent 79284979c1
commit d55861ffd8
4 changed files with 104 additions and 0 deletions

1
Cargo.lock generated
View File

@@ -2248,6 +2248,7 @@ dependencies = [
"serde",
"serde-wasm-bindgen",
"serde_json",
"ssh-key",
"wasm-bindgen",
"wasm-bindgen-test",
"zeroize",