Changelog - 2026-11-02
LegacyAES and the cipher option of the token services are removed
Breaking ChangeIn one line. AES is the only AES class now, so anything still stored in the pre-PBKDF2 format cannot be read after the update; re-encrypt it first.
What changed
LegacyAESis removed from@venizia/ignis-helpers. It read the format that came before the PBKDF2 envelope: the key was the secret padded with a NUL character (or cut) to the key size, there was no version byte, and the text wasIV [+ GCM tag] + ciphertext.IPayloadCipheris removed from@venizia/ignis-helpersand@venizia/ignis-helpers/core, andDEFAULT_PAD_ENDis removed. Nothing butLegacyAESused them.- The
cipheroption is removed fromIJWSTokenServiceOptions,IJWKSIssuerOptionsandIJWKSVerifierOptions(@venizia/ignis-kernel,@venizia/ignis). The token services always useAESwith theaesAlgorithmyou pass. - What stays.
AESstill reads everything it wrote before, byte for byte, and the RSA, hash,kdfSaltandkdfIterationsdefaults are unchanged.
Who is affected
- Code that imports
LegacyAES,IPayloadCipherorDEFAULT_PAD_END. It stops compiling. - Apps that pass
cipherto a token service. The option is a type error. Tokens issued under the old envelope no longer decrypt, so those sessions end and users sign in again. - Apps that hold data written by
LegacyAES. Decrypt it and write it again withAESbefore you update (see Details). - Everyone else. No action needed.
Breaking changes
WARNING
Code that imports a removed name, or passes cipher to a token service, fails to compile after the update.
Before:
typescript
import { LegacyAES } from '@venizia/ignis-helpers';
const legacy = LegacyAES.withAlgorithm('aes-256-cbc');
const plain = await legacy.decrypt({ message: stored, secret: APPLICATION_SECRET });
new JWSTokenService({
jwtSecret,
getTokenExpiresFn,
applicationSecret,
cipher: LegacyAES.withAlgorithm('aes-256-cbc'),
});After:
typescript
import { AES } from '@venizia/ignis-helpers';
const aes = AES.withAlgorithm('aes-256-cbc');
const plain = await aes.decrypt({ message: stored, secret: APPLICATION_SECRET });
new JWSTokenService({ jwtSecret, getTokenExpiresFn, applicationSecret });To upgrade:
- Find what is still stored in the old format: a value that does not start with the
AESversion byte and decrypts withLegacyAES. - On the release you run now, decrypt it with
LegacyAESand write it back withAES. - Remove
cipherfrom every token service option. - Update, and run your typecheck.
Details
AESrejects the old format on its version byte, andLegacyAESfailed the auth tag on the new one, so the two never read each other's data; nothing was ever converted for you.- The IV rules of
AESare unchanged: a 16-byte IV, a 16-byte GCM tag, and the tag before the ciphertext in the stored text.