mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-04 12:58:28 +00:00
terrafrost
72a0913d39
RSA: slight adjustment to CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW format
CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW and CRYPT_RSA_PUBLIC_FORMAT_PKCS1 produce two very similar looking keys but they are not the same. As dissection OpenSSL's asn1parse would reveal CRYPT_RSA_PUBLIC_FORMAT_PKCS1 has the fact that it is an RSA key embedded within it whereas CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW does not. phpseclib now resolves this ambiguity in the same way that OpenSSH's ssh-keygen does. Despite this change CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW is still incompatible with OpenSSL's rsautl (CRYPT_RSA_PUBLIC_FORMAT_PKCS1 is compatible). I guess this incompatibility isn't just due to the headers but is also due to the overall structure of the format.
phpseclib - PHP Secure Communications Library
MIT-licensed pure-PHP implementations of an arbitrary-precision integer arithmetic library, fully PKCS#1 (v2.1) compliant RSA, DES, 3DES, RC4, Rijndael, AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509
PEAR Channel: [phpseclib.sourceforge.net](http://phpseclib.sourceforge.net/pear.htm)Installing Development Dependencies
Dependencies are managed via Composer.
-
Download the
composer.phar
executable as per the Composer Download Instructions, e.g. by runningcurl -sS https://getcomposer.org/installer | php
-
Install Dependencies
php composer.phar install --dev
Contributing
-
Fork the Project
-
Install Development Dependencies
-
Create a Feature Branch
-
(Recommended) Run the Test Suite
vendor/bin/phpunit
-
(Recommended) Check whether your code conforms to our Coding Standards by running
vendor/bin/phing -f build/build.xml sniff
-
Send us a Pull Request
Languages
PHP
100%