Home > other >  RSA Encryption & Decryption for PKSC8 keys on PHP
RSA Encryption & Decryption for PKSC8 keys on PHP

Time:02-10

I am currently trying to implement encryption and decryption of messages using PKCS8 asymmetric keys in a PHP file.

So far, I discovered phpseclib3 (https://api.phpseclib.com/3.0/), but for some reason, it can't decrypt messages since the 3.0 version (the 2.0 version doesn't even support PKCS8 keys).

Furthermore, I looked at the pre built functions in PHP 8.0, and I found the open_ssl_* methods, but none are useful for PKCS8 keys... (https://www.php.net/manual/en/function.openssl-get-cipher-methods.php)

My problem is then: is there a way to encrypt/decrypt messages using PKCS8 key pair in PHP?

Any help would be appreciated!

CodePudding user response:

  •  Tags:  
  • Related