You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-36Lines changed: 16 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
1
# An implementation based on NIST.SP.800-185
2
2
3
3
Algorithms:
4
-
• SHA-3 derived function KMACXOF256;
5
-
• ECDHIES encryption and Schnorr signatures;
6
-
• DHIES encryption and Schnorr signatures with elliptic curves
4
+
- SHA-3 derived function KMACXOF256
5
+
- ECDHIES encryption and Schnorr signatures
6
+
- DHIES encryption and Schnorr signatures with elliptic curves
7
7
8
8
Objective: implement (in Java) a library and an app for asymmetric encryption and digital signatures at the 256-bit
9
9
security level
10
10
11
+
12
+
11
13
# Developed By:
12
14
13
15
**Yudong Lin**:
@@ -21,6 +23,8 @@ security level
21
23
- The implementation of cSHAKE256
22
24
- The implementation of Ed448-Goldilocks
23
25
26
+
27
+
24
28
# What this program will do:
25
29
26
30
### KMACXOF256 and ECDHIES encryption:
@@ -50,6 +54,8 @@ security level
50
54
7. Sign text input by the user directly to the app instead of having to read it from a file (but write the signature to a file).
51
55
8. Verify a given data file and its signature file under a given public key file.
52
56
57
+
58
+
53
59
# How to use:
54
60
55
61
### SHA-3:
@@ -96,36 +102,6 @@ local disk.
96
102
97
103
### Elliptic curves:
98
104
99
-
#### Services the app must offer for part 2:
100
-
101
-
**Generate an elliptic key pair from a given passphrase and write the public key to a file (and also encrypt the private key from that pair under the given password and write it to a different file as well):**
102
-
103
-
`-eck -p testpw -o public.key -o2 private.key` -- generate an elliptic key pair from the given passphrase "testpw" and write the public key to "public.key" file and ***encrypted*** private key to "private.key" file.
104
-
105
-
**Encrypt a data file under a given elliptic public key file and write the ciphertext to a file:**
106
-
107
-
`-ece -f test.txt -keyp public.key -o test.txt.enc` -- the program will encrypt the "test.txt" file using previously generated "public.key" file, and then save to "test.txt.enc" file.
108
-
109
-
**Encrypt text input by the user directly to the app instead of having to read it from a file (but write the ciphertext to a file).**
110
-
111
-
`-ece -keyp public.key -o test.txt.enc` -- you will be asked to input a string which will be encrypted using previously generated "public.key" file, and then save to "test.txt.enc" file.
112
-
113
-
**Decrypt a given elliptic-encrypted file from a given password and write the decrypted data to a file.**
114
-
115
-
`-ecd -f test.txt.enc -p testpw -o test.txt` -- the program will decrypt "test.txt.enc" file with the passphrase "testpw", and then save to "test.txt"
116
-
117
-
**Sign a given file from a given password and write the signature to a file:**
118
-
119
-
`-ecs -f test.txt -p testpw -o test_signature.key` -- the program will sign the "test.txt" file with the passphrase "testpw", and write the signature to "test_signature.key" file.
120
-
121
-
**Sign text input by the user directly to the app instead of having to read it from a file (but write the signature to a file):**
122
-
123
-
`-ecs -p testpw -o test_signature.key` -- you will be asked to input a string which will be signed using passphrase "testpw", and write the signature to "test_signature.key" file.
124
-
125
-
**Verifying a signature (h, z) for a byte array m under the (Schnorr/ DHIES) public key V:**
126
-
127
-
`-ecv -f test.txt -o test_signature.key -keyp public.key` -- Verify "test.txt" file and its signature file "test_signature.key" under "public.key" file.
128
-
129
105
#### Generate an elliptic key pair:
130
106
131
107
`-eck -p <passphrase> -o <public key output path> -o2 <private key output path> ` -- generate an elliptic key pair from a given passphrase and write the public key and encrypted private key to given location.
@@ -167,15 +143,19 @@ path with the given public key, and then save to given location
167
143
168
144
`-ecv -f <input data file path> -o <signature file path> -keyp <public key file path>` -- Verify a given data file and its signature file under a given public key file.
169
145
170
-
171
-
172
-
#### Please Note that:
146
+
#### Please Note:
173
147
174
148
> The mode argument such as "-h" or "-t" has to be entered as the first argument! The other arguments can be entered
175
149
> in different orders, but following the order listed above are highly recommended!
176
150
177
151
178
152
153
+
# License
154
+
155
+
Please check the **LICENSE** file. You are free to learn and use any part of this repo. However, giving us credits is always a requirement! **You are mandated to include an explicit link to this repo**! We reserve the right to notify your professor or take legal action if needed.
156
+
157
+
158
+
179
159
# Credits:
180
160
181
161
Our implementations is inspired by following repositories or documents:
0 commit comments