peerplays-fc/README-ecc.md

44 lines
1.5 KiB
Markdown
Raw Normal View History

ECC Support
===========
include/fc/crypto/elliptic.hpp defines an interface for some cryptographic
wrapper classes handling elliptic curve cryptography.
2015-03-11 09:40:15 +00:00
Three implementations of this interface exist. One is based on OpenSSL, the
others are based on libsecp256k1 (see https://github.com/bitcoin/secp256k1 ).
The implementation to be used is selected at compile time using the
2015-03-10 20:56:20 +00:00
cmake variable "ECC_IMPL". It can take one of three values, openssl or
secp256k1 or mixed .
The default is "openssl". The alternatives can be configured when invoking
cmake, for example
cmake -D ECC_IMPL=secp256k1 .
2015-03-10 20:56:20 +00:00
If secp256k1 or mixed is chosen, the secp256k1 library and its include file
must already be installed in the appropriate library / include directories on
your system.
Testing
-------
2015-07-24 20:11:29 +00:00
Type "make ecc_test" to build the ecc_test executable from
tests/crypto/ecc_test.cpp with the currently configured ECC implementation.
ecc_test expects two arguments:
ecc_test <pass> <interop-file>
<pass> is a somewhat arbitrary password used for testing.
<interop-file> is a data file containing intermediate test results.
If the file does not exist, it will be created and intermediate results from
the current ECC backend are written to it.
If the file does exist, intermediate results from the current ECC backend
are compared with the file contents.
2015-03-10 20:56:20 +00:00
For a full round of interoperability testing, you can use the script
2015-07-24 20:11:29 +00:00
tests/crypto/ecc-interop.sh .
2015-03-10 20:56:20 +00:00
None of the test runs should produce any output.