I created a new pair of public and private keys and exported it as an XML string:
RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(2048); string publicPrivateKey = RSA.ToXmlString(true);
The XML line in publicPrivateKey looks like this (lines are shortened for readability):
<RSAKeyValue> <Modulus>t6tLd1Wi7PEkwPfx9KGP1Ps/5F2saXnOsCE2U....</Modulus> <Exponent>AQAB</Exponent> <P>3LJ5y4Vla7cS3XgmbIH5dQgppUHa+aSWavEOCbDRS/M....</P> <Q>1QyGIAnjv4YLcRVdwXtxWkijc+aZ496qIBZnCAUUD/E....</Q> <DP>0821dc0f+LBKOqIEvj4+2kJrNV5ueQesFBYkEsjPFM....</DP> <DQ>ugSzX2oDJwjdGKG1OOiVcmUWAm6IU4PpOxcUYtY8TC....</DQ> <InverseQ>LDQIQu+LSB6CSZBrGxNQthWi9mkuPGVZyDDr....</InverseQ> <D>qZm2bXKH8WwbsJ8ZlT3S1TbgUifppLrqSRkb8XqEcMv....</D> </RSAKeyValue>
The generated public key should be used in other applications (PHP / JavaScript / JAVA) to encrypt data. What part of the above XML defines the public key / which part should I send to other application developers?
And on the opposite side: what determines the private key / which part / parts that I have to store in order to decrypt the data encrypted with my public key?
Mike
source share