How to set size of RSA key in aspnet_regiis

1

How do i set the key size of my rsa key.

Creating the key:

aspnet_regiis -pc "test" -exp -size 4096

Exporting the key:

aspnet_regiis -px "test" "c:\myKey.xml" -pri

this does not give me key size of 4096.

Key:

<?xml version="1.0"?> -<RSAKeyValue><Modulus>o9yGpGYpGFBukBKX559rxa1Gmd5q3tmd0LfevcKy9BHnPZm2aFQIIpNOJpjEoQkbeuxXtebbJoTX/3FzjFGxvrINwTHP7zj6cC7QvBEn6oJkoZ92wdXxuKjf+WzDKBbmLT7yFfpaDodo39KNDiZ49oTuSc74TpPweDz6+YdKMSc=</Modulus><Exponent>AQAB</Exponent><P>3a6VELFoADjmlqS8F/ezwDEyMo7q/9zMc6ktulW/2W5KcSE/Cnp9rGXKVTcimbCIc0pdvJ2P70RpnotSlMlO9Q==</P><Q>vTp5S/gNM3jumgkjW2vlIo+Eo3Y2t+VY3fIbw7SqU+9S+Gw3vSRWi9Lwoa9VrZgg9y9V547/P5punV4yW6F2Kw==</Q><DP>gTJFWCQ8u5xt7y/1G3bWgNVrLwISPao+Uc4wg1+EX0EjC4nXxtCau8XbRQzMEoxLCf42YT3m7AiQEcGbEHG+nQ==</DP><DQ>G8+cRC4Qwp/jcYAmUilpY8r0E5IsOJrclMIgkoLbBbsG1rwQ9RuCHMrD0v+R+BGDxtCOL5o0qYRo/Xf6rrzsQQ==</DQ><InverseQ>QCJAik6GQrG5TQVvEMJRzwDseUugnsVIcSex0TthmUkK/NJLKIKsZJ7WHoXw0a6ZUeie5QJWdrnqcsuqGKJXNA==</InverseQ><D>TDQscZwJFIOjR2E+P7uGFUJGCRzEuqqdmAlKjxlSu+rvjVhE2jPqLJowyAZXu0RPAVWUXMXluP4irWsHf4QmkneG25wA7tIyN9JkSBEe0Y7aXkAclYg0O+Nj0CXGyJsopStqRhcDt1RIYXu89wn6noDlI0j3xCSuk6irg3r+oHE=</D></RSAKeyValue>

User765876

Posted 2015-02-25T16:46:39.033

Reputation:

Is the key created correctly? What exactly do you get after you execute those commands? – RoraΖ – 2015-02-25T17:23:10.460

i get an xml file with <RSAKeyValue>and a few other elements with random strings in each. – None – 2015-02-25T17:27:16.367

Can you post the text? – RoraΖ – 2015-02-25T17:27:43.510

I updated the post. – None – 2015-02-25T18:19:52.230

Had the same question. I noticed that upon export, keys generated with specifying the size 4096 and the ones with the default (1024) exported to files of the same size - 915 bytes. Did you ever find an answer? Maybe the content is padded... – costa – 2016-11-29T19:17:40.817

No answers