Getting error "No public key encrypted session key packet found" when decrypting #1646
Unanswered
wo-yashsinghvi
asked this question in
Q&A
Replies: 1 comment 4 replies
-
The error means that the message you are trying to decrypt is not encrypted using public keys -- it may be encrypted with a password instead. You can try decrypting with a different software to see if it works, or share the message here so we can check. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using the openpgpjs version 5.9.0 and getting the error while decrypting the data. Below is the code. Can someone please help me out with it?
const openpgp = require('openpgp');
const { readFileSync } = require('fs');
const fun3 = async () => {
try {
const passphrase = 'Admin@123';
const privateKeyArmored = readFileSync('./private-key.asc', 'utf8');
const privateKey = await openpgp.decryptKey({
privateKey: await openpgp.readPrivateKey({ armoredKey: privateKeyArmored }),
passphrase
});
}
fun3();
Beta Was this translation helpful? Give feedback.
All reactions