MAX_AES_GCM_PLAINTEXT_SIZE
constMAX_AES_GCM_PLAINTEXT_SIZE:67108864=67108864
Defined in: packages/filecoin-encryption-envelope/src/constants.ts:74
Largest plaintext the one-shot AES-256-GCM scheme accepts.
Memory sets this number, not cryptography: NIST allows nearly 64 GiB per GCM message. But scheme 1 cannot stream — one tag covers the whole ciphertext, so decrypting holds the input, the output and Web Crypto’s internal copy at the same time, roughly 3x the plaintext. Runtime allocation ceilings differ and cannot be queried, so this sits well under all of them. Larger objects use the chunked scheme, which is flat in memory.
Raise it only with measurements, and never lower it: raising accepts inputs older versions rejected, lowering breaks callers that work today.