Skip to content

Commit 15fdaae

Browse files
onlykeyonlykey
authored andcommitted
1.0.0
1 parent 61d9a19 commit 15fdaae

4 files changed

Lines changed: 6 additions & 272 deletions

File tree

README.md

Lines changed: 5 additions & 271 deletions
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,19 @@ Python client for interacting with the OnlyKey.
44

55
OnlyKey-cli - A command line interface to the OnlyKey that can be used for configuration (Similar functionality to [OnlyKey App](https://docs.crp.to/app.html))
66

7-
PGPMessage - **Still in early development.** - Provides a tool for decrypting and signing OpenPGP/GPG messages using OnlyKey (python only OpenPGP implementation).
8-
9-
10-
<!---
11-
## Run without installation (Packaged App)
12-
13-
### Mac OS Run without installation
14-
15-
Tested on El Capitan
16-
17-
Pre-compiled packaged apps have been provided here:
18-
19-
[OnlyKey CLI](https://github.com/trustcrypto/python-onlykey/releases/download/v0.1-alpha.1/cli)
20-
21-
[OnlyKey PGP Message Tool](https://github.com/trustcrypto/python-onlykey/releases/download/v0.1-alpha.1/PGP_message)
22-
23-
Once the file is downloaded in order to be able to run just by double clicking the file do the following:
24-
1) Open the terminal app and make the file executable with this command:
25-
```
26-
$ chmod +x <location of file you downloaded>
27-
```
28-
2) Right click the file and select "open"
29-
30-
These have been tested on Mac OS (El Capitan), we are still working on getting packaged apps that will work on other platforms such as Windows.
31-
32-
### Windows Run without installation
33-
34-
Coming soon
35-
36-
## Installation
37-
38-
### Windows Dependencies
39-
40-
Python 2.7 - https://www.python.org/downloads/release/python-2713/
41-
42-
git - https://git-scm.com/download/win
43-
44-
## Mac OS Install
45-
46-
Tested on Sierra
47-
```
48-
sudo pip uninstall crypto
49-
sudo pip uninstall pycrypto
50-
easy_install pycrypto
51-
```
52-
--->
53-
547
## Installation
558

569
### Windows Install
57-
Python 2.7 and pip are required. To setup a Python environment on Windows we recommend Anaconda https://www.anaconda.com/download/#windows
10+
1) Python 2.7 and pip are required. To setup a Python environment on Windows we recommend Anaconda https://www.anaconda.com/download/#windows
11+
12+
2) Install Microsoft Visual C++ Compiler for Python http://aka.ms/vcpython27
5813

14+
3)
5915
```
6016
$ pip install onlykey
6117
```
6218

19+
6320
You should see a message showing where the executable is installed.
6421

6522
Installing onlykey-cli-script.py script to c:\Python27\Scripts
@@ -138,8 +95,6 @@ In order for non-root users in Linux to be able to communicate with OnlyKey a ud
13895
- [id] must be slot number 1a - 6b
13996
- [type] must be one of the following:
14097
- label - Slot label i.e. My Google Acct
141-
- rsa_key_label - Key label for RSA keys 1 - 4
142-
- ecc_key_label - Key label for ECC keys 1 - 29
14398
- url - URL to login page
14499
- delay1 - set a 0 - 9 second delay
145100
- add_char1 - Additional character before username 1 for TAB, 0 to clear
@@ -362,227 +317,6 @@ OnlyKey>
362317
Bye!
363318
```
364319

365-
### Decrypt PGP email messages using OnlyKey
366-
367-
If you using a previously set RSA private key with decryption capabilities you can decrypt OpenPGP/GPG encrypted email messages:
368-
369-
```
370-
$ PGP_message.py
371-
```
372-
373-
`Do you want to sign or decrypt a message?`
374-
`s = sign, d = decrypt`
375-
```
376-
d
377-
378-
Enter RSA key slot number to use (1 - 4) or enter 0 to list key labels
379-
380-
2
381-
382-
Paste OpenPGP Message, press return to go to new line, and then press Ctrl+D or Ctrl+Z (Windows only)
383-
384-
-----BEGIN PGP MESSAGE-----
385-
Version: Mailvelope v1.7.1
386-
Comment: https://www.mailvelope.com
387-
388-
wcFMA322sr0GLHtKAQ/9Hxs3Fe7vNMGMAphp5ddJCBYSx8aL4N1JRS5O3mrw
389-
KkJfNlHn0YcMoC2J4iMrHTNWj0JeyQiGy5mwstAqL8g5Or8HBuqKTycfhHJV
390-
mfTvXhRTE9WY+0JqYBbg02MjKzYuqrhCKfsu9+T/q58T/75XYE8bYwehsXpJ
391-
2stjIj+wjrRRk4Dx/nGegUAmIAAQPmeizzOwLgJbBSZgK1pfrKwuCOpdxH8v
392-
QRLoX2abpipGhhpkhje2PAtTlX2CGES857KThwFzeAJj94k+VAYfsZOi65gg
393-
yMeF3h8V8KugBnZY9kOJFbi5j84iflvgZa/ZlMzLLHWDhgeYQR7rE/zZxIgL
394-
CjW1Iq2QibM8ug7ri4MfxhrHGN9Ci1EnnIVbMHq4kcPrCr20qouZqbXPuXcG
395-
pJ2eKQahH7Zz9cwNB6FoVgG23z9YYp3Q2tS9Cm9hvzJz+dPvy+OvmVqw4oCF
396-
y4yvFRj82xoL7pDzhAPgeC7d3I4zV2Q9ObV5rQFBe8W1G0eukoS3k/UZJXJO
397-
hIw0VBaYkw0MivKceezk36KhgA4LhNQxiOx0YVk+YYryRC7muyYtRlDoSpGe
398-
1dqI+rBDayvsW4hHu5Y6Sb5N1LnHBZg7OSsz/S5fSAR4lcWpbSF3vyBl3tPQ
399-
mVcbHFgpPjUq71lU31RyqybmkBLdYNNvX8iGeZXWIVTSXgHalMeNCTLiL/yr
400-
JZWTQif+8lfAh3aERtqaJRowOxM/fVutJ7Y+xA+fAEeqzbO8cFvik+ww/8Km
401-
uk2Px9ELdgmlEJQ7IXp1hp46r9tv3lqHmtDyL5t/XL+R7QMjI3Y=
402-
=TBU9
403-
-----END PGP MESSAGE-----
404-
^D
405-
406-
You should see your OnlyKey blink 3 times
407-
408-
Sending the payload to the OnlyKey...
409-
410-
Please enter the 3 digit challenge code on OnlyKey (and press ENTER if necessary)
411-
2 5 2
412-
413-
Trying to read the decrypted data from OnlyKey
414-
For RSA with 4096 keysize this may take up to 9 seconds...
415-
416-
Decoded Decrypted Message = ?3umsg.txtX?E?Secret message that I want to encrypt!?????6?*?gQ?6??m??
417-
418-
Encoded Decrypted Message =
419-
-----BEGIN PGP MESSAGE-----
420-
Version: PGPy v0.4.1
421-
422-
yzN1B21zZy50eHRY1UWaU2VjcmV0IG1lc3NhZ2UgdGhhdCBJIHdhbnQgdG8gZW5j
423-
cnlwdCHTFLG2vRg/NpEq6mdRA8E2sALVbZzA
424-
=Lqt2
425-
-----END PGP MESSAGE-----
426-
```
427-
428-
If decryption is successful the ASCII armored version of the message will be displayed. If decryption fails the message "Error with RSA decryption" will be displayed.
429-
430-
### Sign text email message using OnlyKey
431-
432-
If you using a previously set RSA private key with signing capabilities you can sign text messages in OpenPGP/GPG format:
433-
434-
```
435-
$ PGP_message.py
436-
```
437-
438-
`Do you want to sign or decrypt a message?`
439-
`s = sign, d = decrypt`
440-
```
441-
s
442-
443-
Enter RSA key slot number to use (1 - 4) or enter 0 to list key labels
444-
445-
1
446-
You should see your OnlyKey blink 3 times
447-
448-
Trying to read the public RSA N part 1...
449-
450-
Key Size = 512
451-
452-
Do you want to sign a text message or add signature to a PGP Message?
453-
t = text message, p = PGP Message
454-
455-
t
456-
457-
Type or paste the text message, press return to go to new line, and then press Ctrl+D or Ctrl+Z (Windows only)
458-
459-
this message is from me!
460-
461-
You should see your OnlyKey blink 3 times
462-
463-
Sending the payload to the OnlyKey...
464-
465-
Please enter the 3 digit challenge code on OnlyKey (and press ENTER if necessary)
466-
4 2 3
467-
468-
Trying to read the signature from OnlyKey
469-
For RSA with 4096 keysize this may take up to 9 seconds...
470-
471-
Encoded Signed Message =
472-
-----BEGIN PGP SIGNED MESSAGE-----
473-
Hash: SHA256
474-
475-
this message is from me!
476-
-----BEGIN PGP SIGNATURE-----
477-
Version: PGPy v0.4.1
478-
479-
wsFcBAABCAAGBQJY1UMbAAoJEFrjcMPEcl4WjCwP/0OMg9+Jll3b0r5l6Xbz/0uR
480-
ofW0NUC7jIcv/VJeGdF92aQrreeFcSLGJmQtOfDOIfxZUJ5fMq9jZapomEounVIy
481-
oEha/FWVGOyiK4OznSgBtkq2DUj3QQjp/tmQf7rAnYiliO6BOkTiJmib8CZaZTXx
482-
rbQEiLm7kUa4VFoYsum3qS6e2eICfZb/A45XMBjra0PhbZH8Et51IWCT52ighGP8
483-
LAE2s5U+2eLLXad/95QB3w9VaGtZmUvrEPb0vlOSeI6Wj/6aDde9+t1eZUAhsdwD
484-
AndKfCvoapGd3KV0JwkXg6OTr2U/cE5DHBpFYYHjeWmKcLs09v0O7BwcXSwY62UL
485-
0kddPiIxTU+AgPeK+A+xdsvZ6+j1ZZNZVMEG4RKFQnKignSSUR3AmkNQNAemzdBp
486-
Ki18Nl26zSuj5le+I5QjlGNJ8QSieXNGmbjlnj4GMNxCgM2XR6OmaK63oDkS/xp+
487-
ECd8yjzPWx5pDuYMEDKGvv8iw0kNe/b5ZYUTDhvZxlUeL5RtDzdAi2x4vVT8mbmu
488-
/lbnuy8A01geQEFsbMk+4ON9MktjvezYPbjNUGrhBxFqd2XKhIIwSueghdOym/Xr
489-
q6ZOiNRpqxG2aiRZ4flDn01qlYrtpGxLyQowxo4DVeBOTfPY0y+s7ni6KVadAFkd
490-
nHlZ6TZaI4Awu6b9tIAR
491-
=1llp
492-
-----END PGP SIGNATURE-----
493-
```
494-
495-
If signature is successful the ASCII armored version of the message will be displayed. If signature fails the message "Error with RSA signature" will be displayed.
496-
497-
### Add a signature to a PGP message using OnlyKey
498-
499-
If you using a previously set RSA private key with signing capabilities you can sign text messages in OpenPGP/GPG format:
500-
501-
```
502-
$ PGP_message.py
503-
```
504-
505-
`Do you want to sign or decrypt a message?`
506-
`s = sign, d = decrypt`
507-
```
508-
s
509-
510-
Enter RSA key slot number to use (1 - 4) or enter 0 to list key labels
511-
512-
1
513-
514-
You should see your OnlyKey blink 3 times
515-
516-
Key Size = 512
517-
518-
519-
Do you want to sign a text message or add signature to a PGP Message?
520-
t = text message, p = PGP Message
521-
522-
p
523-
524-
Paste OpenPGP Message, press return to go to new line, and then press Ctrl+D or Ctrl+Z (Windows only)
525-
526-
-----BEGIN PGP MESSAGE-----
527-
Version: PGPy v0.4.1
528-
529-
yzN1B21zZy50eHRY1UWaU2VjcmV0IG1lc3NhZ2UgdGhhdCBJIHdhbnQgdG8gZW5j
530-
cnlwdCHTFLG2vRg/NpEq6mdRA8E2sALVbZzA
531-
=Lqt2
532-
-----END PGP MESSAGE-----
533-
^D
534-
535-
You should see your OnlyKey blink 3 times
536-
537-
Please enter the 3 digit challenge code on OnlyKey (and press ENTER if necessary)
538-
3 2 4
539-
540-
Trying to read the signature from OnlyKey
541-
For RSA with 4096 keysize this may take up to 9 seconds...
542-
543-
Encoded Signed Message =
544-
-----BEGIN PGP MESSAGE-----
545-
Version: PGPy v0.4.1
546-
547-
yzN1B21zZy50eHRY1UWaU2VjcmV0IG1lc3NhZ2UgdGhhdCBJIHdhbnQgdG8gZW5j
548-
cnlwdCHTFLG2vRg/NpEq6mdRA8E2sALVbZzA
549-
=Lqt2
550-
-----END PGP MESSAGE-----
551-
-----BEGIN PGP MESSAGE-----
552-
Version: PGPy v0.4.1
553-
554-
xA0DAAgBX/X2Pr84qJgAyzN1B21zZy50eHRY1UWaU2VjcmV0IG1lc3NhZ2UgdGhh
555-
dCBJIHdhbnQgdG8gZW5jcnlwdCHTFLG2vRg/NpEq6mdRA8E2sALVbZzAwsFcBAAB
556-
CAAGBQJY1UciAAoJEF/19j6/OKiY67AQAKwEsTOvYr98S8QMxXoV1d3sUQDu0mCM
557-
7fASd10YR6YRHq2jcvy/D9+ZRc0dlZdUj+3GjbYbrxe10GeB0+EeJnCpaALLvfFm
558-
2+9XmM/w3KFHE2pAe+gvN8s2+hP8i7UWRRgcFQCSLvr+VP1yhfG0O7qdMnYgl6A7
559-
3TXPk4+PnH5qbuWiDDrl9XfdDw4wtFWOxRwq+GXM4hgLU4datouv3cmJA0ikY3Uw
560-
BIgxSP+Hv6ku94tOlACu0R4jOzq+jQBkgWkVViYlNCOS4EdaU9776wrhKIjRuibd
561-
yzerkZlMj91GrThC9Ox/sEbmoXpoa79Z8qXZi2wJ4AqNi4xnEUdtkGFgZaaJUsDn
562-
bbPlNLxictjcqFk9Q2LasbtAOT+f6yD4YgNqBV33fbZXVFiXgYdxqKb0BrcJBCQQ
563-
LcvrazK1byvdBCDiaoHatavaqKKjK9Fs3pCtm0jEfAaiSQStCMF4jRUGOxGWeRav
564-
kaCP7MvGtsNiR3kjDXO9Y79KNNn0ID/AZ9/Z9Ho1wSwUe95BG+WixaFcwz0KlDbZ
565-
bVV0mkPX7/orqD2ihVvmXXB9VcdXn6oKsNA2gBUQp4a80NnvGnh4bdtXoypZkNoe
566-
3bXNvRAne0kSPxjNzhBjJF9F1/EgjR0gHzi677AuhrRN1CkdaHLnnopBjkUmtU+0
567-
BNBU7972zW9q
568-
=9w/g
569-
-----END PGP MESSAGE-----
570-
```
571-
If signature is successful the ASCII armored version of the message will be displayed. If signature fails the message "Error with RSA signature" will be displayed.
572-
573-
## PGPMessage Support
574-
575-
Install w/PGPMessage support. Requires Python 2.7 and Git.
576-
577-
```
578-
$ git clone https://github.com/trustcrypto/python-onlykey.git --recursive
579-
$ cd python-onlykey
580-
$ pip2 install .
581-
$ cd PGPy
582-
$ pip2 install .
583-
$ cd ..
584-
```
585-
586320
## Source
587321

588322
[Python OnlyKey on Github](https://github.com/trustcrypto/python-onlykey)
9.69 KB
Binary file not shown.

dist/onlykey-1.1.0.tar.gz

10.7 KB
Binary file not shown.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
name='onlykey',
1313
version='1.1.0',
1414
description='OnlyKey client and command-line tool',
15-
long_description=long_description,
15+
# long_description=long_description,
1616
url='https://github.com/trustcrypto/python-onlykey',
1717
author='CryptoTrust',
1818
author_email='admin@crp.to',

0 commit comments

Comments
 (0)