Name: decrypt using rsa

Type: command

Syntax: decrypt <source> using rsa with {public | private} key <key> [and passphrase <passphrase>]

Summary: 

Introduced: 4.6

OS: mac,windows,linux,ios,android

Platforms: desktop,server,web,mobile

Security: network

Example:
decrypt tMessage with public key tPublicKey

Example:
decrypt field 1 with private key tPrivateKey

Parameters:
source: 
key: The key to be used for the decryption, in PEM format
passphrase: An optional passphrase
message: The message to be decrypted

Description:
Use the <decrypt using rsa> command to decrypt a message using RSA public key encryption.

Use the form
decrypt <message> with private key <key> 
to decode a message that a sender has encrypted with its corresponding public key.

Use the form
decrypt <message> with public key <key> 
to verify that a message has been encoded with the corresponding private key, and there has come from one of its holders (this is a verify operation).

Generating key pairs
Public-private key pairs can be generated using the OpenSSL suite of command-line tools. For example:
openssl genrsa -out private_key.pem 512
openssl rsa -pubout -in private_key.pem -out public_key.pem
Will generate a key pair of size 512-bits, placing the private key in private_key.pem and the public key in public_key.pem.

For more information on these utilities see http://www.openssl.org/docs/apps/rsa.html and http://www.openssl.org/docs/apps/genrsa.html.

References: decrypt (command), encrypt (command), encrypt using rsa (command)
