blob: 3589b0185167d3ded5c722991f5469078425eee9 [file] [log] [blame]
Namespaces are used to separate different curves.
So for example to support both ED25519 and the NIST P256 curves, one
could import into a particular module both "amcl/ED25519" and "amcl/NIST256"
Separate ROM files provide the constants required for each curve. Some
files (BIG.go, FP.go, ECP.go) also specify certain constants
that must be set for the particular curve.
--------------------------------------
Make sure that the GOPATH environmental variable is set.
Then clone the AMCL repository by executing
go get github.com/milagro-crypto/amcl
Ignore the warning message about "no Go files"
This assumes that Git is installed on your machine - see
https://git-scm.com/download/
Next navigate to $GOPATH/src/github.com/milagro-crypto/amcl/version3/go
To build the library and see it in action, execute the python3
script config32.py or config64.py (depending om whether you want a
32 or 64-bit build), and select the curves that you wish to support.
As a quick example execute
py config64.py
or
python3 config64.py
Then select options 1, 3, 7, 18, 20, 25, 26 and 27 (these are fixed for the example
program provided). Select 0 to exit.
Run the test program by executing
go run TestALL.go
The correct PIN is 1234
Run another test program by executing
go run TestBLS.go
Next run the Benchmark program by executing
go run BenchtestALL.go
Finally
go run TestNHS.go