خرید بک لینک

Vote count: 0

I'm trying to get my front end and backend communicating with private key pairs, using JS on the front end with https://github.com/vibooff/asmcrypto.js, and PHP on the backend with php's openssl library.

asmcrypto has some functions to encrypt like: asmCrypto.RSA_OAEP_SHA1.encrypt(). It also has asmCrypto.RSA_OAEP_SHA256.encrypt() which I assume is more secure, but PHP only wants to decrypt with the option OPENSSL_PKCS1_OAEP_PADDING, which only works for SHA1, and not SHA256.

Also, it seems that openssl_public_decrypt() and openssl_private_encrypt() are missing the OPENSSL_PKCS1_OAEP_PADDING, and won't work with that option at all, only OPENSSL_PKCS1_PADDING and OPENSSL_NO_PADDING, which I understand are both very insecure.

OpenSSL is kind of the standard tool for a lot of encryption systems, so I can't imaging they are missing from that toolkit. Is it just not implemented in PHP? Is there another library that has these available, without having to use a PHP library that does all the calculation?

asked 47 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 2 فروردين 1395 ساعت: 11:18

صفحه بندی