Last active
December 15, 2019 16:33
-
-
Save SzShow/0ea559ee06d5f55abdf12e2f69b1f9ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
classdef ElipticCurve < handle | |
properties (Access = public) | |
a | |
b | |
p | |
end | |
methods (Access = public) | |
function obj = ElipticCurve(a, b, p) | |
obj.a = mod(sym(a), sym(p)); | |
obj.b = mod(sym(b), sym(p)); | |
obj.p = sym(p); | |
end | |
function y = CalculateY2(obj, x) | |
y = mod((sym(x)^3)+(obj.a*x)+obj.b, obj.p); | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment