cossacklabs / themis

Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.
https://www.cossacklabs.com/themis
Apache License 2.0
1.85k stars 143 forks source link

Is themis compatible with other encryption libraries #975

Closed pradeep-orbi closed 1 year ago

pradeep-orbi commented 1 year ago

Is themis compatible with android jetpack security library ? Can a file encrypted with themis be decrypted using jetpack security library and vice versa ??

vixentael commented 1 year ago

Themis uses OpenSSL / BoringSSL under the hood, Android cryptography also uses BoringSSL. Thus when you use Themis Secure Cell Seal it uses the same AES-256-GCM as Android Jetpack security library. So Themis and Jetpack security use compatible crypto primitives, but the order of operations and details are different.

For example, Themis uses PBKDF2 as KDF while Jetpack security can use HKDF, and so on.

Themis and Jetpack security wrap data differently, the encrypted data from Jetpack security will have one format, the encrypted data from Themis Secure Cell will have another format.

It's not possible to encrypt data suing Themis and decrypt using Android Jetpack and vice versa.

pradeep-orbi commented 1 year ago

Thank you so much for the detailed answer.