how do i convert RSAParameters from .net to .pem file so i can use it in php

Posted by netuser24 on Stack Overflow See other posts from Stack Overflow or by netuser24
Published on 2010-05-04T14:14:53Z Indexed on 2010/05/04 14:18 UTC
Read the original article Hit count: 230

Filed under:
|
|
|

Hello i have a private and public keys for RSA generated in .net

in this format

string privateKey = "<RSAKeyValue>" +
                         "<Modulus>...kCFhsjB4xMW49mrx5B/Ga...</Modulus>" +
                         "<Exponent>...</Exponent>" +
                         "<P>...7bRCrQVgVIfXdTIH3iY8x...</P>" +
                         "<Q>...4SiQDhrAZADuFDTr7bRCrQVgVIfXdTIH3iY8x...</Q>" +
                         "<DP>...ZADuFDTr7bRCrQVgVIfXdT...</DP>" +
                         "<DQ>...4SiQDhrAZADuFDTr...</DQ>" +
                         "<InverseQ>...sjB4xMW49mrx5B/Ga...</InverseQ>" +
                         "<D>...SiQDhrAZADuFDTr7bRCrQVgVIf...</D>" +
                     "</RSAKeyValue>";

how can i convert this so i can use it in php openssl functions to encrypt and decrypt data? i need both public and private keys converted.

maybe with openssl bash command in linux where can i specify my own modulus, exponent and so on?

any ideas?

thanks

© Stack Overflow or respective owner

Related posts about rsa

Related posts about php