Skip to main content

@docstack/abe

Type Aliases

Type AliasDescription
PolicyNodeThe attribute-policy language and its normalizer.

Functions

FunctionDescription
decryptCekClient: 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.
keygenAuthority: 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).
normalizePolicyParses 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.
parsePolicyRecursive-descent parse; and binds tighter than or (the conventional precedence).
policyAttributesThe attribute names a formula mentions, in first-appearance order.
setupAuthority: mints the master key pair. Returns opaque pk (public) and msk (SECRET) blobs.
wrapCekAuthority: 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.