kelvinmo/simplejwt

JWE decrypt issue (error:0909006C:PEM routines:get_name:no start line)

srdmnc opened this issue · 2 comments

Description

Hi, I successfully encrypted a token using JWE. But upon decryption I get the following error:

Cannot decrypt key: error:0909006C:PEM routines:get_name:no start line
error:04099079:rsa routines:RSA_padding_check_PKCS1_OAEP_mgf1:oaep decoding error
error:04065072:rsa routines:rsa_ossl_private_decrypt:padding check failed

Steps to reproduce

  1. Encrypt a plaintext using the following headers.
    $headers = ['alg' => 'RSA-OAEP', 'enc' => 'A128CBC-HS256'];
    and using the receiver's public key.

  2. Decrypt the output of step 1 using the receiver's private key using the JWE::decrypt function with expected algo set to 'RSA-OAEP'

Environment

  • Version 0.6.2
  • PHP: 7.2

The error message looks like there's a problem with openssl itself rather than simplejwt. Have you tried replicating the issue with another version of PHP (or openssl php extension)?

This issue was closed because it has been inactive for 14 days since being marked as stale.