Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Generating RSA Key Pair

Süleyman Yasir KULA edited this page Aug 27, 2018 · 11 revisions

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"

Via Scripting API

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

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.

Clone this wiki locally