The private key cannot be used to decrypt and verify a message

Checklist
I have read intro post: About the Installation Issues category
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue

After rotating the keys, as discussed in the topic:

The healtcheck returns the following errors:

Environment

 [PASS] PHP version 7.4.30.
 [PASS] PCRE compiled with unicode support.
 [PASS] The temporary directory and its content are writable and not executable.
 [PASS] The logs directory and its content are writable.
 [PASS] GD or Imagick extension is installed.
 [PASS] Intl extension is installed.
 [PASS] Mbstring extension is installed.

 Config files

 [PASS] The application config file is present
 [PASS] The passbolt config file is present

 Core config

 [PASS] Debug mode is off.
 [PASS] Cache is working.
 [PASS] Unique value set for security.salt
 [PASS] Full base url is set to https://password.martel-innovate.com
 [PASS] App.fullBaseUrl validation OK.
 [PASS] /healthcheck/status is reachable.

 SSL Certificate

 [PASS] SSL peer certificate validates
 [PASS] Hostname is matching in SSL certificate.
 [PASS] Not using a self-signed certificate

 Database

 [PASS] The application is able to connect to the database
 [PASS] 27 tables found
 [PASS] Some default content is present
 [PASS] The database schema up to date.

 GPG Configuration

 [PASS] PHP GPG Module is installed and loaded.
 [PASS] The environment variable GNUPGHOME is set to /home/leonepr/.gnupg.
 [PASS] The directory /home/leonepr/.gnupg containing the keyring is writable by the webserver user.
 [PASS] The server OpenPGP key is not the default one
 [PASS] The public key file is defined in config/passbolt.php and readable.
 [PASS] The private key file is defined in config/passbolt.php and readable.
 [PASS] The server key fingerprint matches the one defined in config/passbolt.php.
 [PASS] The server public key defined in the config/passbolt.php (or environment variables) is in the keyring.
 [PASS] There is a valid email id defined for the server key.
 [PASS] The public key can be used to encrypt a message.
 [PASS] The private key can be used to sign a message.
 [PASS] The public and private keys can be used to encrypt and sign a message.
 [PASS] The private key can be used to decrypt a message.
 [FAIL] The private key cannot be used to decrypt and verify a message
 [FAIL] The public key cannot be used to verify a signature.
 [PASS] The server public key format is Gopengpg compatible.
 [PASS] The server private key format is Gopengpg compatible.

 Application configuration

 [PASS] Using latest passbolt version (3.6.0).
 [PASS] Passbolt is configured to force SSL use.
 [PASS] App.fullBaseUrl is set to HTTPS.
 [PASS] Selenium API endpoints are disabled.
 [PASS] Search engine robots are told not to index content.
 [PASS] Registration is closed, only administrators can add users.
 [PASS] Serving the compiled version of the javascript app
 [PASS] All email notifications will be sent.

 JWT Authentication

 [PASS] The JWT Authentication plugin is enabled
 [PASS] The /home/leonepr/www/password.martel-innovate.com/config/jwt/ directory is not writable.
 [PASS] A valid JWT key pair was found

 [FAIL] 2 error(s) found. Hang in there!

I tried to regenerate the keys, but nothing changes:

gpg --homedir ~/tmp/gpg-temp --batch --no-tty --gen-key <<EOF
    Key-Type: 1
    Key-Length: 4096
    Subkey-Type: 1
    Subkey-Length: 4096
    Name-Real: xxx
    Name-Email: xxx@martel-innovate.com
    Expire-Date: 0
    %no-protection
    %commit
EOF

I am using key-type 1 since default return errors.

Hi @chicco785,

Which operating system and version are you using ?

cat /etc/os-release

Which errors do you have with the default parameter ?

Instead of this:

gpg --homedir ~/tmp/gpg-temp --batch --no-tty --gen-key <<EOF
    Key-Type: 1
    Key-Length: 4096
    Subkey-Type: 1
    Subkey-Length: 4096
    Name-Real: xxx
    Name-Email: xxx@martel-innovate.com
    Expire-Date: 0
    %no-protection
    %commit
EOF

Can you try this, I replaced 1 with rsa and added a *-Usage parameter for the keys:

gpg --homedir ~/tmp/gpg-temp --batch --no-tty --gen-key <<EOF
    Key-Type: rsa
    Key-Length: 4096
    Key-Usage: sign,cert
    Subkey-Type: rsa
    Subkey-Length: 4096
    SubKey-Usage: encrypt
    Name-Real: xxx
    Name-Email: xxx@martel-innovate.com
    Expire-Date: 0
    %no-protection
    %commit
EOF

Let me know if it is better with these settings.

Best regards,