Created
February 7, 2016 01:17
-
-
Save AArnott/921fd927fb6582fff387 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ref System.Numerics.dll | |
var rsa = new RSACryptoServiceProvider(512); | |
var parameters = rsa.ExportParameters(true); | |
var p = new BigInteger(parameters.P.Reverse().ToArray()); | |
var q = new BigInteger(parameters.Q.Reverse().ToArray()); | |
var n = p * q; | |
Assert.Equal(parameters.Modulus.Reverse().ToArray(), n.ToByteArray()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment