themis icon indicating copy to clipboard operation
themis copied to clipboard

Passphrase support for Context Imprint (and Token Protect)

Open ashughes opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. The documentation here states that all modes have passphrase support. However, there does not appear to be passphrase support for Context Imprint or Token Protect modes (at least in the Java/Kotlin API).

Describe the solution you'd like to see Similar to the SealWithPassphrase API, it would be helpful if there was a ContextImprintWithPassphrase (and TokenProtectWithPassphrase) API.

Describe alternatives you've considered In order to use Context Imprint with a passphrase, we would need to generate a SymmetricKey to use with Context Imprint, then use SealWithPassphrase to encrypt the SymmetricKey and prepend it our output data. During decryption we would then have to decrypt the SymmetricKey in our header with the passphrase and then use the SymmetricKey to decrypt the data using Context Imprint.

This alternative is definitely workable, but it would be helpful if we could use the passphrase API directly to skip this extra step.

ashughes avatar Feb 16 '24 21:02 ashughes