zfs
zfs copied to clipboard
Remove unused AES modes
Remove the Cipher Block Chaining (CBC), Counter (CTR), Electronic Code Book (ECB) and Galois Message Authentication Code (GMAC) modes from AES code. They are not used by the cmdline utilities.
Motivation and Context
I wanted to take closer look to the current encryption path and found a lot code, which is there, but not really used. The removed AES modes have some tradeoff which I would summarize as follows:
- ECB: has a lack of diffusion - I think most of us know the tux image :-)
- CBC: the encryption path can't be done in parallel
- CTR: no authenticated encryption
Description
If it is okay, I could create some rework to the whole encryption framework within the icp module. I would also include the chacha20-poly1305 pull request, but with optimized assembly for out main architectures (x64, aarch64, ppc64).
How Has This Been Tested?
It builds and the functional testings are okay.
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Performance enhancement (non-breaking change which improves efficiency)
- [x] Code cleanup (non-breaking change which makes code smaller or more readable)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
- [ ] Documentation (a change to man pages or other documentation)
Checklist:
- [x] My code follows the OpenZFS code style requirements.
- [ ] I have updated the documentation accordingly.
- [x] I have read the contributing document.
- [ ] I have added tests to cover my changes.
- [x] I have run the ZFS Test Suite with this change applied.
- [x] All commit messages are properly formatted and contain
Signed-off-by.