# Session key decryption failed

**URL:** <https://community.passbolt.com/t/session-key-decryption-failed/3764>\
**Category:** Installation Issues\
**Created:** [April 8, 2021, 11:53pm UTC](https://community.passbolt.com/t/session-key-decryption-failed/3764 "2021-04-08T23:53:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hwiggy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/hwiggy/32/712_2.png) [@Hwiggy](https://community.passbolt.com/u/Hwiggy)\
**Post date:** [April 8, 2021, 11:53pm UTC](https://community.passbolt.com/t/session-key-decryption-failed/3764/1 "2021-04-08T23:53:02Z")

</div>

Regarding the following:  
[Session key decryption failed. · Issue #1126 · openpgpjs/openpgpjs · GitHub](https://github.com/openpgpjs/openpgpjs/issues/1126)  
[Browser extension v3.0.3: session key decryption failed](https://community.passbolt.com/t/browser-extension-v3-0-3-session-key-decryption-failed/3485)

I am not interested in fighting to regenerate my keys etc anymore.  
How do I set the relevant openpgp configuration flag to allow the insecure keys?

---

<div class="post-metadata">

**Author:** ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)\
**Post date:** [April 9, 2021, 8:46am UTC](https://community.passbolt.com/t/session-key-decryption-failed/3764/2 "2021-04-09T08:46:22Z")

</div>

Hi @Hwiggy,

It’s enabled by default for everyone on the latest browser extension:

> <https://github.com/passbolt/passbolt_browser_extension/blob/883832309962eb6c04fe3f26dbbc44ce9eb942aa/src/all/background_page/index.js#L43>

Can you describe a bit more your scenario/situation?

---

<div class="post-metadata">

**Author:** ![Hwiggy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/hwiggy/32/712_2.png) [@Hwiggy](https://community.passbolt.com/u/Hwiggy)\
**Post date:** [April 12, 2021, 11:32am UTC](https://community.passbolt.com/t/session-key-decryption-failed/3764/3 "2021-04-12T11:32:39Z")

</div>

My key had expired so I then needed to regenerate the key but now no matter what kind of key I generate I just am always getting this error message, even on the website directly (not only in browser extension)

I am editing public key manually via mysql and dropping got keychain + reimporting server key but nothing is fixing this issue. I was hoping there might be a flag I can enable that just bypasses this error message.

---

<div class="post-metadata">

**Author:** ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)\
**Post date:** [April 12, 2021, 11:38am UTC](https://community.passbolt.com/t/session-key-decryption-failed/3764/4 "2021-04-12T11:38:15Z")

</div>

@Hwiggy can you confirm this is your user key that is expired?

Unfortunately there is no user interface to rotate expired user keys.  
However there is a manual procedure that can be followed:

- Remove the expiry date and export a public and private key without expiry (or new expiry date set in the future), using gnupg for example
- Manually update the public key in the database under the gpgkeys table for this user, make sure you update both the armored key and the modified date (so that your colleagues can get the updated key also).
- Remove the key from the gnupg keyring on the server
- Perform an account recovery with the new private key
- From there you should be able to login.

---

<div class="post-metadata">

**Author:** ![Hwiggy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/hwiggy/32/712_2.png) [@Hwiggy](https://community.passbolt.com/u/Hwiggy)\
**Post date:** [April 13, 2021, 12:48pm UTC](https://community.passbolt.com/t/session-key-decryption-failed/3764/5 "2021-04-13T12:48:21Z")

</div>

I have manually reset my key in the database many times to no avail.  
I got the system to a point where I could log in, but decrypting any password immediately failed.

---

<div class="post-metadata">

**Author:** ![Hwiggy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/hwiggy/32/712_2.png) [@Hwiggy](https://community.passbolt.com/u/Hwiggy)\
**Post date:** [April 13, 2021, 1:23pm UTC](https://community.passbolt.com/t/session-key-decryption-failed/3764/6 "2021-04-13T13:23:50Z")

</div>

Just a heads up that I did a full reinstall of Passbolt  
(backup database, server key, remove entire directory, reinstall & reimport then recover)

I still cannot decrypt any of my passwords

---

<div class="post-metadata">

**Author:** ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)\
**Post date:** [April 13, 2021, 1:39pm UTC](https://community.passbolt.com/t/session-key-decryption-failed/3764/7 "2021-04-13T13:39:55Z")

</div>

I’m not sure what’s happening to you.

One logical explanation as of why you can login but not decrypt, would that the secret are encrypted with a different public key. Like either:

- You created a new key that is not related to the expired one
- The secrets were encrypted for another key than the expired one that you changed.

Hard to tell without having more information.

---

<div class="post-metadata">

**Author:** ![Hwiggy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/hwiggy/32/712_2.png) [@Hwiggy](https://community.passbolt.com/u/Hwiggy)\
**Post date:** [April 13, 2021, 8:00pm UTC](https://community.passbolt.com/t/session-key-decryption-failed/3764/8 "2021-04-13T20:00:27Z")

</div>

Ah, this might explain things.  
Yeah it might be that I generated a new public key when I noticed mine was expired.  
Not great, but perhaps I have a backup of my keypair.

I tested creating a new password and decrypting it, that worked fine with the new key stored on the server; I suppose this is a problem with my side then.

Thanks.

---

<div class="post-metadata">

**Author:** ![Hwiggy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/hwiggy/32/712_2.png) [@Hwiggy](https://community.passbolt.com/u/Hwiggy)\
**Post date:** [April 13, 2021, 9:17pm UTC](https://community.passbolt.com/t/session-key-decryption-failed/3764/9 "2021-04-13T21:17:02Z")

</div>

Okay so I was using the same public key as passbolt knew, but the problem was I had deleted the subkey that had expired, rather than changing the expiry. I guess I became a victim of my lack of encryption knowledge; I suppose this meant that passbolt (or gpg even) did not recognize that keys signed with a specific subkey applied to the existing public key.

Reimporting the expired subkey and properly changing the expiration date, then re-importing the public key on passbolt did the trick, and I have totally recovered my credentials.  
Thank you very much.
