PHP Developers Network

Sign RSA XML Key
Page 1 of 1

Author:  MR0808 [ Mon Apr 11, 2011 12:24 am ]
Post subject:  Sign RSA XML Key


We currently have an RSA key in XML format, and am trying to sign it with PHP and phpseclib, however we are struggling to do it. We have managed to decrypt and encrypt it, but can not find a way to sign it. They key has been generated with .NET.


Author:  mdraut [ Fri May 23, 2014 2:31 pm ]
Post subject:  Re: Sign RSA XML Key

$xml->loadXML($privatekey2); //this you must have already done
$d = new Math_BigInteger(base64_decode($xml->getElementsByTagName('D')->item(0)->nodeValue), 256); // this you have alredy done
$rsa->exponent = $d; // but this must be missing from your code

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group