feat: sign, verify
This commit is contained in:
15
README.md
15
README.md
@@ -27,7 +27,7 @@ hW53WfImja+b5kwwyqUikyMCAwEAAQ==
|
||||
|
||||
encrypt
|
||||
```
|
||||
openssl rsautl -encrypt -pubin -inkey enc_key.pem -in test.txt -out enc.txt -pkcs
|
||||
$ openssl rsautl -encrypt -pubin -inkey enc_key.pem -in test.txt -out enc.txt -pkcs
|
||||
```
|
||||
|
||||
decrypt
|
||||
@@ -35,6 +35,19 @@ decrypt
|
||||
$ cargo r -- pgp-card-decrypt -c $(cat enc.txt | xxd -ps -c 11111)
|
||||
```
|
||||
|
||||
## sign
|
||||
|
||||
sign
|
||||
```
|
||||
$ cargo r -- pgp-card-sign -2 $(shasum -a 256 test.txt | awk '{print $1}')
|
||||
```
|
||||
|
||||
verify
|
||||
```
|
||||
$ openssl dgst -sha256 -verify sign_key.pem -signature sig test.txt
|
||||
Verified OK
|
||||
```
|
||||
|
||||
|
||||
Awesome webauthn:
|
||||
* https://github.com/herrjemand/awesome-webauthn
|
||||
|
||||
Reference in New Issue
Block a user