[MDEV-11476] AES_ENCRYPT/DECRYPT: Improper key sizes aren't handled correctly Created: 2016-12-02 Updated: 2022-04-25 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Encryption |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Georg Richter | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | beginner-friendly | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.3.3-1 | ||||||||
| Description |
|
The AES_ENCRYPT and AES_DECRYPT functions accept keys of any size and transform them internally to 128-bit key.
The AES standard (FIPS 197) doesn't cover non standard key sizes, it mentions only that key size have to be 128, 192 or 256 (depending on block cipher mode). Bad side effects of current implementation:
Proposal:
which allows the following modes: |
| Comments |
| Comment by Sergei Golubchik [ 2017-05-26 ] |
|
I'd rather remove this completely. But gradually, first issue a warning (10.3), then make it an error and a warning in --old mode (10.4), and then just make it an error unconditionally (10.5). |
| Comment by Sergei Golubchik [ 2018-11-08 ] |
|
We cannot support 192/256-bit keys in AES_ENCRYPT, as it'd be an incompatible change, old data won't decrypt anymore. We only can issue a warning, discouraging users from using not 128-bit keys. So, here I'd prefer just to add a warning "two-argument variant of AES_ENCRYPT is deprecated". And in |
| Comment by Sergei Golubchik [ 2019-09-26 ] |
|
Yes, in the same version as |