Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Untested line in algorithms/EllipticCurve.sol:219 #120

Open
Arachnid opened this issue Apr 16, 2021 · 1 comment
Open

Untested line in algorithms/EllipticCurve.sol:219 #120

Arachnid opened this issue Apr 16, 2021 · 1 comment

Comments

@Arachnid
Copy link
Member

Mutation:
File: algorithms/EllipticCurve.sol
Line nr: 219
Result: Lived
Original line:
if (t0 == t1) {

Mutated line:
                 if (t0 != t1) {
@makoto
Copy link
Member

makoto commented Apr 26, 2021

    function addProj(uint x0, uint y0, uint z0, uint x1, uint y1, uint z1) public pure
        returns (uint x2, uint y2, uint z2)
    {
        uint t0;
        uint t1;
        uint u0;
        uint u1;

        if (isZeroCurve(x0, y0)) {
            return (x1, y1, z1);
        }
        else if (isZeroCurve(x1, y1)) {
            return (x0, y0, z0);
        }

        t0 = mulmod(y0, z1, p);
        t1 = mulmod(y1, z0, p);

        u0 = mulmod(x0, z1, p);
        u1 = mulmod(x1, z0, p);

        if (u0 == u1) {
            if (t0 == t1) {```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants