{"eip":8197,"title":"Cryptographically Agile Transactions","description":"Cryptographically Agile Transaction format separating signature from transaction body","authors":["Danno Ferrin (@shemnon) \u003cdanno@tectonic.xyz\u003e","Ron Kahat \u003cron@tectonic.xyz\u003e"],"status":"Draft","type":"Standards Track","category":"Core","created":"2025-03-04","requires":[1559,2718,2930,4844,7702],"discussionsTo":"https://ethereum-magicians.org/t/eip-8197-cryptographically-agile-transactions-catx/28003","repo":"EIPs","label":"EIP-8197","officialUrl":"https://eips.ethereum.org/EIPS/eip-8197","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8197.md","url":"https://eips.huatuo.xyz/eip-8197/","tldr":{"en":"Proposes a new transaction envelope that keeps the transaction body separate from a list of typed signatures, so Ethereum can add post-quantum or aggregated signatures without inventing a new transaction type for each one.","ja":"トランザクション本体を型付き署名のリストから分離して保持する新しいトランザクションエンベロープを提案する。これにより Ethereum は、署名ごとに新しいトランザクションタイプを発明することなく、耐量子署名や集約署名を追加できる。","ko":"트랜잭션 본문을 타입이 지정된 서명 목록과 분리해 두는 새로운 트랜잭션 봉투를 제안한다. 이더리움이 서명마다 새로운 트랜잭션 타입을 만들지 않고도 양자 내성 서명이나 집계 서명을 추가할 수 있다.","zh":"提出一种新的交易封装，把交易主体与带类型的签名列表分开，使以太坊无需为每种签名各自发明一种新交易类型，就能加入后量子签名或聚合签名。"},"tags":["transactions","signatures","post-quantum","core"],"explainers":{"en":{"lang":"en","tldr":"Proposes a new transaction envelope that keeps the transaction body separate from a list of typed signatures, so Ethereum can add post-quantum or aggregated signatures without inventing a new transaction type for each one.","tags":["transactions","signatures","post-quantum","core"],"related":[2718,7932,8141,8175,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8197/","markdown":"## What problem does it solve?\n\nEvery Ethereum transaction type today bakes ECDSA fields (`y_parity`, `r`, `s`) directly into its structure. Supporting a different signature algorithm, for example a post-quantum one, would mean defining yet another transaction type for every combination of \"what the transaction does\" and \"how it is signed\".\n\nCATX (Cryptographically Agile Transactions) decouples the two. The body says what to do; a trailing list of `(sig_type, sig_body)` pairs says who authorised it and with which algorithm. This also makes multi-signer transactions safer and makes it easy to strip signatures for future zk signature aggregation.\n\n## How it works\n\nA CATX transaction is a new [EIP-2718](/eip-2718/) type (number still TBD):\n\n```\nCA_TX_TYPE || rlp([payload_type, payload_body, sig_type_0, sig_body_0, sig_type_1, sig_body_1, ...])\n```\n\n- **Payload types** reuse existing bodies: `0x01` (2930), `0x02` (1559), `0x03` (4844), `0x04` (7702). The body is the unsigned form of that transaction. Legacy type-0 transactions are not supported.\n- **Signature count** is set by the payload; any other count makes the transaction invalid. Future payloads such as [EIP-8141](/eip-8141/) frame transactions can require several.\n- **Chained signature hashes.** Signature 0 signs `keccak256(payload_commitment)`, where `payload_commitment = CA_TX_TYPE || rlp(payload_type) || rlp(payload_body)`. Signature *i* signs the commitment plus all earlier `(sig_type, sig_body)` pairs, so signatures cannot be swapped or reordered (the defence against key substitution attacks, using the chaining from [EIP-8175](/eip-8175/)).\n- **ECDSA** is `sig_type 0x00`, with a 65-byte body `y_parity ‖ r ‖ s` and the usual address derivation. Other algorithms are left to a registry such as [EIP-7932](/eip-7932/); their addresses are `keccak256(sig_type ‖ public_key)[12:]` so different schemes never share addresses.\n- **7702 authorizations** inside the body use the same flat shape `[0x05, [chain_id, address, nonce], sig_type, sig_body]`, and their signing hash is unchanged from [EIP-7702](/eip-7702/).\n- The transaction hash is keccak256 over the whole encoding. Gas rules come from each payload's EIP; new signature types are expected to define their own surcharges.\n\n## Sample code\n\nComputing the signing hashes (pseudocode):\n\n```python\ndef payload_commitment(ca_tx_type, payload_type, payload_body):\n    return ca_tx_type + rlp(payload_type) + rlp(payload_body)\n\ndef signature_hash(i, commitment, sigs):\n    # sigs: list of (sig_type, sig_body) already collected\n    data = commitment\n    for sig_type, sig_body in sigs[:i]:\n        data += rlp(sig_type) + rlp(sig_body)\n    return keccak256(data)\n\n# A single-signer EIP-1559 payload wrapped in CATX:\nc = payload_commitment(CA_TX_TYPE, 0x02, [chain_id, nonce, tip, max_fee, gas, to, value, data, access_list])\nh0 = signature_hash(0, c, [])\nsig = ecdsa_sign(h0)                     # y_parity(1) || r(32) || s(32)\ntx = CA_TX_TYPE + rlp([0x02, body, 0x00, sig])\n```\n\n## Things to know\n\n- Status is **Draft**. The transaction type number is not yet assigned.\n- Existing signatures are not reusable: because `CA_TX_TYPE` is part of the signed data, a normal 1559 transaction must be re-signed to become a CATX one, and vice versa. This is deliberate domain separation.\n- 7702 authorization signatures, by contrast, are convertible between the two formats without re-signing.\n- This EIP only defines the format. Which post-quantum or other algorithms are allowed, and what they cost, is left to separate EIPs.\n"},"ja":{"lang":"ja","tldr":"トランザクション本体を型付き署名のリストから分離して保持する新しいトランザクションエンベロープを提案する。これにより Ethereum は、署名ごとに新しいトランザクションタイプを発明することなく、耐量子署名や集約署名を追加できる。","tags":["transactions","signatures","post-quantum","core"],"related":[2718,7932,8141,8175,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8197/","markdown":"## 何を解決するのか\n\n現在の Ethereum のトランザクションタイプはすべて、ECDSA のフィールド（`y_parity`、`r`、`s`）を構造に直接埋め込んでいます。たとえば耐量子署名のような別の署名アルゴリズムをサポートするには、「トランザクションが何をするか」と「どう署名されるか」のあらゆる組み合わせごとに、さらに別のトランザクションタイプを定義することになります。\n\nCATX（Cryptographically Agile Transactions）は、この 2 つを切り離します。本体は何をするかを示し、末尾の `(sig_type, sig_body)` ペアのリストは、誰がどのアルゴリズムで承認したかを示します。これにより、複数署名者のトランザクションがより安全になり、将来の zk 署名集約のために署名を取り除くことも容易になります。\n\n## 仕組み\n\nCATX トランザクションは、新しい [EIP-2718](/eip-2718/) タイプです（番号は未定）。\n\n```\nCA_TX_TYPE || rlp([payload_type, payload_body, sig_type_0, sig_body_0, sig_type_1, sig_body_1, ...])\n```\n\n- **ペイロードタイプ**は既存のボディを再利用します。`0x01`（2930）、`0x02`（1559）、`0x03`（4844）、`0x04`（7702）です。ボディは、そのトランザクションの署名前の形式です。レガシーの type-0 トランザクションはサポートされません。\n- **署名の数**はペイロードによって決まり、それ以外の数ではトランザクションは無効です。[EIP-8141](/eip-8141/) のフレームトランザクションのような将来のペイロードは、複数の署名を要求することがあります。\n- **連鎖する署名ハッシュ。** 署名 0 は `keccak256(payload_commitment)` に署名します。ここで `payload_commitment = CA_TX_TYPE || rlp(payload_type) || rlp(payload_body)` です。署名 *i* は、このコミットメントと、それ以前のすべての `(sig_type, sig_body)` ペアに署名するため、署名の入れ替えや並べ替えはできません（[EIP-8175](/eip-8175/) の連鎖を利用した、鍵置換攻撃への防御です）。\n- **ECDSA** は `sig_type 0x00` で、65 バイトのボディ `y_parity ‖ r ‖ s` と通常のアドレス導出を使います。他のアルゴリズムは [EIP-7932](/eip-7932/) のようなレジストリに委ねられます。そのアドレスは `keccak256(sig_type ‖ public_key)[12:]` なので、異なる方式が同じアドレスを共有することはありません。\n- ボディ内の **7702 の認可**は、同じフラットな形 `[0x05, [chain_id, address, nonce], sig_type, sig_body]` を使い、署名ハッシュは [EIP-7702](/eip-7702/) から変わりません。\n- トランザクションハッシュは、エンコーディング全体に対する keccak256 です。ガスのルールは各ペイロードの EIP に従います。新しい署名タイプは、独自の追加料金を定義することが期待されています。\n\n## サンプルコード\n\n署名ハッシュの計算（擬似コード）:\n\n```python\ndef payload_commitment(ca_tx_type, payload_type, payload_body):\n    return ca_tx_type + rlp(payload_type) + rlp(payload_body)\n\ndef signature_hash(i, commitment, sigs):\n    # sigs: list of (sig_type, sig_body) already collected\n    data = commitment\n    for sig_type, sig_body in sigs[:i]:\n        data += rlp(sig_type) + rlp(sig_body)\n    return keccak256(data)\n\n# A single-signer EIP-1559 payload wrapped in CATX:\nc = payload_commitment(CA_TX_TYPE, 0x02, [chain_id, nonce, tip, max_fee, gas, to, value, data, access_list])\nh0 = signature_hash(0, c, [])\nsig = ecdsa_sign(h0)                     # y_parity(1) || r(32) || s(32)\ntx = CA_TX_TYPE + rlp([0x02, body, 0x00, sig])\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** です。トランザクションタイプの番号はまだ割り当てられていません。\n- 既存の署名は再利用できません。`CA_TX_TYPE` が署名対象データの一部であるため、通常の 1559 トランザクションを CATX にするには再署名が必要で、その逆も同様です。これは意図的なドメイン分離です。\n- 一方、7702 の認可署名は、再署名なしで 2 つの形式間で変換できます。\n- この EIP が定義するのは形式だけです。どの耐量子アルゴリズムなどが許可され、いくらかかるかは、別の EIP に委ねられています。\n"},"ko":{"lang":"ko","tldr":"트랜잭션 본문을 타입이 지정된 서명 목록과 분리해 두는 새로운 트랜잭션 봉투를 제안한다. 이더리움이 서명마다 새로운 트랜잭션 타입을 만들지 않고도 양자 내성 서명이나 집계 서명을 추가할 수 있다.","tags":["transactions","signatures","post-quantum","core"],"related":[2718,7932,8141,8175,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8197/","markdown":"## 어떤 문제를 해결하나요?\n\n오늘날 이더리움의 모든 트랜잭션 타입은 ECDSA 필드(`y_parity`, `r`, `s`)를 구조에 직접 박아 넣고 있습니다. 예컨대 양자 내성 알고리즘 같은 다른 서명 알고리즘을 지원하려면 \"트랜잭션이 하는 일\"과 \"서명하는 방식\"의 모든 조합마다 또 다른 트랜잭션 타입을 정의해야 합니다.\n\nCATX(Cryptographically Agile Transactions)는 이 둘을 분리합니다. 본문은 무엇을 할지를 말하고, 끝에 붙는 `(sig_type, sig_body)` 쌍의 목록은 누가 어떤 알고리즘으로 승인했는지를 말합니다. 이렇게 하면 다중 서명자 트랜잭션이 더 안전해지고, 향후 zk 서명 집계를 위해 서명을 떼어 내기도 쉬워집니다.\n\n## 어떻게 동작하나요?\n\nCATX 트랜잭션은 새로운 [EIP-2718](/eip-2718/) 타입입니다(번호는 아직 미정).\n\n```\nCA_TX_TYPE || rlp([payload_type, payload_body, sig_type_0, sig_body_0, sig_type_1, sig_body_1, ...])\n```\n\n- **페이로드 타입**은 기존 본문을 재사용합니다. `0x01`(2930), `0x02`(1559), `0x03`(4844), `0x04`(7702)입니다. 본문은 해당 트랜잭션의 서명되지 않은 형태입니다. 레거시 type-0 트랜잭션은 지원하지 않습니다.\n- **서명 개수**는 페이로드가 정하며, 다른 개수이면 트랜잭션은 유효하지 않습니다. [EIP-8141](/eip-8141/) 프레임 트랜잭션 같은 향후 페이로드는 여러 개를 요구할 수 있습니다.\n- **연쇄 서명 해시.** 서명 0은 `keccak256(payload_commitment)`에 서명하며, 여기서 `payload_commitment = CA_TX_TYPE || rlp(payload_type) || rlp(payload_body)`입니다. 서명 *i*는 이 커밋먼트와 이전의 모든 `(sig_type, sig_body)` 쌍에 서명하므로, 서명을 바꿔치기하거나 순서를 바꿀 수 없습니다([EIP-8175](/eip-8175/)의 연쇄 방식을 사용한 키 대체 공격 방어).\n- **ECDSA**는 `sig_type 0x00`이며 본문은 65바이트 `y_parity ‖ r ‖ s`이고 주소 도출은 평소와 같습니다. 다른 알고리즘은 [EIP-7932](/eip-7932/) 같은 레지스트리에 맡기며, 이들의 주소는 `keccak256(sig_type ‖ public_key)[12:]`이므로 서로 다른 방식이 주소를 공유하지 않습니다.\n- 본문 안의 **7702 인가**는 같은 평평한 형태 `[0x05, [chain_id, address, nonce], sig_type, sig_body]`를 쓰며, 서명 해시는 [EIP-7702](/eip-7702/)와 같습니다.\n- 트랜잭션 해시는 전체 인코딩에 대한 keccak256입니다. 가스 규칙은 각 페이로드의 EIP를 따르며, 새로운 서명 타입은 자체 추가 요금을 정의할 것으로 기대됩니다.\n\n## 샘플 코드\n\n서명 해시 계산(의사코드):\n\n```python\ndef payload_commitment(ca_tx_type, payload_type, payload_body):\n    return ca_tx_type + rlp(payload_type) + rlp(payload_body)\n\ndef signature_hash(i, commitment, sigs):\n    # sigs: list of (sig_type, sig_body) already collected\n    data = commitment\n    for sig_type, sig_body in sigs[:i]:\n        data += rlp(sig_type) + rlp(sig_body)\n    return keccak256(data)\n\n# A single-signer EIP-1559 payload wrapped in CATX:\nc = payload_commitment(CA_TX_TYPE, 0x02, [chain_id, nonce, tip, max_fee, gas, to, value, data, access_list])\nh0 = signature_hash(0, c, [])\nsig = ecdsa_sign(h0)                     # y_parity(1) || r(32) || s(32)\ntx = CA_TX_TYPE + rlp([0x02, body, 0x00, sig])\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**입니다. 트랜잭션 타입 번호는 아직 할당되지 않았습니다.\n- 기존 서명은 재사용할 수 없습니다. `CA_TX_TYPE`이 서명 대상 데이터의 일부이므로 일반 1559 트랜잭션을 CATX로 바꾸려면 다시 서명해야 하며 그 반대도 마찬가지입니다. 이는 의도적인 도메인 분리입니다.\n- 반면 7702 인가 서명은 다시 서명하지 않고도 두 형식 사이에서 변환할 수 있습니다.\n- 이 EIP는 형식만 정의합니다. 어떤 양자 내성 등의 알고리즘을 허용하고 비용이 얼마인지는 별도의 EIP에 맡깁니다.\n"},"zh":{"lang":"zh","tldr":"提出一种新的交易封装，把交易主体与带类型的签名列表分开，使以太坊无需为每种签名各自发明一种新交易类型，就能加入后量子签名或聚合签名。","tags":["transactions","signatures","post-quantum","core"],"related":[2718,7932,8141,8175,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8197/","markdown":"## 它解决什么问题？\n\n如今以太坊的每种交易类型都把 ECDSA 字段（`y_parity`、`r`、`s`）直接固化在结构里。要支持另一种签名算法，比如后量子算法，就意味着要为\"交易做什么\"和\"如何签名\"的每种组合再定义一种交易类型。\n\nCATX（Cryptographically Agile Transactions，密码学敏捷交易）把二者解耦。主体说明要做什么；末尾的 `(sig_type, sig_body)` 对列表说明是谁授权的、使用了哪种算法。这也让多签名者交易更安全，并便于为将来的 zk 签名聚合而剥离签名。\n\n## 它如何运作\n\nCATX 交易是一种新的 [EIP-2718](/eip-2718/) 类型（编号仍待定）：\n\n```\nCA_TX_TYPE || rlp([payload_type, payload_body, sig_type_0, sig_body_0, sig_type_1, sig_body_1, ...])\n```\n\n- **Payload 类型**复用现有的主体：`0x01`（2930）、`0x02`（1559）、`0x03`（4844）、`0x04`（7702）。主体是该交易未签名的形式。不支持旧式的 type-0 交易。\n- **签名数量**由 payload 决定；任何其他数量都会使交易无效。未来的 payload，如 [EIP-8141](/eip-8141/) 的 frame 交易，可能要求多个签名。\n- **链式签名哈希。** 签名 0 对 `keccak256(payload_commitment)` 签名，其中 `payload_commitment = CA_TX_TYPE || rlp(payload_type) || rlp(payload_body)`。签名 *i* 对该承诺加上之前所有 `(sig_type, sig_body)` 对签名，因此签名无法被替换或重排（这是对密钥替换攻击的防御，采用了 [EIP-8175](/eip-8175/) 的链式方法）。\n- **ECDSA** 是 `sig_type 0x00`，主体为 65 字节的 `y_parity ‖ r ‖ s`，地址推导方式不变。其他算法留给 [EIP-7932](/eip-7932/) 之类的注册表；它们的地址为 `keccak256(sig_type ‖ public_key)[12:]`，因此不同方案永远不会共用地址。\n- 主体内的 **7702 授权**使用同样的扁平形式 `[0x05, [chain_id, address, nonce], sig_type, sig_body]`，其签名哈希与 [EIP-7702](/eip-7702/) 保持一致。\n- 交易哈希是对整个编码的 keccak256。gas 规则来自各 payload 的 EIP；新的签名类型预计会定义各自的附加费用。\n\n## 示例代码\n\n计算签名哈希（伪代码）：\n\n```python\ndef payload_commitment(ca_tx_type, payload_type, payload_body):\n    return ca_tx_type + rlp(payload_type) + rlp(payload_body)\n\ndef signature_hash(i, commitment, sigs):\n    # sigs: list of (sig_type, sig_body) already collected\n    data = commitment\n    for sig_type, sig_body in sigs[:i]:\n        data += rlp(sig_type) + rlp(sig_body)\n    return keccak256(data)\n\n# A single-signer EIP-1559 payload wrapped in CATX:\nc = payload_commitment(CA_TX_TYPE, 0x02, [chain_id, nonce, tip, max_fee, gas, to, value, data, access_list])\nh0 = signature_hash(0, c, [])\nsig = ecdsa_sign(h0)                     # y_parity(1) || r(32) || s(32)\ntx = CA_TX_TYPE + rlp([0x02, body, 0x00, sig])\n```\n\n## 需要注意\n\n- 状态为 **Draft**。交易类型编号尚未分配。\n- 现有签名无法复用：由于 `CA_TX_TYPE` 是被签名数据的一部分，普通的 1559 交易必须重新签名才能变成 CATX 交易，反之亦然。这是有意的域分隔。\n- 相比之下，7702 授权签名可以在两种格式之间转换而无需重新签名。\n- 本 EIP 只定义格式。允许哪些后量子或其他算法、它们的成本是多少，留给单独的 EIP。\n"}}}
