-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
65 lines (48 loc) · 2.14 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cpgb is a project to create a replacement for gpg that use Elliptic
Curve Cryptography. cpgb aims to be secure, fast, and usable for many
purposes. The cryptographic components are from the NaCL project,
http://nacl.cr.yp.to.
Currently CPGP compiles a few programs: keygen, encrypt, decrypt, sign,
verify, sign-detached, verify-detached, hex, unhex, lookup.
keygen -s spub spriv
-creates a signing key, putting the public part in spub
and the private part in spriv
keygen -e pub priv
-creates an encryption key, putting the public part in pub
and the private part in priv.
encrypt pub priv file
-outputs an ecrypted form of file to standard output,
with pub the public key of the recipient and priv the private key of the
recipiant.
decrypt pub priv file
-outputs a decrypted form of file to standard output
and exits normally if file is encrypted with the private key corresponding
to pub, and the public key corresponding to priv
sign spriv file
-outputs a signed form of file on standard output
verify spub file
-if file was signed with the private key corresponding to spub then
the original file is output to standard output.
sign-detached spriv file
-outputs a short signature for file
verify-detached spub file sig
-prints "Verify Succeeded!" to standard output if sig is a short signature
generated by sign-detached for file, with the private key corresponding
to spub. If sig is not a short signautre, prints "Verification Failed" and
exits with nonzero status.
encrypt-passphrase in out
Prompts for a user provided passphrase then encrypts in and places the
result in out.
decryp-passphrase in out
Prompts for a passphrase, decrypts in with it, places result in out. If
in was not encrypted with that passphrase nothing happens.
The key derivation function is iterated sha512. This is not a terribly good
design, and at some point I will implement ROMIX or rip it from scrypt.
hex
hex takes its standard input and converts it to hex
unhex
unhex reverses what hex did.
lookup file key value
Lookup examines a list of a-lists in Lips format in file and prints out all
with (key . "value"). Chicken is required to compile it. Adding to file is
easy with a text editor.