Hello Jayesh,

 

AFAIK its uses AES 256 with CBC mode. The IV is generated from OpenSSL, e.g. https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html

 

For newer versions I have added the init_vector functionality to enable interoperability with other crypto functions, e.g. some databases, java frameworks etc. If you want to use this functionality, Iā€™d suggest to update, as the 5.3. is also end of life since some time. Otherwise you can of course also backport this feature.

 

Cheers,

 

Henning

 

 

--

Henning Westerholt ā€“ https://skalatan.de/blog/

Kamailio services ā€“ https://gilawa.com

 

 

 

From: Jayesh Nambiar via sr-users <sr-users@lists.kamailio.org>
Sent: Mittwoch, 4. Oktober 2023 08:54
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Cc: Jayesh Nambiar <jayesh1017@gmail.com>
Subject: [SR-Users] Crypto module AES algorithm details

 

Hello,

I am running kamailio-5.3.4 on one of my setup and I intend to use the crypto module in the same. 

I wanted to understand the following details when the module is used:

I understand it uses the AES algorithm, is that correct?

Does it use AES 128, 192 or 256 bit algorithms?

Does it use CBC or ECB mode for AES?

The 5.3 version does not have an parameter for init-vector, so does kamailio use any init vector internally in this case?

 

When i compared the encrypted text that kamailio produces and the ones available online, they were producing different outputs even when same shared secret was used. Hence asking for more clarification

 

PS: Upgrading kamailio is my very last option as this is one af an old setup which only needs this feature without much changes.

 

Thanks for any valuable response.

 

-- Jayesh