Tech Rescue
  • Home
  • Acronyms
  • Cheat-Sheets
  • User Manuals

RSA

Encrypt / Decrypt strings with RSA in Node.JS

Interesting things that go through my mind during lock-down haha! const crypto = require('crypto'); const PASSPHRASE = 'I had learned that some things are best kept secret.'; const KEY_PAIR_OPTIONS = { modulusLength: 2048, publicKeyEncoding: { type: 'spki', format: 'pem' }, privateKeyEncoding: { type: 'pkcs8', format: 'pem', cipher: 'aes-256-cbc', passphrase: PASSPHRASE } }; const KEY_PAIR
Hector Perez Nov 21, 2020

How to generate RSA public and private keys with OpenSSL

Before anything, I assume that you already have OpenSSL installed in your PC. In case you don’t and you are a Windows you can download it from this URLs: * http://slproweb.com/products/Win32OpenSSL.html * http://gnuwin32.sourceforge.net/packages/openssl.htm I personally used the first one. After
Hector Perez Dec 22, 2017

How to generate RSA key pair in Java 1.8

Recently I was wondering how to generate a private key in Java for a personal project. I found out how to generate the actual key pair with RSA algorithm. Here is the java code for that, a simple class that you can run to check how things work. import java.
Hector Perez Mar 15, 2017
Tech Rescue © 2025. Powered by Ghost