blob: af2b5f1c1889b0d5355a386bb03fe17c236b73d3 [file] [log] [blame]
Sybren A. Stüvel8d8cc312011-07-31 23:03:23 +02001Commandline interface
2==================================================
3
Sybren A. Stüvelc1c455d2011-08-01 23:04:30 +02004A lot of the Python-RSA functionality is also available as commandline
5scripts. On Linux and other unix-like systems they are executable
6Python scripts, on Windows they are .exe files.
7
8All scripts accept a ``--help`` parameter that give you instructions
9on 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üvel062b1322011-08-03 14:46:49 +020032| pyrsa-priv2pub | Reads a private key and outputs the | \- |
Sybren A. Stüvelc1c455d2011-08-01 23:04:30 +020033| | 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