Merge pull request #2996 from UCIS/patch-7
authorSebastien Pouliot <sebastien.pouliot@gmail.com>
Wed, 25 May 2016 19:11:22 +0000 (15:11 -0400)
committerSebastien Pouliot <sebastien.pouliot@gmail.com>
Wed, 25 May 2016 19:11:22 +0000 (15:11 -0400)
Generate RSA keys using public exponent 65537 (was 17)

mcs/class/Mono.Security/Mono.Security.Cryptography/RSAManaged.cs

index 7240fa548094b57bcb9c7068fc616ff4423ef8d0..17648d708696c16f28d08ab397cfdd81dbdd7eae 100644 (file)
@@ -93,7 +93,7 @@ namespace Mono.Security.Cryptography {
                        // p and q values should have a length of half the strength in bits
                        int pbitlength = ((KeySize + 1) >> 1);
                        int qbitlength = (KeySize - pbitlength);
-                       const uint uint_e = 17;
+                       const uint uint_e = 65537;
                        e = uint_e; // fixed
        
                        // generate p, prime and (p-1) relatively prime to e