Discuss this help topic in SecureBlackbox Forum
Create an instance of the asymmetric keypair
Asymmetric keys are mainly used in two cases: to encrypt symmetric session keys within a higher-level key agreement procedure, or to digitally sign data. In modern environments high-level envelopes over cryptographic keys are typically used, such as X.509 certificates or PGP keys. However, sometimes there's a need in low-level cryptographic keys without complicated schemes and large PKI structures such as certificates. This article explains how to generate a brand new RSA keypair.
TElRSAKeyMaterial km = new TElRSAKeyMaterial();
km.Generate(2048);
km.SavePublic(publicStream);
km.SaveSecret(privateStream);
That's it. If you need to use the created key later, you can use LoadPublic() and LoadSecret() methods of the key material object to load the required piece of the key back into the object.
SecureBlackbox uses specific classes to manage different types of asymmetric keys: