| Sybren A. Stüvel | 8d8cc31 | 2011-07-31 23:03:23 +0200 | [diff] [blame] | 1 | Commandline interface |
| 2 | ================================================== |
| 3 | |
| Sybren A. Stüvel | c1c455d | 2011-08-01 23:04:30 +0200 | [diff] [blame] | 4 | A lot of the Python-RSA functionality is also available as commandline |
| 5 | scripts. On Linux and other unix-like systems they are executable |
| 6 | Python scripts, on Windows they are .exe files. |
| 7 | |
| 8 | All scripts accept a ``--help`` parameter that give you instructions |
| 9 | on how to use them. Here is a short overview: |
| 10 | |
| 11 | .. index:: CLI interface |
| 12 | .. index:: pyrsa-keygen, pyrsa-encrypt, pyrsa-decrypt, pyrsa-sign |
| 13 | .. index:: pyrsa-verify, pyrsa-priv2pub, pyrsa-encrypt-bigfile |
| 14 | .. index:: pyrsa-decrypt-bigfile, pyrsa-decrypt-bigfile |
| 15 | |
| 16 | +-----------------------+--------------------------------------------------+-----------------------------------------+ |
| 17 | | Command | Usage | Core function | |
| 18 | +=======================+==================================================+=========================================+ |
| 19 | | pyrsa-keygen | Generates a new RSA keypair in PEM or DER format | :py:func:`rsa.newkeys` | |
| 20 | +-----------------------+--------------------------------------------------+-----------------------------------------+ |
| 21 | | pyrsa-encrypt | Encrypts a file. The file must be shorter than | :py:func:`rsa.encrypt` | |
| 22 | | | the key length in order to be encrypted. | | |
| 23 | +-----------------------+--------------------------------------------------+-----------------------------------------+ |
| 24 | | pyrsa-decrypt | Decrypts a file. | :py:func:`rsa.decrypt` | |
| 25 | +-----------------------+--------------------------------------------------+-----------------------------------------+ |
| 26 | | pyrsa-sign | Signs a file, outputs the signature. | :py:func:`rsa.sign` | |
| 27 | +-----------------------+--------------------------------------------------+-----------------------------------------+ |
| 28 | | pyrsa-verify | Verifies a signature. The result is written to | :py:func:`rsa.verify` | |
| 29 | | | the console as well as returned in the exit | | |
| 30 | | | status code. | | |
| 31 | +-----------------------+--------------------------------------------------+-----------------------------------------+ |
| Sybren A. Stüvel | 062b132 | 2011-08-03 14:46:49 +0200 | [diff] [blame] | 32 | | pyrsa-priv2pub | Reads a private key and outputs the | \- | |
| Sybren A. Stüvel | c1c455d | 2011-08-01 23:04:30 +0200 | [diff] [blame] | 33 | | | corresponding public key. | | |
| 34 | +-----------------------+--------------------------------------------------+-----------------------------------------+ |
| 35 | | pyrsa-encrypt-bigfile | Encrypts a file to an encrypted VARBLOCK file. | :py:func:`rsa.bigfile.encrypt_bigfile` | |
| 36 | | | The file can be larger than the key length, but | | |
| 37 | | | the output file is only compatible with | | |
| 38 | | | Python-RSA. | | |
| 39 | +-----------------------+--------------------------------------------------+-----------------------------------------+ |
| 40 | | pyrsa-decrypt-bigfile | Decrypts an encrypted VARBLOCK file. | :py:func:`rsa.bigfile.encrypt_bigfile` | |
| 41 | +-----------------------+--------------------------------------------------+-----------------------------------------+ |
| 42 | |
| 43 | |