What is the version of AES used in encrypt() function?

22 views
Skip to first unread message

André de Souza Rosa

unread,
May 24, 2023, 2:58:33 PM5/24/23
to firebird-support
Hello, could you tell me which version of AES is used in the Encrypt() function? Is there a possibility to configure a specific version for it?
I didn't find anything in the documentation that clarified this point.

Thanks in advance for your attention

Dimitry Sibiryakov

unread,
May 24, 2023, 3:07:26 PM5/24/23
to firebird...@googlegroups.com
André de Souza Rosa wrote 24.05.2023 20:58:
> Hello, could you tell me which version of AES is used in the Encrypt() function?
> Is there a possibility to configure a specific version for it?

There is only one version of AES. The difference is only in key size.

> I didn't find anything in the documentation that clarified this point.

Quote from your link:

> Sizes of data strings (like key and iv) must meet the requirements of the selected algorithm and mode, see table Table 8.11.2.2, Encryption Algorithm Requirements.
> Table 8.11.2.2 Encryption Algorithm Requirements
> Algorithm Key size (bytes) Block size (bytes) Notes
>
> AES 16, 24, 32


--
WBR, SD.

André de Souza Rosa

unread,
May 24, 2023, 3:37:11 PM5/24/23
to firebird-support
Hello, indeed I expressed myself badly, I was referring to the key versions to be used. So, if I use a 16-byte key, I'm using AES-128, correct? Sorry if this is a very beginner question.

Dimitry Sibiryakov

unread,
May 24, 2023, 5:31:30 PM5/24/23
to firebird...@googlegroups.com
André de Souza Rosa wrote 24.05.2023 21:37:
> So, if I use a 16-byte key, I'm using AES-128, correct?

Yes.

--
WBR, SD.

Mark Rotteveel

unread,
May 25, 2023, 2:49:55 AM5/25/23
to firebird...@googlegroups.com
On 24-05-2023 21:37, André de Souza Rosa wrote:
> Hello, indeed I expressed myself badly, I was referring to the key
> versions to be used. So, if I use a 16-byte key, I'm using AES-128,
> correct? Sorry if this is a very beginner question.

I'll add a note in the docs which AES variant is selected by which key size:

16 byte key -> AES-128
24 byte key -> AES-192
32 byte key -> AES-256

Mark
--
Mark Rotteveel

Reply all
Reply to author
Forward
0 new messages