This SystemC design implements a power attack on a system that uses the elliptic curve cryptography-based mutual authentication protocol as described in

[HK11] Y.W.Hau ; Khalil-Hani, Mohamed: SystemC-Based Hardware/Software Co-Design of Elliptic Curve Cryptographic System for Network Mutual Authentication. In: International Conference on Micro-
electronics (2011).

The power traces that are generated during simulation can be visualized using the corresponding HTML file visualizationECC.html in ../PowerVisualization.

Compilation:

1. adapt SYSTEMC_HOME in the Makefile to your system. 
2. > make

After successful compilation, the system can be executed with:

./main [parameter]

The parameter specifies example settings of the elliptic curve that is used for encryption. 

The parameters "standard1" to "standard3" are recommended to simulate power attacks (for longer keys, the computation time might become unreasonably high).

parameter="standard1":

	Elliptic curve:
	y^2 = x^3 + 4x + 7
	prime field: GF(11)
	base point G: (5,3)
	order of G: 13
	
parameter="standard2":

	Elliptic curve:
	y^2 = x^3 + 2x + 4
	prime field: GF(23)
	base point G: (12,10)
	order of G: 13


parameter="standard3":

	Elliptic curve:
	y^2 = x^3 + 54x + 158
	prime field: GF(331)
	base point G: (55,32)
	order of G: 341

Note that the authentification sometimes fails, but the power consumption monitoring is still useful in these cases.

parameter="secp128r1":

	Recommended ECC parameters according to secp128r1 
	http://www.secg.org/SEC2-Ver-1.0.pdf


parameter="secp128r2":

	Recommended ECC parameters according to secp128r2 
	http://www.secg.org/SEC2-Ver-1.0.pdf

With UAF as second parameter, decryption is performed with the unified addition formulae.





