Skip to content

encrypt and decrypt keys using pgpainless #1098

@tomholub

Description

@tomholub

part of #1051 when importing keys, backing up and so on

Right now the encryptKey and decryptKey methods accept an armored key and pass phrase and return an armored key encrypted or decrypted. This could be trivially implemented using pgpainless. The function signatures are:

fun encryptKey(armored: String, passphrase: String): String
fun decryptKey(armored: String, passphrase: String): String

I'm assigning to Ivan to just create these two methods, which can be used as direct replacement of existing methods. Also, in this particular case, I think Ivan may also be able to actually replace existing node calls in the Android app with this pgpainless implementation.

Here is one usage example:

val (decryptedKey) = NodeCallsExecutor.decryptKey(nodeKeyDetails.privateKey!!, oldPassphrase!!)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions