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

RepairService test fails on non-canonical signature #295

Open
dnut opened this issue Oct 1, 2024 · 0 comments
Open

RepairService test fails on non-canonical signature #295

dnut opened this issue Oct 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dnut
Copy link
Contributor

dnut commented Oct 1, 2024

Description

273/306 shred_collector.repair_service.test.RepairService sends repair request to gossip peer...FAIL (TimeSkew)
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/scalar.zig:35:9: 0x39fe5af in rejectNonCanonical (test)
        return error.NonCanonical;
        ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/ed25519.zig:157:13: 0x38d3dec in init (test)
            try Curve.scalar.rejectNonCanonical(s);
            ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/ed25519.zig:218:13: 0x3990515 in verifier (test)
            return Verifier.init(self, public_key);
            ^
/home/runner/work/sig/sig/src/core/signature.zig:43:9: 0x385bd4d in verifier (test)
        return signature.verifier(Ed25519.PublicKey.fromBytes(pubkey.data) catch unreachable);
        ^
/home/runner/work/sig/sig/src/shred_collector/repair_message.zig:171:21: 0x3687224 in verify (test)
                    return error.InvalidSignature;
                    ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/scalar.zig:35:9: 0x39fe5af in rejectNonCanonical (test)
        return error.NonCanonical;
        ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/ed25519.zig:157:13: 0x38d3dec in init (test)
            try Curve.scalar.rejectNonCanonical(s);
            ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/ed25519.zig:218:13: 0x3990515 in verifier (test)
            return Verifier.init(self, public_key);
            ^
/home/runner/work/sig/sig/src/core/signature.zig:43:9: 0x385bd4d in verifier (test)
        return signature.verifier(Ed25519.PublicKey.fromBytes(pubkey.data) catch unreachable);
        ^
/home/runner/work/sig/sig/src/shred_collector/repair_message.zig:171:21: 0x36876cc in verify (test)
                    return error.InvalidSignature;
                    ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/scalar.zig:35:9: 0x39fe5af in rejectNonCanonical (test)
        return error.NonCanonical;
        ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/ed25519.zig:157:13: 0x38d3dec in init (test)
            try Curve.scalar.rejectNonCanonical(s);
            ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/ed25519.zig:218:13: 0x3990515 in verifier (test)
            return Verifier.init(self, public_key);
            ^
/home/runner/work/sig/sig/src/core/signature.zig:43:9: 0x385bd4d in verifier (test)
        return signature.verifier(Ed25519.PublicKey.fromBytes(pubkey.data) catch unreachable);
        ^
/home/runner/work/sig/sig/src/shred_collector/repair_message.zig:171:21: 0x3687b74 in verify (test)
                    return error.InvalidSignature;
                    ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/scalar.zig:35:9: 0x39fe5af in rejectNonCanonical (test)
        return error.NonCanonical;
        ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/ed25519.zig:157:13: 0x38d3dec in init (test)
            try Curve.scalar.rejectNonCanonical(s);
            ^
/opt/hostedtoolcache/zig/0.13.0/x64/lib/std/crypto/25519/ed25519.zig:218:13: 0x3990515 in verifier (test)
            return Verifier.init(self, public_key);
            ^
/home/runner/work/sig/sig/src/core/signature.zig:43:9: 0x385bd4d in verifier (test)
        return signature.verifier(Ed25519.PublicKey.fromBytes(pubkey.data) catch unreachable);
        ^
/home/runner/work/sig/sig/src/shred_collector/repair_message.zig:171:21: 0x368800d in verify (test)
                    return error.InvalidSignature;
                    ^
/home/runner/work/sig/sig/src/shred_collector/repair_message.zig:163:21: 0x36875bb in verify (test)
                    return error.TimeSkew;
                    ^
/home/runner/work/sig/sig/src/shred_collector/repair_service.zig:497:5: 0x368e948 in test.RepairService sends repair request to gossip peer (test)
    try msg.verify(buf[0..160], Pubkey.fromPublicKey(&peer_keypair.public_key), @intCast(std.time.milliTimestamp()));
    ^

How to Reproduce the Bug

I've seen this twice in the github workflow. I think both were in the kcov step, at least this one was:

https://github.com/Syndica/sig/actions/runs/11131745666/job/30934025449?pr=278

Additional Context

No response

@dnut dnut added the bug Something isn't working label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant