generalpiston / typeorm-encrypted

Encrypted field for typeorm.
MIT License
74 stars 19 forks source link

Decrypting data externally #72

Open laurent-afs opened 2 months ago

laurent-afs commented 2 months ago

Hello,

In a scenario where I have 2 applications (let's call them A and B) needing to share the same encrypted data - would it be possible to have application B decrypt something encrypted by application A?

I assume that the IV/Auth tag generated during encryption are stored in the cipher text. Looking at the source code I can sort of identify where they are located in the cipher text, but in practice I'm not sure how to go about actually extracting them to use them for decryption.

I know this would be a highly questionable practice and something not recommended from a security perspective. I'm trying to weigh options and was wondering if this one is at all a possibility.

Thank you.