diff options
| author | J08nY | 2017-02-05 03:59:52 +0100 |
|---|---|---|
| committer | J08nY | 2017-02-05 03:59:52 +0100 |
| commit | 763fc80153c5e9287f1b0f0609b11fb4f50c90ab (patch) | |
| tree | 5cd6e7acc4512cca65bcc16a74f3b63879b2d3bc /src/gp/equation.gp | |
| parent | 3d9bf583ccc5eea61c5f78f52d1e2073daee924c (diff) | |
| download | ecgen-0.2.0.tar.gz ecgen-0.2.0.tar.zst ecgen-0.2.0.zip | |
ecgen v0.2: major rewrite0.2.0
Diffstat (limited to '')
| -rw-r--r-- | src/gp/equation.gp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gp/equation.gp b/src/gp/equation.gp new file mode 100644 index 0000000..c1483e4 --- /dev/null +++ b/src/gp/equation.gp @@ -0,0 +1,28 @@ +/* + * ecgen, tool for generating Elliptic curve domain parameters + * Copyright (C) 2017 J08nY + */ + +/** + * Constructs an elliptic curve in the form E: + * y^2 = x^3 + ax + b, over a prime field + * @param a + * @param b + * @param p + * @returns elliptic curve + */ +prime_weierstrass(a:int, b:int, field:gen) = { + return(ellinit([a,b], field)); +} + +/** + * Constructs an elliptic curve in the form E: + * y^2 + xy = x^3 + ax + b, over a binary field. + * @param a + * @param b + * @param field + * @returns elliptic curve + */ +binary_weierstrass(a:int, b:int, field:gen) = { + return(ellinit([1,0,0,a,b], field)); +} |
