Error decrypting message: No public key encrypted session key packet found. #1633
Replies: 2 comments 2 replies
-
Hey 👋 The only time-related factor should be whether the key is expired, but that wouldn't cause this error message, I think. Or possibly if you have stored the message on a rapidly-deteriorating hard drive? 😅 Do you have an example message that fails to decrypt, possibly with an example test key? And/or, could you try adding |
Beta Was this translation helpful? Give feedback.
-
@twiss I generated a new RSA key-pair and it is working again. Knowing now that there is nothing time related to the encrypted message itself, I suspect I won't have any further issues 🤞. For the record, the |
Beta Was this translation helpful? Give feedback.
-
Nodejs version 18.x
OpenPGP version 5.7.0
I'm getting an error when decrypting an encrypted message. The message was encrypted using the example here, and here is the code I'm using to decrypt:
This is the error I receive with this code:
Error decrypting message: No public key encrypted session key packet found.
I've also tried adding additional configurations to the decrypt step according to what little I could find regarding this issue.
This error sometimes appears if the message is encrypted but not used for several hours or days (I have been unable to find a specific time frame). This would make sense for a session related issue where the session can expire. But nowhere in my encryption or decryption code am I setting a session value or checking it. The session keys parameter in the decrypt function list sessionKeys as optional as well, suggesting they are not required by default, so I am unsure on how to proceed. Additionally, due to a lack of documentation and others reporting this same error, I have not tried any other solutions. Other questions seem to reference this error:
Session key decryption failed
, and I haven't found any that state the session key packet was not found altogether.Any help with this would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions