Re: Is OpenSSL AES-NI not available in pgcrypto? - Mailing list pgsql-hackers

From agharta82@gmail.com
Subject Re: Is OpenSSL AES-NI not available in pgcrypto?
Date
Msg-id bcc2cd2d-3c12-0650-156b-9cc37bbcddaf@gmail.com
Whole thread Raw
In response to Re: Is OpenSSL AES-NI not available in pgcrypto?  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers
Hi,

I see, I was hoping that wasn't the case.

Thanks a lot for your support.

My best regards,

Agharta


Il 03/01/23 16:54, Peter Eisentraut ha scritto:
> On 02.01.23 17:57, agharta82@gmail.com wrote:
>> select pgp_sym_encrypt(data::text, 'pwd') --default to aes128
>> from generate_series('2022-01-01'::timestamp, 
>> '2022-12-31'::timestamp, '1 hour'::interval) data
>>
>> vs
>>
>> select pgp_sym_encrypt(data::text, 'pwd','cipher-algo=bf') -- blowfish
>> from generate_series('2022-01-01'::timestamp, 
>> '2022-12-31'::timestamp, '1 hour'::interval) data
>>
>> In my test both queries execution is similar....aes-128 was expected 
>> about  5 time faster.
>>
>> So, why?
>>
>> Pgcrypto use OpenSSL as backend, so, does it explicit force software 
>> aes calculation instead of AES-NI cpu ones?
>
> I suspect it is actually using AES hardware support, but all the other 
> overhead of pgcrypto makes the difference not noticeable.
>



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local
Next
From: jian he
Date:
Subject: Re: 128-bit integers can range only up to (2 ^ 63 -1)