Skip to content
Advertisement

Tag: rsa

PHP JWT (JSON Web Token) with RSA signature without library

Anyboby know some solution in PHP to using JWT (JSON Web Token) with RSA signature without library? I tried so hard to find solutions without library or without using composer. All the options that I found use some kind of library. Answer I made my own solution using other examples on the way. Below we have 3 use cases and

How to decrypt data using phpseclib class Crypt_RSA that was encrypted by travist/jsencrypt

im using linux ubuntu server with nginx,mysql,php7.3 I’m trying to encrypt message using public rsa key, that was generated on server side using phpseclib (http://phpseclib.sourceforge.net/) Then i’m trying to use generated key to encrypt and decrypt message with JSEncrypt library (https://github.com/travist/jsencrypt), it works so far And finally im trying to decrypt JSEencrypted message with private key using phpseclib rsa implemetation.

phpseclib loadKey works on mac, not on CentOS

I am attempting to load a hardcoded (for the sake of testing) RSA public key in phpseclib (stable version 0.3.10). This code works perfectly correctly when run locally on my Mac and spits back out the key I entered: However when I push it to an AWS instance running CentOS, the loadKey call returns false. I’m not seeing any other

RSA Encryption in Java / Decryption in PHP Fails

I have a PHP script that I have been using do decrypt a session key that I encrypted from iOS. The encryption is done on the client using a 1024-bit public key. Decryption on the server side is done with the corresponding private key. Now I’m trying to write an encryption method for Android. Unfortunately, the decryption continues to fail,

Advertisement