| decryptCek | Client: attempts a scope's CEK with the session's attribute key. null means the key does not satisfy the scope's policy — access denial as decryption failure, the whole point of the architecture. |
| keygen | Authority: issues a user's attribute secret key — their attributes embedded in the key material itself. The returned blob is the attributeKey the consumer's infrastructure hands to that user's devices (spec 02 §4). |
| normalizePolicy | Parses and re-emits a policy in canonical form: attributes quoted, every operator application parenthesized, same-op chains balanced. Throws on anything outside the language — the loud refusal is the API. |
| parsePolicy | Recursive-descent parse; and binds tighter than or (the conventional precedence). |
| policyAttributes | The attribute names a formula mentions, in first-appearance order. |
| setup | Authority: mints the master key pair. Returns opaque pk (public) and msk (SECRET) blobs. |
| wrapCek | Authority: seals a scope's 32-byte CEK under a policy formula. The formula is normalized first (balanced parenthesization — rabe's converter panics on long unbalanced AND-chains), so authors write it naturally. |