Skip to content

sudhirmurthy/RSAKeyPair

Repository files navigation

RSAKeyPair

Generating RSA Key Pair Programmatically using OpenSSL This is a boilerplate to generate the RSA Key Pair programmatically using Open SSL

Read full article

Why this example

The above example program generates a 2048 bit RSA Key pair. It also generates the p,q,n,e and d sections into the text file. In order to build this sample using Visual C++, you will need to build OpenSSL first. After you build OpenSSL, you can then include the generated headers to your VC/Include folder. You will also need to include the the lib files generated by OpenSSL onto VC/Lib. The above example program is written in VS05. OpenSSL simply rocks!

How to

  • [Copy]
    • [openssl]copy the 'openssl' directory to C:\Program Files\Microsoft Visual Studio 8\VC\include
    • [libeay32]copy libeay32.lib,ssleay32.lib,ssleay32.dll and libeay32.dll to C:\Program Files\Microsoft Visual Studio 8\VC\lib
  • [Reference]Reference your lib files in you project
    • [libeay32]Right click on your project > select properties >Linker >Input > Additional Dependencies> Add ssleay32.lib and libeay32.lib by clicking the ... button.
    • Copy the dll's ssleay32.dll and libeay32.dll to your project folder (where your vc++ project or solution file resides)
  • [Rebuild] Rebuild the solution. and run. (fingers crossed, it should work smoothly).

About

Generating RSA Key Pair Programmatically using OpenSSL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages