-
-
Notifications
You must be signed in to change notification settings - Fork 51
Generating RSA Key Pair
Use the Patcher generate_rsa_key_pair
command:
- private: the filepath that the private RSA key will be generated at
- public: the filepath that the public RSA key will be generated at
Example: Patcher generate_rsa_key_pair -private="C:\Users\USERNAME\Desktop\RSA_private" -public="C:\Users\USERNAME\Desktop\RSA_public"
Namespace: SimplePatchToolSecurity
static void SecurityUtils.CreateRSAKeyPair( out string publicKey, out string privateKey )
: creates public and private RSA keys and returns them as raw strings (i.e. it doesn't save the keys to text files)
Example code: SimplePatchToolConsoleApp.Program.GenerateRSAKeyPair
Open Window-Simple Patch Tool window and switch to the SECURITY tab:
Then, simply click the Create RSA Key Pair button and select a folder in which the RSA key pair will be generated.
NOTE: the public key is usually embedded into the application (e.g. it can be stored in a string constant) but the private key must be stored in a safe location. If private key is compromised, then we can no longer assume that the xml files are signed by a trusted party.