# ECDSA 签名验证

## 标准

* 曲线: secp256k1
* 签名长度: 65 bytes (r || s || v)
* 消息前缀: EIP-191 `\x19Ethereum Signed Message:\n32`
* 实现库: OpenZeppelin 5.6.1 `ECDSA.tryRecover()`

## 用在哪里

* **EcdsaInferenceVerifier** — 验签 inference attestor
* **PoBRegistry.submitBatch** — 验 aggregator batch sig
* **ChallengeManager.open** — 隐含通过 PositionalMerkleProof
* **L2BridgeContract** — message 签名

## 关键约束

* High-s malleability rejection (OZ tryRecover 默认拒绝)
* Chain ID 绑入 EIP-712 typed data → 防 cross-chain replay
* 主网前需评估 BLS12-381 swap (post-quantum readiness)

## 已修 finding

无（slither + manual review 全过）。

## 测试

`contracts/test/EcdsaInferenceVerifier.t.sol` — 多场景覆盖。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yellowpaper.axblade.io/algorithms/ecdsa-signature-verification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
