concordium-base
concordium-base copied to clipboard
Support decrypting AES-GCM cipher text
Task description
The browser wallet uses AES-GCM to encrypt the seed phrase. This task should extend utils
to support decrypting an AES-GCM cipher text, so that it can be used to decrypt the seed phrase from the browser wallet. The format used by the browser wallet is similar to the existing AES-256, but with a different encryptionMethod
.
{
"seedPhrase":{
"cipherText":"pcCvMV9rY0gLz4uSk5hGMwIyKPwGAEpUN2hwHLpDfiVv7tIfHCLHtu3u5Oy+Bh+4Jjthb7r6QgR06sYKuumhxacHSC3vuRnaPyrA+KWUNNF9uMZmbCnpSUbnORrM4YgDWU7VGoXno10FqBjb1arairb06taKlZn+U9fX9Eq6FrU+45A3hAcFbbFJClqazpdBnKffRhbTMFTTIMF0Mycd26Wve5wCURwCtmV7",
"metadata":{
"encryptionMethod":"AES-256-GCM",
"hashAlgorithm":"sha256",
"initializationVector":"Fo/sw+J37iREU7IZJFF0vQ==",
"iterations":10000,
"keyDerivationMethod":"PBKDF2WithHmacSHA256",
"keyLen":32,
"salt":"yautFuiwJp4UMY4QeoMl5A=="
}
}
}