The way to generate keys is platform-dependent. For more information, see Build a Public and Private RSA Key.