Releases: capitalone/fpe
v1.2.1 - Padding bug fix
Fix for #14
v1.2.0 - Add *WithTweak methods
Both ff1
and ff3
packages now have two new (optional) functions, EncryptWithTweak
and DecryptWithTweak
, which allow you to pass in a tweak
to override the current Cipher
's tweak
for a given piece of data to operate on.
This aids in realistic FPE scenarios like tokenizing multiple credit card numbers which will have different tweaks for each number, but you want to use the same key (and therefore re-use a single Cipher
instance).
The existing Encrypt
and Decrypt
functions for both packages remain the same, so this API changes is non-breaking.
v1.1.1 - Trailing zeros bug fix
v1.1.0 - Performance Improvements
FF1 and FF3 code has been optimized to reduce extraneous allocations and improve overall performance.
See #3 (thanks @cstockton) and #8 for full details
MINOR BREAKING CHANGE TO BOTH:
ff1 and ff3 NewCipher now return a Cipher rather than *Cipher and methods are now on value receivers instead of pointer receivers for consistency. Because of Go's transparent indirection and since the struct fields are not exported, this shouldn't cause issues for most practical uses, as the only way to interact with the cipher is using Encrypt and Decrypt, which remain unchanged.
This was done because in situations where many NewCipher calls must be made (ex. tweak is different for each piece of data), then using value semantics causes less allocations.
v1.0.0 - Initial Release
This marks the first major release of fpe
.
Features include:
- FF1 and FF3 algorithms implementations
- Up to base36 support using
math/big
standard package