{
  "component": "baseline-ecdsa",
  "baseCommit": "aebd9183af6a4b1643ddd1e71277f0e8166f3eda",
  "objectiveStatus": "INCOMPLETE",
  "files": [
    {
      "path": "artifacts/goal/batches/e2-runner-components/items/baseline-ecdsa/result.json",
      "action": "created required read-only audit result"
    }
  ],
  "sourceEdits": [],
  "deviceLabel": "unknown",
  "activityStatus": {
    "implemented": "No source implementation: this item is a read-only build-and-test audit.",
    "tested": "Ten repository tests, fixture byte reproduction, bounded verifier benchmark, 234 applicable published Wycheproof vectors, 13 explicit negative cases, 128 fixture signatures with OpenSSL, six published RFC6979 nonce cases, and split timing.",
    "untested": "Real puzzle target, search throughput, private recovery, Bitcoin claim, and confirmation. They are outside this read-only synthetic-only item.",
    "unavailable": "The scratch harness and downloaded Wycheproof JSON are intentionally not submitted; only this result is delivered."
  },
  "commands": [
    {
      "command": "git rev-parse HEAD",
      "exitCode": 0,
      "reported": "aebd9183af6a4b1643ddd1e71277f0e8166f3eda"
    },
    {
      "command": "git status --short; git diff --exit-code",
      "exitCode": 0,
      "reported": "No tracked or untracked source changes before writing this result; git diff empty."
    },
    {
      "command": "rg --files -g 'public-verify-bench/**'; nl -ba public-verify-bench/{secp256k1_verify.py,test_verify.py,gen_fixtures.py,benchmark.py}; cat public-verify-bench/README.md public-verify-bench/fixtures/LICENSE",
      "exitCode": 0,
      "reported": "Inspected four Python sources, README, fixture license and fixture path. No source edited."
    },
    {
      "command": "(cd public-verify-bench && env -u PVB_TASK_DESCRIPTOR PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest -v)",
      "exitCode": 0,
      "reported": "Ran 10 tests in 1.265s; OK."
    },
    {
      "command": "(cd public-verify-bench && /usr/bin/time -f 'process_elapsed_s=%e process_maxrss_kib=%M' env -u PVB_TASK_DESCRIPTOR PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest -v)",
      "exitCode": 0,
      "reported": "Reran 10 tests in 1.222s; OK; process elapsed 1.27s; process peak RSS 19328 KiB."
    },
    {
      "command": "(cd public-verify-bench && env -u PVB_TASK_DESCRIPTOR PYTHONDONTWRITEBYTECODE=1 python3 -B benchmark.py --limit 16 --repeat 2)",
      "exitCode": 0,
      "reported": "Correctness gate 16/16 valid accepted and 16/16 corrupted rejected; 32 timed verifications in 4.103466s, 7.798 verifications/s, traced peak 1252 bytes, process peak RSS 17280 KiB; device unknown."
    },
    {
      "command": "mkdir -p test/scratch/baseline-ecdsa && env PYTHONDONTWRITEBYTECODE=1 python3 -B public-verify-bench/gen_fixtures.py --count 128 --out ../test/scratch/baseline-ecdsa/vectors.json && cmp public-verify-bench/fixtures/vectors.json test/scratch/baseline-ecdsa/vectors.json && sha256sum test/scratch/baseline-ecdsa/vectors.json",
      "exitCode": 0,
      "reported": "Regenerated 128 synthetic vectors in scratch; cmp byte-identical; SHA-256 b2a93674959ab6938447134b8738aff8385b3d4e3a9d9c10637e5826c7210812."
    },
    {
      "command": "git ls-remote https://github.com/C2SP/wycheproof.git HEAD",
      "exitCode": 0,
      "reported": "Pinned observed HEAD 65ca494727a52944c204441c860b039e6786b99b."
    },
    {
      "command": "curl -fsSL --max-time 30 https://raw.githubusercontent.com/C2SP/wycheproof/65ca494727a52944c204441c860b039e6786b99b/testvectors_v1/ecdsa_secp256k1_sha256_p1363_test.json -o test/scratch/baseline-ecdsa/wycheproof.json && sha256sum test/scratch/baseline-ecdsa/wycheproof.json",
      "exitCode": 0,
      "reported": "Fetched published C2SP Project Wycheproof P1363 secp256k1 SHA-256 vectors to scratch; SHA-256 7a339efc7134fb2495cd32afdbd692e0f86427d3c24e9073f6a7d858bb8788d2."
    },
    {
      "command": "env PYTHONDONTWRITEBYTECODE=1 python3 -B test/scratch/baseline-ecdsa/audit.py",
      "exitCode": 0,
      "reported": "252 published cases declared: 167 valid accepted, 67 invalid rejected, zero mismatches; 18 invalid non-64-byte signatures skipped as encoding-only for scalar API. Thirteen explicit wrong-message, invalid-scalar, off-curve/out-of-field/infinity and malformed-SEC1 cases all rejected. Elapsed 1.757218s; process peak RSS 17052 KiB."
    },
    {
      "command": "env PYTHONDONTWRITEBYTECODE=1 python3 -B test/scratch/baseline-ecdsa/openssl_check.py",
      "exitCode": 0,
      "reported": "Independent OpenSSL verification accepted 128/128 regenerated fixture signatures and rejected 16/16 wrong-message variants. Elapsed 0.792431s; no failures. OpenSSL invoked with OPENSSL_CONF=/dev/null."
    },
    {
      "command": "env PYTHONDONTWRITEBYTECODE=1 python3 -B test/scratch/baseline-ecdsa/nonce_check.py",
      "exitCode": 0,
      "reported": "Matched 6/6 published python-ecdsa secp256k1 RFC6979 nonce cases; 0 failures; elapsed 0.000079s; process peak RSS 16512 KiB."
    },
    {
      "command": "env -u PVB_TASK_DESCRIPTOR PYTHONDONTWRITEBYTECODE=1 python3 -B test/scratch/baseline-ecdsa/timing.py",
      "exitCode": 0,
      "reported": "Fixture load, correctness gate, untraced and traced verification, and 50000 distinct-point additions measured separately; details in measurements."
    },
    {
      "command": "sha256sum public-verify-bench/README.md public-verify-bench/*.py public-verify-bench/fixtures/vectors.json test/scratch/baseline-ecdsa/wycheproof.json; git status --short --untracked-files=all; git diff --exit-code",
      "exitCode": 0,
      "reported": "Source and fixture hashes recorded below; no repository source changes."
    }
  ],
  "tests": {
    "repositoryUnit": {
      "count": 10,
      "passed": 10,
      "failed": 0,
      "elapsedProcess_s": 1.27,
      "processPeakRSS_KiB": 19328
    },
    "fixtureDeterminism": {
      "count": 128,
      "byteIdentical": true,
      "sha256": "b2a93674959ab6938447134b8738aff8385b3d4e3a9d9c10637e5826c7210812",
      "independentCertification": false
    },
    "wycheproof": {
      "declared": 252,
      "scalarApplicable": 234,
      "validAccepted": 167,
      "invalidRejected": 67,
      "mismatches": 0,
      "invalidEncodingOnlySkipped": 18,
      "skipReason": "The verifier accepts integer r and s, not serialized P1363 signatures; non-64-byte encoding cases cannot test its API.",
      "elapsed_s": 1.757218,
      "processPeakRSS_KiB": 17052
    },
    "explicitNegativeCases": {
      "count": 13,
      "rejected": 13,
      "labels": ["wrong_message", "off_curve_point", "out_of_field_point", "infinity", "r_zero", "r_n", "r_negative", "s_zero", "s_n", "s_negative", "uncompressed_off_curve", "compressed_x_ge_p", "bad_prefix"]
    },
    "externalSignerCrossCheck": {
      "backend": "OpenSSL ECDSA/SHA-256 verification",
      "fixtureValidAccepted": 128,
      "wrongMessageRejected": 16,
      "failures": 0,
      "elapsed_s": 0.792431
    },
    "publishedNonceCases": {
      "matched": 6,
      "total": 6,
      "failed": 0,
      "provenance": "Debian python-ecdsa 0.13-3+deb10u1, ecdsa/test_pyecdsa.py lines 1486-1529; its first vector is described there as computed with a Go reference implementation."
    },
    "exactFailures": []
  },
  "measurements": {
    "unitsNote": "Verifications/s and additions/s are distinct; neither is a puzzle search or solve rate. Prior approximately 12.10 verifications/s is not a search rate.",
    "sourceBenchmark": {
      "workloadVectors": 16,
      "repeatCount": 2,
      "timedVerifications": 32,
      "timedWall_s": 4.103466,
      "verificationsPerSecond": 7.798,
      "peakPythonAlloc_bytes": 1252,
      "processPeakRSS_KiB": 17280
    },
    "processLocalSplit": {
      "fixtureLoad_s": 0.010696,
      "correctnessGate_s": 0.30804,
      "gateValidAccepted": 16,
      "gateCorruptedRejected": 16,
      "untraced32VerificationWall_s": 0.329533,
      "untracedVerificationsPerSecond": 97.107,
      "traced32VerificationWall_s": 3.888044,
      "tracedVerificationsPerSecond": 8.23,
      "tracingSlowdownFactor": 11.799,
      "tracedPeakPythonAlloc_bytes": 1252,
      "groupAdditions": 50000,
      "groupAdditionWall_s": 0.63053,
      "groupAdditionsPerSecond": 79298.398,
      "processElapsed_s": 5.167014,
      "processPeakRSS_KiB": 17280
    },
    "searchRate": "unmeasured"
  },
  "auditFindings": [
    {
      "file": "public-verify-bench/test_verify.py",
      "line": 23,
      "finding": "test_order_of_G is vacuous as an order check: scalar_mul reduces k modulo N at public-verify-bench/secp256k1_verify.py:57 before multiplying, so N*G returns infinity regardless of the actual order. This is a coverage defect, not a runtime failure."
    },
    {
      "file": "public-verify-bench/test_verify.py",
      "line": 42,
      "finding": "test_rfc6979_deterministic compares two calls to the same signer; it proves repeatability only. Six published secp256k1 nonce values were checked separately."
    },
    {
      "file": "public-verify-bench/gen_fixtures.py",
      "line": 49,
      "finding": "Fixtures are signed by the same secp256k1_verify.py module that test_verify.py:77 and benchmark.py:63 verify. Byte determinism is not independent ECDSA certification; published Wycheproof and OpenSSL checks provide separate evidence."
    },
    {
      "file": "public-verify-bench/benchmark.py",
      "line": 121,
      "finding": "tracemalloc is active over timed_run; observed throughput fell from 97.107 to 8.23 verifications/s in the split run. benchmark.py:79-86 times verification, not group walks or search."
    }
  ],
  "sourceHashesSha256": {
    "public-verify-bench/README.md": "795d2b936e27d7ee7dece7585312d0e471dd293dc187b111bc84bd5ee82860f7",
    "public-verify-bench/benchmark.py": "96a4afacba9c230f30d686f31fdc67b5e44daf26787b140ec8817dc0d5eef8ac",
    "public-verify-bench/gen_fixtures.py": "db8f252e4af9670cfdc073376a807eafabe174d2e06a984d19c3b9f33311e0b9",
    "public-verify-bench/secp256k1_verify.py": "8a41cde9832da9499065790614ef7cc7a84c6f5ee3011601715320df0fa82c93",
    "public-verify-bench/test_verify.py": "ba80ed6a2d99853807bef482aafa54c8fd134300035a313dc6752fb6832a07ca",
    "public-verify-bench/fixtures/vectors.json": "b2a93674959ab6938447134b8738aff8385b3d4e3a9d9c10637e5826c7210812"
  },
  "independentVectorProvenance": [
    {
      "name": "C2SP Project Wycheproof ECDSA secp256k1 SHA-256 P1363",
      "url": "https://github.com/C2SP/wycheproof/blob/65ca494727a52944c204441c860b039e6786b99b/testvectors_v1/ecdsa_secp256k1_sha256_p1363_test.json",
      "commit": "65ca494727a52944c204441c860b039e6786b99b",
      "sha256": "7a339efc7134fb2495cd32afdbd692e0f86427d3c24e9073f6a7d858bb8788d2"
    },
    {
      "name": "python-ecdsa published secp256k1 RFC6979 nonce tests",
      "url": "https://sources.debian.org/src/python-ecdsa/0.13-3%2Bdeb10u1/ecdsa/test_pyecdsa.py#L1486",
      "packageVersion": "0.13-3+deb10u1"
    }
  ],
  "scratchOnlyHarnessHashesSha256": {
    "audit.py": "997e3ba7848900cb559e46fb7eb5af7a6ccd2b64db81eedae81d0b4c91049f95",
    "timing.py": "9da987448ad2d4b9b63f3541a92108c6ea53b97f1470c7f78587b71c2354b80c",
    "openssl_check.py": "c4fa039191e3bb6c1f24fe8e3154aacc87261c769d3207e8658cfaea5e452f41"
  },
  "blockers": [
    "This bounded, read-only item does not perform the real #140 search or Bitcoin claim. The network objective remains incomplete."
  ],
  "restartCommand": "(cd public-verify-bench && env -u PVB_TASK_DESCRIPTOR PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest -v && env -u PVB_TASK_DESCRIPTOR PYTHONDONTWRITEBYTECODE=1 python3 -B benchmark.py --limit 16 --repeat 2)"
}
