wolfssl-examples/signature
David Garske ef20350409 Fix for scan-build issue with not used iRetval. Fix to Makefile for openssl. 2018-05-31 14:19:51 -07:00
..
ED25519 update ED25519 examples based on feedback 2017-04-12 11:41:36 -06:00
encryption-through-signing refactor sanity checks and a debug print 2017-10-24 12:13:50 -06:00
firmware_sign Updated example to demonstrate using curveId parameter for make key and ECC verify. 2018-05-17 11:48:38 -07:00
sigtest Fix for scan-build issue with not used iRetval. Fix to Makefile for openssl. 2018-05-31 14:19:51 -07:00
Makefile wolfSSL signature example. This example takes a file and creates a signature for it using the "wc_Signature*" wrapper functions. This example generates a new ECC key and dumps the key values, then creates a signature from a hash of the file and signs it. Then it performs a verification using the signature and public key. 2015-11-12 09:54:15 -08:00
README.md ED25519 examples for key gen and .der output, sign/verify 2017-04-11 17:35:51 -06:00
signature.c Cleanups to signature example. Added return code checking and clarified the malloc values used. 2017-10-24 08:33:41 -07:00

README.md

wolfSSL Signature Example

This directory contains:

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 key. Then it performs a verification using the signature and public key.

Compiling and Running the Example

$ make
$ ./firmware [filename] [sig] [hash]

Usage

Usage: signature : 1=ECC (def), 2=RSA, 3=RSA (w/DER Encoding) : 1=MD2, 2=MD4, 3=MD5, 4=SHA, 5=SHA256 (def), 6=SHA384, 7=SHA512, 8=MD5+SHA

------------------ UPDATE ----------------- April 11 2017:

Added ED25519 directory

ED25519 directory contains:

  1. App "gen_key_files.c" to generate public/private keys and output keys to .der formatted files.

  2. genkeybuffers.pl - a perl script to write the header file "test_keys.h" using the .der formatted files output from applicaton "gen_key_files.c"

  3. App "sign_and_verify.c" to use the "test_keys.h" header file buffers for importing the public and private keys. App will then sign a msg with the private key and verify that signature using the public key