vt-middleware / cryptacular

The friendly complement to the BouncyCastle crypto API for Java.
Other
39 stars 7 forks source link

Define new ciphertext header format. #53

Closed serac closed 4 years ago

serac commented 4 years ago

New format does not allocate any memory until HMAC check passes, which guards against untrusted input. All encryption components have been updated to use the new header, while preserving backward compatibility to decrypt messages encrypted with the old format. The decoding process for the old header has been hardened to impose reasonable limits on header fields: nonce sizes up to 255 bytes, key names up to 500 bytes.

Fixes #52.