This topic is locked

AES-128 Database Encrytion

3/1/2023 2:47:50 AM
PHPRunner General questions
D
DRCR Dev author

Hi
I'm using AES-128 database encryption and noticed that a single character is encrypted into 32 characters.
Also 12 characters are also encrypted into 32 characters.
I need to understand bow much padding the encryption could create so I can select the correct database sizes.
If I have a username field limited to 50 characters, what the absolute maximum length the encryption can create?
-Cec

Sergey Kornilov admin 3/1/2023

It depends on the block size AES-128 uses. It is safe to assume that for longer portions of text the encrypted version will be about twice longer than the original.
More info:
https://stackoverflow.com/a/37856899

D
DRCR Dev author 3/1/2023

thanks so much that explains everything
Cec