BYOiD/PROTOCOL

CMK Authentication Ceremony

End-to-end specification of the 2-round-trip ceremony that interleaves PRISM password verification and Double-Blind threshold signing into a complete BYOiD authentication flow.

25 min read

Overview

This document specifies the end-to-end CMK Authentication Ceremony - the orchestrated flow that interleaves PRISM password verification (Protocol: PRISM) and the Double-Blind Threshold Signature Scheme (Protocol: Double-Blind TSS) into exactly two sequential API calls between the browser Secure Web Enclave (SWE) and the ORK swarm, followed by token delivery to TideCloak. Both API calls carry data for both sub-protocols in the same messages.
The ceremony produces a standard OIDC-compatible token, signed via a vendor-unlinkable threshold blind signature, with DPoP session binding - all without any party holding the password, the signing key, or the ability to forge tokens.
Loading diagram...

Preconditions

User-side: Username and password. Optionally, a remember-me flag or stored authentication token.
Per-ORK stored state: PRISM share sis_i, CMK share xix_i, PRISM verifier viv_i, public key gCMK\mathit{gCMK}, ORK key material (aesKeyi\mathit{aesKey}_i, mSecORKi\mathit{mSecORK}_i, mgORKi\mathit{mgORK}_i). Established during registration (Protocol: Account Creation / KeyGen).
TideCloak (Vendor's IAM) state: gVVK\mathit{gVVK}, gVRK\mathit{gVRK} + signature, signed settings (registration policy, return URL), session identifier.

Phase 0: Setup and SWE Initialization

Step 0.1 - SWE Download and Verification

The browser downloads the Secure Web Enclave from the vendor's designated Home-ORK but can be served by any network node. Correctness does not depend on which node serves it - the user may rehome at any time. The SWE package is SRI-verifiable; expected hashes are published by Tide and community sources.

Step 0.2 - Vendor Trust Establishment

The SWE receives from TideCloak redirect: gVVK\mathit{gVVK}, gVRK\mathit{gVRK} + its signature, signed settings, and session identifier. It verifies all signatures against gVVK\mathit{gVVK}.
The SWE implicitly trusts any gVVK\mathit{gVVK} without a PKI chain: the user identity derived (gVVKx\mathit{gVVK} \cdot x) is inherently bound to the vendor that paid via the voucher system. A malicious party supplying a different gVVK\mathit{gVVK}' would produce identities bound to itself, not to the target vendor. The return URL signature ensures no attacker can redirect results using an honest vendor's key.

Step 0.3 - Session Key Generation

The SWE generates two ephemeral key pairs as non-extractable via the WebCrypto API (extractable: false):
  • Network session key pair (u,U)(u, U) - ECDH with ORK swarm and cache indexing. Private key uu cannot be exported or read by any JavaScript context.
  • Vendor session key pair (k,K)(k, K) - embedded in the authentication token. Approves of any DPoP keys from client. Plays no role in ORK communication.

Step 0.4 - User Input and Derivation

The user enters username and password, optionally setting remember-me. The SWE computes:
uidH(username),YH2P(password),j$\mathit{uid} \leftarrow H(\text{username}), \quad Y \leftarrow \textsf{H2P}(password), \quad j \overset{\$}{\gets},XYj_\ell, \quad X \leftarrow Y \cdot j

Step 0.5 - Swarm Roster and Voucher Acquisition

The SWE queries the home-ORK for: gCMK\mathit{gCMK}, all nn ORK URLs, identifiers idi\mathit{id}_i, and public keys mgORKi\mathit{mgORK}_i for the designated uid\mathit{uid}. It then acquires one-time vouchers from the Settlement Layer, which also returns auxiliary values YtagY_{\text{tag}}, qPubq_{\text{Pub}}, uDeObfu_{\text{DeObf}} for identity recovery.

Phase 1+2: Convert (Round-Trip 1)

The Convert call carries data for both sub-protocols simultaneously: the PRISM decentralized authentication and the double-blind signature protocols. A single API call from the SWE to all nn CMK ORKs.
Loading diagram...
Throttling: If uid\mathit{uid} or source IP address has exceeded the rate limit, the ORK rejects immediately. This enforces network-level rate limiting against brute-force attempts.
Key healing: If the SWE-provided digest (mDigest\mathit{mDigest}) differs from the ORK's local copy, the ORK initiates key healing before proceeding - ensuring the swarm operates on consistent state.
Convergence wait: The SWE waits up to 1 second for all nn responses, or up to 5 seconds for the first tt (14) responses, then records participants in ORKsBitwise\mathit{ORKsBitwise} with count II.

Client-Side Processing (Between Round-Trips)

All cryptographic work between the two API calls is performed entirely client-side by the SWE. No network communication occurs.
PRISM processing (Algorithm references from Protocol: PRISM):
  1. Threshold reconstruction: interpolate {Xi}\{X'_i\}YsY \cdot s (PRISM Algorithm 1)
  2. Verifier derivation: compute each individual ORK verifier viv'_i for all nn ORKs (PRISM Algorithm 2)
  3. Challenge decryption: peel three encryption layers, recover selfRequesti\mathit{selfRequest}_i for each responding ORK
  4. Session timing: median of ORK timestamps; expiry from minimum exti\mathit{ext}_i values
BlindSig processing (Algorithm references from Protocol: Double-Blind TSS):
  1. Decrypt identity shares: userPRISMiAES_DECvi(enc(userPRISMi))\mathit{userPRISM}_i \leftarrow \textsf{AES\_DEC}_{v'_i}(\mathit{enc}(\mathit{userPRISM}_i)) - Coupling to successful PRISM verification
  2. Identity recovery: interpolate userPRISMi\mathit{userPRISM}_i, apply voucher deobfuscation → gUserCMK\mathit{gUserCMK} (Double-Blind TSS Algorithm 1)
  3. Credential derivation: CMKmul\mathit{CMKmul}, VUID\mathit{VUID}, gCMKAuth\mathit{gCMKAuth} from gUserCMK\mathit{gUserCMK}
  4. Nonce aggregation: gCMKRRi\mathit{gCMKR} \leftarrow \sum R_i
  5. Token message construction: m{VUID,“auth”,expiry,K,sessionId,DPoPApproval}m \leftarrow \{\mathit{VUID}, \text{``auth''}, \mathit{expiry}, K, \mathit{sessionId}, \mathit{DPoPApproval}\}
  6. Blind message preparation: genBlindMessage\textsf{genBlindMessage}blurH\mathit{blurH}, j4j_4 (Double-Blind TSS Algorithm 2)

Phase 1+2: Authenticate (Round-Trip 2)

The Authenticate call again carries data for both sub-protocols. Sent to the II ORKs that participated in Convert.
Loading diagram...
The ORK performs PRISM verification first PRISM Algorithm 5. Only if authentication succeeds does it compute the partial blind signature (Double-Blind TSS Algorithm 3). This gating ensures no blind signatures are produced for unauthenticated users.
Convergence wait: The SWE waits up to 5 seconds for all II responses. If any ORK that participated in Convert fails to respond to Authenticate, the nonce commitment is broken and the ceremony must restart (see Failure Recovery below).

Phase 3: Token Delivery and OIDC Authorization

Signature Assembly

The SWE decrypts all partial signatures, aggregates, and unblinds:
SiAES_DECDH(mgORKi,u)(encSigi)iSS_i \leftarrow \textsf{AES\_DEC}_{\textsf{DH}(\mathit{mgORK}_i, u)}(\mathit{encSig}_i) \quad \forall\, i \in S
blindSSi,SblindSj41,RgCMKRj41\mathit{blindS} \leftarrow \sum S_i, \quad S \leftarrow \mathit{blindS} \cdot j_4^{-1}, \quad R \leftarrow \mathit{gCMKR} \cdot j_4^{-1}
The SWE verifies the assembled signature locally:
GS=?R+H(R,gCMKAuth,m)gCMKAuthG \cdot S \stackrel{?}{=} R + H(R, \mathit{gCMKAuth}, m) \cdot \mathit{gCMKAuth}

Encrypt for Vendor

VendorEncryptedDataENCgVRK(VUID,gCMKAuth,(R,S),m)\mathit{VendorEncryptedData} \leftarrow \textsf{ENC}_{\mathit{gVRK}}(\mathit{VUID}, \mathit{gCMKAuth}, (R, S), m)

Remember-Me Storage (Optional)

If remember-me was set, the SWE stores session context in browser local storage: username, network session key reference, persona, gCMK\mathit{gCMK}, ORK metadata, ORKsBitwise\mathit{ORKsBitwise}, selfRequesti\mathit{selfRequest}_i, and the computed expiry.
Session binding guarantee: The network session private key uu is non-extractable from the WebCrypto keystore and is referenced inside each self-sealed capsule (the ORK verifies the ECDH shared secret derived from UU). A stolen selfRequesti\mathit{selfRequest}_i cannot be used without the ability to perform ECDH operations with uu - which cannot be exported via any JavaScript API.

Redirect to IAM

The browser redirects to TideCloak (the Vendor's IAM) with VendorEncryptedData\mathit{VendorEncryptedData} and the session identifier.

Authorization Processing

TideCloak decrypts using the vendor's ephemeral private key VRK\mathit{VRK}, verifies the double-blind signature against gCMKAuth\mathit{gCMKAuth}, and generates a standard OIDC authorization code.

OIDC Code Exchange and VVK JWT Signing

The vendor application exchanges the authorization code (PKCE) for a JWT access token. The JWT is signed via a separate distributed signing ceremony across the vendor's VVK ORK swarm - ensuring no single party holds the vendor's token-signing key. The VVK ORKs independently verify the double-blind signature and all JWT claims before signing. Session integrity is enforced via DPoP binding to the non-extractable session keys. The VVK Temper-Proof Authorization flow is specified in a separate article.

Stored Authentication Variant (Remember-Me)

When a stored authentication token exists and has not expired, the ceremony can skip password entry entirely.
Loading diagram...
The stored selfRequesti\mathit{selfRequest}_i values serve as pre-authenticated tokens - the ORK can decrypt the self-sealed capsule because it encrypted it with its own symmetric key. The ECDH shared secret derived from the stored session key UU validates that the request originates from the same browser context. The PRISM password-conversion step is entirely skipped; authentication rests on the stored capsules and their non-extractable session key binding.
The stored token expires based on the minimum exti\mathit{ext}_i window set during the original ceremony (1-3 hours for remember-me). After expiry, the full password ceremony is required.

Failure Recovery

ORK drops between Convert and Authenticate. If any ORK that participated in Convert fails to respond to Authenticate, the nonce commitment set is inconsistent (ORKsBitwise\mathit{ORKsBitwise} no longer matches). The SWE must restart with a new Convert call. If within the session expiry window and the PRISM product has already been computed, the SWE can use the stored authentication variant - skipping password re-entry.
Fewer than tt ORKs respond to Convert. The ceremony cannot proceed. The SWE retries after a timeout. Persistent failure indicates network degradation beyond the fault tolerance threshold.
PRISM verification fails (wrong password). The ORK increments its per-uid\mathit{uid} throttle counter and returns failure. After repeated failures, the uid\mathit{uid} is throttled network-wide. The SWE cannot distinguish a wrong password from a corrupted response.
Local signature verification fails. The assembled signature (R,S)(R, S) does not verify against gCMKAuth\mathit{gCMKAuth}. This indicates either a malicious ORK contributed an incorrect partial signature, or the participation set changed between rounds. The SWE restarts the ceremony.

Notation Reference

This ceremony composes primitives from two sub-protocols. Notation defined in:
  • Protocol: PRISM - YY, sis_i, j1j_1, XX, viv_i, encRequesti\mathit{encRequest}_i, selfRequesti\mathit{selfRequest}_i
  • Protocol: Double-Blind TSS - xix_i, CMKmul\mathit{CMKmul}, gCMKAuth\mathit{gCMKAuth}, VUID\mathit{VUID}, j4j_4, blurH\mathit{blurH}, RiR_i, SiS_i
Additional ceremony-level notation:
SymbolDescription
(u,U)(u, U)Network session key pair (non-extractable via WebCrypto). Used for ECDH with ORKs and DPoP.
(k,K)(k, K)Vendor session key pair (non-extractable via WebCrypto). Embedded in token for DPoP.
gVVK\mathit{gVVK}Vendor's long-term public key
gVRK\mathit{gVRK}Vendor's ephemeral payment/session public key (rotated per payment cycle, signed by gVVK\mathit{gVVK})
VendorEncryptedData\mathit{VendorEncryptedData}Token payload encrypted under gVRK\mathit{gVRK} for delivery to TideCloak
ORKsBitwise\mathit{ORKsBitwise}Bitwise array indicating which ORKs participated in Convert
AES_DECa(B)\textsf{AES\_DEC}_{a}(B)AES256 decryption of message BB with key aa
ENCA(B)\textsf{ENC}_{A}(B)X25519-based El-Gamal encryption of message BB with public key AA
PKCEProof Key for Code Exchange - standard OIDC mechanism (RFC7636) for binding authorization codes to a client-generated secret

Actors and Trust Assumptions

ActorRoleTrust Assumption
Secure Web EnclaveBrowser-side cryptographic agent. Orchestrates both sub-protocols, assembles final token. SRI-verifiable, rehomeable.Potentially adversarial. See malicious SWE analysis in Protocol: Double-Blind TSS.
Home ORKServes swarm roster (public metadata only).No elevated trust. Compromised home ORK can return stale roster but cannot influence ceremony.
CMK ORK Swarm (20 nodes)Hold PRISM shares and CMK shares. Execute both sub-protocols.Up to 13 may be malicious. Each operated independently.
TideCloakKeycloak-based IAM. Initiates redirect, verifies signed token, issues OIDC codes.Holds gVVK\mathit{gVVK} (public), signed settings, ephemeral keys. Never possesses VVK private key.
VVK ORK SwarmSigns JWTs via separate threshold ceremony.Separate trust domain from CMK ORKs.
Settlement LayerFunds operations via one-time vouchers. Returns auxiliary values for identity recovery.See Article 8: The Settlement Layer.

Layer Traversal

LayerHow the Ceremony Engages It
LegitimacyVoucher validates each Convert call. ECDH between UU and mgORKi\mathit{mgORK}_i qualifies the channel and binds the session.
AuthorityEach ORK retrieves its Shamir shares (sis_i, xix_i) - undifferentiated key material, agnostic to purpose.
AgencyPRISM evaluation and partial blind signature are the purpose-specific MPC operations.
SettlementVoucher funds participation, binds operation to paying vendor, provides auxiliary deobfuscation values, ensures cross-vendor isolation.

Security Properties

Properties inherited from sub-protocols are referenced, not restated. This table covers ceremony-level properties only.
PropertyMechanismAssumption
Two round-trips sufficePRISM and CMK data multiplexed in same Convert/Authenticate callsProtocol design
Sub-protocol couplingCMK identity shares encrypted under PRISM verifier viv_i; blind signing gated on PRISM verificationCorrect ORK implementation
DPoP session bindingBoth (u,U)(u, U) and (k,K)(k, K) generated as extractable: false via WebCrypto; KK embedded in token mmWebCrypto API integrity
Non-extractable session keysuu cannot be exported; ECDH with uu required for ORK communication and remember-me replayWebCrypto API integrity (software-level)
Remember-me securityStored selfRequesti\mathit{selfRequest}_i bound to non-extractable uu; time-limited by exti\mathit{ext}_i; ORK cache destroyed on useWebCrypto + ORK cache discipline
Vendor trust without PKISWE trusts any gVVK\mathit{gVVK} because identity is bound to vendor via voucher; forged gVVK\mathit{gVVK}' creates identities bound to itselfSettlement Layer integrity
Transport-independent securityAll properties independent of TLS; distributed ceremony provides equivalent guaranteesCryptographic construction
Vendor key protectionJWT signed via separate VVK ORK swarm; vendor never possesses signing keySeparate threshold assumption
Anonymity via vouchersNo single party correlates vendor + user + ORK identity simultaneouslySettlement Layer construction
User sovereigntySWE SRI-verifiable and rehomeable to any nodeUser verifies SRI from independent sources
For PRISM-specific properties (offline attack resistance, mutual password proof, replay resistance), see Protocol: PRISM. For signature-specific properties (double-blind construction, vendor unlinkability, malicious SWE containment, domain separation), see Protocol: Double-Blind TSS.

Call Summary

CallDirectionPRISM ComponentCMK Component
ConvertSWE → all nn ORKsSend: uid\mathit{uid}, XX, UU, voucher. Receive: XiX'_i, encRequesti\mathit{encRequest}_iReceive: RiR_i, AES_ENCvi(userPRISMi)\textsf{AES\_ENC}_{v_i}(\mathit{userPRISM}_i)
AuthenticateSWE → II participating ORKsSend: selfRequesti\mathit{selfRequest}_i. ORK verifies.Send: blurH\mathit{blurH}, ORKsBitwise\mathit{ORKsBitwise}. Receive: encSigi\mathit{encSig}_i
Between calls, the SWE performs all interpolation, deobfuscation, verifier derivation, challenge decryption, identity recovery, credential derivation, and blind message preparation client-side.

References

  • Hall, J. L., Hertzog, Y., et al. (2023). Manifesting Unobtainable Secrets: Threshold Elliptic Curve Key Generation using Nested Shamir Secret Sharing. arXi\v
    .00915
    . Presented at AustMS 2021.
  • Wang, F., Hertzog, Y., et al. (2023). Towards Zero Trust Authentication in Critical Industrial Infrastructures with PRISM. ACNS 2023 Workshops, LNCS 13907. Springer, Cham.
  • RFC 9449 - OAuth 2.0 Demonstrating Proof of Possession (DPoP). IETF, 2023.
  • RFC 9497 - Oblivious Pseudorandom Functions (OPRFs) Using Prime-Order Groups. IETF, 2023.
  • RFC 7636 - Proof Key for Code Exchange by OAuth Public Clients. IETF, 2015.
  • Tide Developer Documentation: docs.tidecloak.com
Related Protocol Articles: