Updated README.md for signature example and added new 8=MD5+SHA.
parent
3504bf56e1
commit
3c553c889f
|
@ -2,14 +2,20 @@
|
||||||
|
|
||||||
This directory contains:
|
This directory contains:
|
||||||
|
|
||||||
A simple example of using wolfSSL to sign and verify binary data using SHA512 and ECC256.
|
A simple example of using wolfSSL to sign and verify binary data. It supports RSA and ECC for signing and MD2, MD4, MD5, SHA, SHA256, SHA384 and SHA512.
|
||||||
|
|
||||||
This example creates a signature from a hash of the file and signs it using a generated ECC key. Then it performs a verification using the signature and public key.
|
This example creates a signature from a hash of the file and signs it using a generated key. Then it performs a verification using the signature and public key.
|
||||||
|
|
||||||
|
|
||||||
## Compiling and Running the Example
|
## Compiling and Running the Example
|
||||||
|
|
||||||
```
|
```
|
||||||
$ make
|
$ make
|
||||||
$ ./firmware [filename]
|
$ ./firmware [filename] [sig] [hash]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Usage: signature <filename> <sig> <hash>
|
||||||
|
<sig>: 1=ECC (def), 2=RSA
|
||||||
|
<hash>: 1=MD2, 2=MD4, 3=MD5, 4=SHA, 5=SHA256 (def), 6=SHA384, 7=SHA512, 8=MD5+SHA
|
||||||
|
|
|
@ -330,7 +330,7 @@ int main(int argc, char** argv)
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
printf("Usage: signature <filename> <sig> <hash>\n");
|
printf("Usage: signature <filename> <sig> <hash>\n");
|
||||||
printf(" <sig>: 1=ECC (def), 2=RSA\n");
|
printf(" <sig>: 1=ECC (def), 2=RSA\n");
|
||||||
printf(" <hash>: 1=MD2, 2=MD4, 3=MD5, 4=SHA, 5=SHA256 (def), 6=SHA384, 7=SHA512\n");
|
printf(" <hash>: 1=MD2, 2=MD4, 3=MD5, 4=SHA, 5=SHA256 (def), 6=SHA384, 7=SHA512, 8=MD5+SHA\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if(argc >= 3) {
|
if(argc >= 3) {
|
||||||
|
|
Loading…
Reference in New Issue