aries-askar icon indicating copy to clipboard operation
aries-askar copied to clipboard

Disable encryption for debugging purposes

Open PaulWen opened this issue 2 years ago • 4 comments

I would be curious to store the data in the wallet as plain text.

Reading the documentation I came across:

none indicates that no store key is used. This key type should
be used only for testing and inspecting profile contents without encryption.

By modifying the AcaPy code I was able to choose none as the store key type. Looking into the table config I can also see that key is none. Unfortunately, the data in items and items_tags still seems to be encrypted or at least are not shown in plain text.

Am I missing something? Does it only affect the encryption of the profile keys but not the encryption of the profile content?

PaulWen avatar Mar 17 '22 08:03 PaulWen

That's correct, at the moment it is only possible to disable the use of a store key.

It would be possible to store an empty value in the profile key column, but at the moment the database backend code assumes the existence of a ProfileKey in several places. In order support that there would need to be a breaking change to the API, to allow the creation of the root profile with no profile key, and then to allow the creation of additional profiles with no key.

Are you just trying to do that for performance or for another reason?

andrewwhitehead avatar Mar 22 '22 19:03 andrewwhitehead

I think the title hints that this is for debugging and better understanding of the data. We had the range idea and didn't find an easy way

paulbastian avatar Mar 22 '22 19:03 paulbastian

@andrewwhitehead Thank you for your response! As @paulbastian also wrote the intended purpose was debugging performance issues and better understanding the data.

PaulWen avatar Mar 23 '22 09:03 PaulWen

The best option at the moment may be to use a script to dump the decrypted database to another format. I have an unfinished Python script that does some of that (for migrating older Indy wallets). A script could also do that using the Askar API, except that there's currently no way to find all the categories that are in use, and the interface for working with key data is a little more locked down.

andrewwhitehead avatar Mar 23 '22 19:03 andrewwhitehead