Livecode Wiki

Use the decrypt using rsa command to decrypt a message using RSA public key encryption.

Built-in Message handler[]


decrypt source using rsa with {public | private} key key [and passphrase passphrase ]


decrypt tMessage with public key tPublicKey
decrypt field 1 with private key tPrivateKey

The message is the message to be decrypted

The key is the key to be used for the decryption, in PEM format

The passphrase is an optional passphrase

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 and

See Also: encrypt Command, decrypt Command, encrypt using rsa Command