Module eql
Expand description
Types for representing EQL payloads, and encryption/decryption functions.
Two wire envelopes are produced here:
- v2 (
encrypt_eql→EqlCiphertext): matches the EQL v2.3 schema atcipherstash/encrypt-query-language/docs/reference/schema/eql-payload-v2.3.schema.json. - v3 (
encrypt_eql_v3→EqlCiphertextV3): theeql_v3envelope — scalar payloads drop thekdiscriminator, bloom bit positions are signedsmallint[], and SteVec entries order by the CLLW-OPEopterm only.
The two share one encryption pipeline (see encrypt_eql_with) and differ
only in the wire types they assemble.
Structs§
- Encrypted
Payload - Scalar EQL storage payload (
k = "ct"). - Encrypted
Payload V3 - EQL v3 scalar storage payload — a flat
{v, i, c, hm?, ob?, op?, bf?}object with nokdiscriminator (the shape theeql_v3scalar domain CHECKs accept). - Encrypted
Query Payload - Root-scalar query payload — carries exactly one root-scope index term.
- Encrypted
Query Payload V3 - v3 scalar query operand —
{v, i, hm?, bf?, ob?, op?}: the storedEncryptedPayloadV3minus the record ciphertextc(nok, noc). - EqlDecrypt
Opts - Options for EQL decryption operations.
- EqlEncrypt
Opts - Options for EQL encryption operations.
- Identifier
- Identifies a specific database table and column pair.
- Prepared
Plaintext - A prepared plaintext value ready for EQL encryption.
- SteVec
Entry - One entry inside an
SteVecPayload. - SteVec
Entry V3 - One entry in a v3 SteVec document — selector
s, per-entry ciphertextc, optional array markera, and exactly one ofhm/op. Per-entryv/i/kare NOT carried; the envelope lives only at the root. - SteVec
Payload - STE-vector EQL storage payload (
k = "sv"). - SteVec
Payload V3 - EQL v3 SteVec document payload —
{v, k: "sv", i, sv}. The rootkdiscriminator IS kept (the v3 jsonb document models it). - SteVec
Query Entry V3 - One entry of a v3 jsonb containment needle — selector
splus exactly one ofhm/op. - SteVec
Query Payload - STE-vector query payload — carries either a selector lookup or a single
per-element term used to match against an
SteVecEntry. - SteVec
Query Payload V3 - v3 jsonb containment needle —
{sv: [{s, hm|op}]}. Each entry is a selector plus exactly one term (mirrorseql_v3.to_ste_vec_query). No envelope.
Enums§
- EqlCiphertext
- EQL v2.3 storage payload. One of two mutually exclusive root shapes
discriminated by
k. - EqlCiphertext
V3 - EQL v3 storage payload — the v3 analogue of
EqlCiphertext. - EqlError
- Errors that can occur during EQL encryption, decryption, and index operations.
- EqlOperation
- Specifies what to encrypt when encrypting
encryption::Plaintextvalues. - EqlOutput
- Output of
encrypt_eqlfor a singlePreparedPlaintext. - EqlOutput
V3 - Output of
encrypt_eql_v3for a singlePreparedPlaintext— the v3 analogue ofEqlOutput.Storeinputs yield anEqlCiphertextV3;Queryinputs anEqlQueryPayloadV3. - EqlQuery
Payload - EQL query payload — partial encrypted payload used to match against stored
EqlCiphertextvalues. - EqlQuery
Payload V3 - EQL v3 query operand — the query-side counterpart of
EqlCiphertextV3. - Root
Query Term - Per-root-scalar query term. Exactly one of
hm,bf,ob, orop. - SteVec
Entry Term - Equality / ordering term carried by an
SteVecEntry. - SteVec
Entry Term V3 - Equality / ordering term on a v3 SteVec entry — exactly one of
hm(equality) orop(CLLW-OPE ordering). - SteVec
Kind - The
k: "sv"form discriminator carried bySteVecPayloadV3. A single-variant enum so serialization emits exactly"sv"and deserialization rejects anything else. - SteVec
Query Term - Per-STE-vector query term. Exactly one of
s,hm,oc,op, orq.
Constants§
- EQL_
SCHEMA_ VERSION - The current version of the EQL schema format.
- EQL_
SCHEMA_ VERSION_ V3 - The EQL v3 schema version — encoded as
von every payload produced byencrypt_eql_v3.
Functions§
- decrypt_
eql - Decrypts multiple EQL storage payloads back to plaintext.
- decrypt_
eql_ fallible - Like
decrypt_eqlbut decryption failure of one or more ciphertexts does not fail the entire operation. Instead, a decryption result (success or failure) is returned for every ciphertext. - encrypt_
eql - Encrypts multiple plaintexts into EQL format.
- encrypt_
eql_ v3 - Encrypts multiple plaintexts into EQL v3 payloads.