API reference@evolu/commonCrypto › createPadmePaddedLength

function createPadmePaddedLength(
  length: number & Brand<"Int"> & Brand<"NonNegative">,
): number & Brand<"Int"> & Brand<"NonNegative">;

Defined in: packages/common/src/Crypto.ts:232

Returns the PADMÉ padded length for a given input length.

PADMÉ limits information leakage about the length of the plain-text for a wide range of encrypted data sizes.

See the PURBs paper for details: https://bford.info/pub/sec/purb.pdf