Elliptic Curve Cryptography

David Stes, July 2004.

ECC is a package for Elliptic Curve cryptography. Current version is ecc-0.2.2.tar.gz.

ECC is implemented by using OpenSSL 0.9.6a or higher, for message digests and symmetric ciphers, and by using the Portable Object Compiler and Computer Algebra Kit for the elliptic curve cryptography.

Important note: you need version 3.2.5 of the compiler to compile this package.

See the README and INSTALL files in the package for instructions on how to use and how to install the ec-keygen, ec-sign, ec-verify, ec-crypt and ec-decrypt commands.

List nicknames of curves:

ec-keygen -l c47n23r1:secp112r1:secp112r2:secp160r1:secp384r1:sect113r1:sect163k1

Generate a public and private key:

ec-keygen -e secp112r2 -o stes

Generated files:

ls -ltr stes.pub stes.prv -rw-r--r-- 1 stes users 311 Jul 12 22:00 stes.pub -rw------- 1 stes users 135 Jul 12 22:00 stes.prv

Digital Signature:

ec-sign -c sha1 -k stes.prv -f README -s README.sign

Verify the signature:

ec-verify -k stes.pub -f README -s README.sign echo $? 0


ec-crypt -c aes-128-cbc -k stes.pub -f README -s README.key -o enc ec-crypt: unable to get 16 bytes of key from this curve, use a different curve ec-crypt -c rc4-40 -k stes.pub -f README -s README.key -o enc


ec-decrypt -k stes.prv -f enc -s README.key -o myREADME

A unique feature of this implementation is the possibility of using a few curves over finite fields with prime fields of odd characteristic (in this case, a finite field of characteristic 47 (a small prime)) :