使用 PKCS1 生成私钥 RSA
Generate private key RSA with PKCS1
有没有办法在 PHP 中使用 openssl-pkey-new 在 RSA 和 PKCS1 中通过 OpenSSL 生成私钥?
如果您指的是使用 BEGIN RSA PRIVATE KEY header 的私钥,那么 PHP 中存在一个没有简单解决方案的问题。基本上 PHP 使用 OpenSSL 1.0+ 编译生成 PKCS#8 PEM 格式的私钥,似乎没有办法再以 PKCS#1 格式生成它(至少我找不到解决方案)。
https://bugs.php.net/bug.php?id=53850
Why different private key strings under Linux or Windows?
还有一个名为 phpseclib 的库应该能够做到这一点。 (但我没有亲身体验)。
http://phpseclib.sourceforge.net/rsa/examples.html#create,pkcs1,pkcs1pub,sign1,enc1,
有没有办法在 PHP 中使用 openssl-pkey-new 在 RSA 和 PKCS1 中通过 OpenSSL 生成私钥?
如果您指的是使用 BEGIN RSA PRIVATE KEY header 的私钥,那么 PHP 中存在一个没有简单解决方案的问题。基本上 PHP 使用 OpenSSL 1.0+ 编译生成 PKCS#8 PEM 格式的私钥,似乎没有办法再以 PKCS#1 格式生成它(至少我找不到解决方案)。
https://bugs.php.net/bug.php?id=53850
Why different private key strings under Linux or Windows?
还有一个名为 phpseclib 的库应该能够做到这一点。 (但我没有亲身体验)。
http://phpseclib.sourceforge.net/rsa/examples.html#create,pkcs1,pkcs1pub,sign1,enc1,