Skip to content
Sign in Create account

Self-attested portal keys

The portal generates its receipt key in the browser instance. A receipt carries that key’s public key and a kid derived from the key’s fingerprint. No third party has registered or vouched for this key; the receipt itself carries it. A matching embedded key, fingerprint and receipt signature show that the same key signed the receipt. They do not show who controlled the browser instance.

What a full check covers

A full check of a v3 portal receipt has two parts:

  • The portal attester key is self-attested. It is checked against the public key embedded in the receipt, not against a list of registered keys.
  • The gateway countersignature is verified with a published gateway key, together with a check that its receipt_hash matches the receipt.

When both pass, the canonical receipt content matches the receipt_hash the gateway countersigned, and the gateway signature verifies. This does not prove that local tokenization happened or that every value was tokenized. If the receipt is changed, its signature or the gateway’s hash binding should fail verification.

Run the check

The check needs the complete v3 entry, with both receipt and countersignature, plus the gateway JWKS. The browser portal runs it: it checks the client signature, the gateway countersignature, the receipt-hash binding, and that the gateway key differs from the portal key. The downloadable cloak-receipt CLI is meant for the same check, but that path has not been checked against current portal receipts. The Rust SDK’s verify_receipt method checks a single signed envelope and does not perform that witness check; see what a receipt check proves. Verification methods lists every way to check a receipt.

For a negative check, change one character in a signed receipt field or in the signature, then verify again. The client-signature check or the receipt_hash binding should fail, and the altered receipt should not pass the gateway-witness check.

Portal key status endpoint

For a well-formed portal kid, GET /keys/portal/{kid} returns HTTP 200 with the status response below. It reports no registered keys and does not publish the browser-instance public key. Try it with a well-formed example kid:

curl --fail --silent --show-error https://api.cloakapi.io/keys/portal/portal-0123456789abcdef
{
"status": "self-attested",
"keys": [],
"docs": "https://docs.cloakapi.io/receipts/self-attested-keys/",
"message": "This browser instance attested its own key. It does not identify a person or prove a gateway signature."
}

The response describes the key’s self-attested status. It is not evidence that the gateway signed a receipt; that check is the separate countersignature and receipt_hash verification. See OpenReceipt protocol for the format and Verification methods for the checks.