Reputation: 13
Thanks for your time, everyone. My goal is to end up with, either as a byte array or string, my public key.
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
string publicxml = rsa.ToXmlString(false);
string publicxml
now contains a modulus and exponent. My question is, using these values, how can I generate a single public key to distribute to those who need it?
In a more general sense, how do we generally combine exponents and moduli to make public keys?
Thanks!
Upvotes: 1
Views: 3522
Reputation: 61892
publicxml
is already a single value comprised of many bits. You can distribute it to those who need it. There are many possible encodings. You should decide for yourself which one you want to use. This may depend on many factors such as support for different public key encodings on those platforms that you want to use.
Upvotes: 1