encrypt using rsa | |||||||||||||
Type | command | ||||||||||||
Dictionary | LCS | ||||||||||||
Library | LiveCode Script | ||||||||||||
Syntax |
| ||||||||||||
Summary | Encrypt data using the RSA algorithm. | ||||||||||||
Introduced | 4.6 | ||||||||||||
OS | mac, windows, linux, ios, android | ||||||||||||
Platforms | desktop, server, mobile | ||||||||||||
Parameters |
| ||||||||||||
Example |
| ||||||||||||
Related | Command: decrypt, encrypt, decrypt using rsa | ||||||||||||
Security | network | ||||||||||||
Description | Use the encrypt using rsa command to encrypt a message using RSA public key encryption. To encode a message that you only want to be decoded by the holder of the private key, use the form:
As a signing operation, to encode a message that a receiver can then verify has come from one of the holders of the private key, use the form:
Generating key pairsPublic-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 https://www.openssl.org/docs/manmaster/man1/rsa.html and https://www.openssl.org/docs/manmaster/man1/genrsa.html.
For signing, the maximum length of an encryptable message isn't really an issue since typically in that scenario it will be some sort of hash that would be being encrypted. For the more traditional encrypting scenario, however, the standard approach is to use public key cryptography to encrypt a random password which is then used with a symmetric cipher to actually encrypt the payload. |