---
bip: 459
title: "DahLIAS fully aggregated signatures for secp256k1"
status: Draft
type: Specification
layer: "Applications"
authors: ["Fabian Jahr"]
assigned: 2026-07-10
last_modified: 2026-07-11
requires: [340]
topics: ["signatures"]
license: "CC0-1.0 OR MIT"
url: https://bipexplorer.com/bip/459
source: https://github.com/bitcoin/bips/blob/master/bip-0459.mediawiki
---

# BIP 459: DahLIAS fully aggregated signatures for secp256k1

## Introduction

### Abstract

This document describes _full-aggregation_, a standard for Schnorr-style aggregate signatures based on the DahLIAS[1] interactive aggregate signature scheme. Full-aggregation is an interactive process in which a group of signers produces a single aggregate signature for a collection of public key and message pairs. The resulting aggregate signature has the same size as a single BIP 340 signature (64 bytes), regardless of the number of signers.

### Copyright

This document, along with the [reference implementation](https://github.com/bitcoin/bips/blob/master/bip-0459/reference.py) and [test vectors](https://github.com/bitcoin/bips/blob/master/bip-0459/vectors/), is licensed under CC0-1.0 or the MIT License, at your option. The vendored copy of the secp256k1lab library in [bip-0459/secp256k1lab](https://github.com/bitcoin/bips/blob/master/bip-0459/secp256k1lab/) is licensed under the MIT License only, as stated in its [COPYING](https://github.com/bitcoin/bips/blob/master/bip-0459/secp256k1lab/COPYING) file.

### Motivation

Full-aggregation applies whenever a verifier must check multiple signatures. The signers jointly produce a single constant-size aggregate signature, and verifying the aggregate gives the same assurance as verifying an individual signature for each public key and message pair.

The primary purpose is to reduce the amount of data sent to the verifier. While _n_ BIP 340 signatures are _64\*n_ bytes, a fully aggregated signature is always 64 bytes. Verifying the aggregate is also faster than verifying each signature separately. One application is cross-input signature aggregation (CISA) within the Bitcoin consensus protocol, which reduces the size and verification cost of multi-input transactions. Deploying CISA requires a consensus change that this document does not specify. This document only specifies the signature scheme and consensus integration is left to a future proposal.

Full-aggregation is interactive. It requires cooperation among all signers, following a two-round protocol whose first round can be preprocessed before the messages to be signed are known. This makes full-aggregation unsuitable for scenarios where signers cannot coordinate. However, when all input owners already cooperate to construct and sign a transaction, the interaction is not a significant burden. Historical average transactions would see an [average size reduction of 20.5% and a weight reduction of 7.3%](https://hrf.org/latest/cisa-research-paper/). Full-aggregation is particularly beneficial for large transactions such as CoinJoins, PayJoins and consolidations, because the savings grow with the number of inputs. For example, a hypothetical CoinJoin of 300 inputs and 300 outputs would see a size reduction of 42.7% and a weight reduction of 15.9%. A typical consolidation transaction of 150 inputs and one output would see a weight reduction of 27.4%. CISA with full-aggregation can even reduce the cost of privacy since participating in CoinJoin and PayJoin transactions can become cheaper than sending individual transactions.

Unlike interactive multisignature schemes such as MuSig2 ([BIP 327](https://bipexplorer.com/bip/327)), in which signers cooperate to produce a single signature under a single aggregate public key for a single message, full-aggregation does not combine the signers' keys. Each signer signs their own message under their own public key, and the aggregate signature is verified against the list of individual public key and message pairs.

## Overview

Implementers must make sure to understand this section thoroughly to avoid subtle mistakes that may lead to catastrophic failure.

### General Signing Flow

The signing protocol involves _u_ signers, each with their own secret key, public key, and message, and a _coordinator_ who aggregates their contributions.

The basic order of operations to create a fully aggregated signature is as follows:

**First broadcast round:** The signers start the signing session by running _NonceGen_ to compute _secnonce_ and _pubnonce_.[2] Then, the signers send their _pubnonce_ to the coordinator. The coordinator runs _NonceAgg_ to compute an aggregate nonce _aggnonce_ and sends it back to the signers, along with the ordered list of all _(pk, m, pubnonce)_ triples.

**Second broadcast round:** At this point, every signer has the required data to sign. Every signer computes a partial signature by running _Sign_ with their secret key, their _secnonce_, the message they intend to sign, and the session parameters. Then, the signers send their partial signatures to the coordinator, who runs _SigAgg_ to obtain the final 64-byte aggregate signature. If all signers behaved honestly, the result passes _Verify_. If the aggregate signature is invalid, the coordinator can run _PartialSigVerify_ on each partial signature to identify the disruptive signer.

**IMPORTANT**: The _Sign_ algorithm must **not** be executed twice with the same _secnonce_. Otherwise, it is possible to extract the signer's secret key from the partial signatures output by three executions of _Sign_ in different sessions (see [Nonce Generation](#nonce-generation)). To avoid accidental reuse of _secnonce_, an implementation may securely erase the _secnonce_ argument by overwriting it with 64 zero bytes after it has been read by _Sign_. A _secnonce_ consisting of only zero bytes is invalid for _Sign_ and will cause it to fail.

To simplify the specification of the algorithms, some intermediary values are unnecessarily recomputed from scratch, e.g., when executing _GetSessionValues_ multiple times. Actual implementations can cache these values. As a result, the session parameters may look different in implementations or may not exist as an explicit data structure. However, computation of _GetSessionValues_ and storage of the result must be protected against modification from an untrusted third party.

### Nonce Generation

**IMPORTANT**: _NonceGen_ must have access to a high-quality random generator to draw an unbiased, uniformly random value _rand'_ . In contrast to BIP 340 signing, the nonce values **must not be derived deterministically** from the signing key and message because otherwise active adversaries can trick the victim into reusing a nonce.[3]

The optional arguments to _NonceGen_ enable a defense-in-depth mechanism that may prevent secret key exposure if _rand'_ is accidentally not drawn uniformly at random. If the value _rand'_ was identical in two _NonceGen_ invocations but any other argument was different, the _secnonce_ would still be different, avoiding accidental nonce reuse. Therefore, it is recommended to provide the optional argument _sk_ if available during nonce generation. The auxiliary input _extra\_in_ can contain additional contextual data that has a chance of changing between _NonceGen_ runs, e.g., a session identifier or a counter. However, the protection provided by the optional arguments should only be viewed as a last resort.

In some applications, it is beneficial to generate and send a _pubnonce_ before the other signers, their public keys, or the messages to sign are known. In this case, the _NonceGen_ algorithm is run during a preprocessing phase, and the _Sign_ algorithm can be run immediately when the messages and set of signers are determined. This way, the final signature is created quicker and with fewer round trips. However, applications that use this method presumably store the nonces for a longer time and must therefore be even more careful not to reuse them.

In general, signers are stateful in the sense that they first generate _secnonce_ and then need to store it until they receive the coordinator's response containing the aggregate nonce and session parameters. However, it is possible for one of the signers to be stateless: this signer waits until it receives the _pubnonce_ of all other signers and until session parameters are determined. Then, the signer can run _NonceGen_, _NonceAgg_, and _Sign_ in sequence and send out its _pubnonce_ along with its partial signature.

### Role of the Coordinator

Instead of every signer sending their nonce and partial signature to every other signer, it is possible to use an untrusted _coordinator_ to reduce the communication complexity from quadratic to linear in the number of signers. In each of the two rounds, the coordinator collects all signers' contributions (nonces or partial signatures), processes them, and sends the results back to the signers. A malicious coordinator can force the signing session to fail to produce a valid aggregate signature but cannot negatively affect the unforgeability of the scheme, i.e., even a malicious coordinator colluding with all but one signer cannot forge a signature.

If there is no dedicated coordinator, one of the signers can act as the coordinator.

Unlike BIP 327 where the coordinator only needs to send the aggregate nonce back to signers, the coordinator in this scheme must also send each signer the individual public nonces (specifically, the _R2_ components) of all signers. This is because each signer must verify that their own _R2_ value appears exactly once in the session context (see [Sign](#sign)). In many applications, the signers already know the list of public keys and messages before the signing session starts and only the _aggnonce_ and individual public nonces need to be communicated.

### List Ordering

The aggregate signature depends on the order of the list of public key and message pairs. A signature valid for a list _L_ will not be valid for any non-trivial permutation of _L_ (except with negligible probability). If an application does not have a natural ordering of signers, the list should be sorted using a predetermined order before being provided to the coordinator, and the verifier must use the same order.

## Specification

### Notation

The following conventions are used, with constants as defined for [secp256k1](https://www.secg.org/sec2-v2.pdf). We note that adapting this specification to other elliptic curves is not straightforward and can result in an insecure scheme[4].

-   Lowercase variables represent integers or byte arrays.
    
    -   The constant _p_ refers to the field size, _0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F_.
    
    -   The constant _n_ refers to the curve order, _0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141_.
-   Uppercase variables refer to points on the curve with equation _y2 = x3 + 7_ over the integers modulo _p_.
    
    -   _is\_infinite(P)_ returns whether or not _P_ is the point at infinity.
    
    -   _x(P)_ and _y(P)_ are integers in the range _0..p-1_ and refer to the X and Y coordinates of a point _P_ (assuming it is not infinity).
    
    -   The constant _G_ refers to the base point, for which _x(G) = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798_ and _y(G) = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8_.
    
    -   Addition of points refers to the usual [elliptic curve group operation](https://en.wikipedia.org/wiki/Elliptic_curve#The_group_law).
    
    -   [Multiplication (⋅) of an integer and a point](https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication) refers to the repeated application of the group operation.
-   Functions and operations:
    
    -   _||_ refers to byte array concatenation.
    
    -   The function _x\[i:j\]_, where _x_ is a byte array and _i, j ≥ 0_, returns a _(j - i)_\-byte array with a copy of the _i_\-th byte (inclusive) to the _j_\-th byte (exclusive) of _x_.
    
    -   The function _bytes(x)_, where _x_ is an integer, returns the 32-byte encoding of _x_, most significant byte first.
    
    -   The function _xbytes(P)_, where _P_ is a point for which _not is\_infinite(P)_, returns _bytes(x(P))_.
    
    -   The function _cbytes(P)_, where _P_ is a point for which _not is\_infinite(P)_, returns the 33-byte encoding consisting of the single byte _0x02_ if _has\_even\_y(P)_, or _0x03_ otherwise, prepended to _bytes(x(P))_.
    
    -   The function _len(x)_ where _x_ is a byte array returns the length of the array.
    
    -   The function _int(x)_, where _x_ is a 32-byte array, returns the 256-bit unsigned integer whose most significant byte first encoding is _x_.
    
    -   The function _has\_even\_y(P)_, where _P_ is a point for which _not is\_infinite(P)_, returns _y(P) mod 2 = 0_.
    
    -   The function _lift\_x(x)_, where _x_ is a 256-bit unsigned integer, returns the point _P_ for which _x(P) = x_ and _has\_even\_y(P)_, or fails if _x ≥ p_ or no such point exists. The function _lift\_x(x)_ is equivalent to the following pseudocode:
        
        -   Fail if _x ≥ p_.
        
        -   Let _c = x3 + 7 mod p_.
        
        -   Let _y = c(p+1)/4 mod p_.
        
        -   Fail if _c ≠ y2 mod p_.
        
        -   Return the unique point _P_ such that _x(P) = x_ and _y(P) = y_ if _y mod 2 = 0_ or _y(P) = p - y_ otherwise.
    -   The function _cpoint(x)_, where _x_ is a 33-byte array, sets _P_ to the point on the curve whose X coordinate is _int(x\[1:33\])_. Fail if _x\[0\]_ is not _0x02_ or _0x03_, if _int(x\[1:33\]) ≥ p_, or if no point with that X coordinate exists on the curve. If _x\[0\] = 0x02_, return the point with even y; if _x\[0\] = 0x03_, return the point with odd y.
    
    -   The function _hashtag(x)_ where _tag_ is a UTF-8 encoded tag name and _x_ is a byte array returns the 32-byte hash _SHA256(SHA256(tag) || SHA256(tag) || x)_.
-   Other:
    -   Tuples are written by listing the elements within parentheses and separated by commas. For example, _(2, 3, 1)_ is a tuple.

In the [reference implementation](https://github.com/bitcoin/bips/blob/master/bip-0459/reference.py), these operations map to the following [secp256k1lab](https://github.com/secp256k1lab/secp256k1lab) library methods, where _GE_ and _Scalar_ represent points and scalars:

| Notation | secp256k1lab |
| --- | --- |
| _lift\_x(int(x))_ | _GE.from\_bytes\_xonly(x)_ |
| _cpoint(x)_ | _GE.from\_bytes\_compressed(x)_ |
| _int(x)_, failing if _≥ n_ | _Scalar.from\_bytes\_checked(x)_ |
| _int(x) mod n_ | _Scalar.from\_bytes\_wrapping(x)_ |
| _xbytes(P)_ | _P.to\_bytes\_xonly()_ |
| _cbytes(P)_ | _P.to\_bytes\_compressed()_ |
| _bytes(s)_ | _s.to\_bytes()_ |
| _has\_even\_y(P)_ | _P.has\_even\_y()_ |
| _hashtag(x)_ | _tagged\_hash(tag, x)_ |

### Algorithms

The following specification of the algorithms has been written with a focus on clarity. As a result, the specified algorithms are not always optimal in terms of computation and space. In particular, some values are recomputed but can be cached in actual implementations (see [General Signing Flow](#general-signing-flow)).

Unless noted otherwise, any of the _pk0..u-1_, _m0..u-1_, _pubnonce0..u-1_, and _psig0..u-1_ arrays that an algorithm takes have the same length _u_, with _u ≥ 1_, and the algorithm fails otherwise. Each message is a 32-byte array, and an algorithm fails on any message of a different length.

#### NonceGen

_NonceGen_ generates a secret nonce and a corresponding public nonce for a single signer.

Input:

-   _sk_: a 32-byte secret key (optional argument)

-   _extra\_in_: a byte array (optional argument)

**_NonceGen(sk, extra\_in)_**[5]:

-   Let _rand'_ be a 32-byte array freshly drawn uniformly at random.

-   If the optional argument _sk_ is present:
    -   Let _rand_ be the byte-wise xor of _sk_ and _hashBIP0459/aux(rand')_.
-   Else:
    -   Let _rand = rand'_ .
-   If the optional argument _extra\_in_ is not present:
    -   Let _extra\_in_ be an empty byte array.
-   Let _r1 = int(hashBIP0459/nonce(rand || extra\_in || 0x00)) mod n_; fail if _r1 = 0_.

-   Let _r2 = int(hashBIP0459/nonce(rand || extra\_in || 0x01)) mod n_; fail if _r2 = 0_.

-   Let _R1 = r1⋅G_.

-   Let _R2 = r2⋅G_.

-   Let _secnonce = bytes(r1) || bytes(r2)_.

-   Let _pubnonce = cbytes(R1) || cbytes(R2)_.

-   Return _(secnonce, pubnonce)_.

#### NonceAgg

_NonceAgg_ aggregates all signers' public nonces into a single aggregate nonce.

Input:

-   _pubnonce0..u-1_: an array of _u_ 66-byte public nonces

**_NonceAgg(pubnonce0..u-1)_**:

-   For _i = 0 .. u-1_:
    
    -   Let _R1,i = cpoint(pubnoncei\[0:33\])_; fail if that fails.
    
    -   Let _R2,i = cpoint(pubnoncei\[33:66\])_; fail if that fails.
-   Let _R1 = R1,0 + R1,1 + ... + R1,u-1_.

-   Let _R2 = R2,0 + R2,1 + ... + R2,u-1_.

-   Fail if _is\_infinite(R1)_ or _is\_infinite(R2)_.

-   Let _aggnonce = cbytes(R1) || cbytes(R2)_.

-   Return _aggnonce_.

#### GetSessionValues

_GetSessionValues_ is a helper function that computes the derived values shared by _Sign_, _SigAgg_, and _PartialSigVerify_.

Input:

-   _aggnonce_: a 66-byte aggregate nonce

-   _pk0..u-1_: an array of _u_ 32-byte public keys

-   _m0..u-1_: an array of _u_ 32-byte messages

-   _pubnonce0..u-1_: an array of _u_ 66-byte public nonces

**_GetSessionValues(aggnonce, pk0..u-1, m0..u-1, pubnonce0..u-1)_**:

-   Let _R1 = cpoint(aggnonce\[0:33\])_; fail if that fails.

-   Let _R2 = cpoint(aggnonce\[33:66\])_; fail if that fails.

-   For _i = 0 .. u-1_:
    -   Let _R2,i = cpoint(pubnoncei\[33:66\])_; fail if that fails.
-   Let _nonce\_data = cbytes(R1) || cbytes(R2)_

-   For _i = 0 .. u-1_:
    -   Let _nonce\_data = nonce\_data || pki || mi || cbytes(R2,i)_
-   Let _b = int(hashBIP0459/noncecoef(nonce\_data)) mod n_

-   Let _R = R1 + b⋅R2_

-   Fail if _is\_infinite(R)_.

-   Return _(R, b)_

#### Sign

_Sign_ produces a partial signature for a signer. Only the signer's own entry in the list of public key and message pairs is checked, but the resulting aggregate signature is valid for exactly this list. Any condition the caller requires of the other entries, such as the list matching one agreed upon before the session, must therefore be checked by the caller before invoking _Sign_.

Input:

-   _secnonce_: a 64-byte secret nonce

-   _sk_: a 32-byte secret key

-   _m_: the 32-byte message this signer intends to sign

-   _aggnonce_: a 66-byte aggregate nonce

-   _pk0..u-1_: an array of _u_ 32-byte public keys

-   _m0..u-1_: an array of _u_ 32-byte messages

-   _pubnonce0..u-1_: an array of _u_ 66-byte public nonces

**_Sign(secnonce, sk, m, aggnonce, pk0..u-1, m0..u-1, pubnonce0..u-1)_**:

-   Let _r1 = int(secnonce\[0:32\])_; fail if _r1 = 0_ or _r1 ≥ n_.

-   Let _r2 = int(secnonce\[32:64\])_; fail if _r2 = 0_ or _r2 ≥ n_.

-   Let _d = int(sk)_; fail if _d = 0_ or _d ≥ n_.

-   Let _P = d⋅G_.

-   Let _R2 = r2⋅G_.

-   **Index lookup and uniqueness check**: Find the unique index _j_ in _0..u-1_ such that _pubnoncej\[33:66\] = cbytes(R2)_. Fail if no such index exists or if more than one such index exists.[6]

-   Fail if _pkj ≠ xbytes(P)_ or _mj ≠ m_, i.e., the public key or message at the signer's position does not match the signer's secret key or intended message.

-   Let _(R, b) = GetSessionValues(aggnonce, pk0..u-1, m0..u-1, pubnonce0..u-1)_; fail if that fails.

-   Let _e = 1_ if _has\_even\_y(R)_, otherwise let _e = n - 1_.

-   Let _d' = d_ if _has\_even\_y(P)_, otherwise let _d' = n - d_.

-   Let _L = pk0 || m0 || ... || pku-1 || mu-1_.

-   Let _cj = int(hashBIP0459/sig(L || xbytes(R) || pkj || mj)) mod n_.

-   Let _sj = (e⋅(r1 + b⋅r2) + cj⋅d') mod n_.

-   Let _psig = bytes(sj)_.

-   Return _psig_.

#### SigAgg

_SigAgg_ aggregates all partial signatures into a final 64-byte aggregate signature.

Input:

-   _aggnonce_: a 66-byte aggregate nonce

-   _pk0..u-1_: an array of _u_ 32-byte public keys

-   _m0..u-1_: an array of _u_ 32-byte messages

-   _pubnonce0..u-1_: an array of _u_ 66-byte public nonces

-   _psig0..u-1_: an array of _u_ 32-byte partial signatures

**_SigAgg(aggnonce, pk0..u-1, m0..u-1, pubnonce0..u-1, psig0..u-1)_**:

-   Let _(R, b) = GetSessionValues(aggnonce, pk0..u-1, m0..u-1, pubnonce0..u-1)_; fail if that fails.

-   For _i = 0 .. u-1_:
    -   Let _si = int(psigi)_; fail if _si ≥ n_.
-   Let _s = (s0 + s1 + ... + su-1) mod n_.

-   Let _sig = xbytes(R) || bytes(s)_.

-   Return _sig_.

#### PartialSigVerify

_PartialSigVerify_ verifies a single signer's partial signature and is used to identify disruptive signers. It recomputes the aggregate nonce from the public nonces rather than taking it as an argument, so its result cannot be influenced by the coordinator. If the public nonces are received over authenticated channels and _PartialSigVerify_ succeeds for the partial signatures of all _u_ signers, then _SigAgg_ called with _aggnonce = NonceAgg(pubnonce0..u-1)_ produces a valid aggregate signature.

Input:

-   _psig_: a 32-byte partial signature

-   _pk0..u-1_: an array of _u_ 32-byte public keys

-   _m0..u-1_: an array of _u_ 32-byte messages

-   _pubnonce0..u-1_: an array of _u_ 66-byte public nonces

-   _signer\_index_: the index of the signer in the list (integer in _0..u-1_)

**_PartialSigVerify(psig, pk0..u-1, m0..u-1, pubnonce0..u-1, signer\_index)_**:

-   Let _i = signer\_index_.

-   Fail if _i < 0_ or _i ≥ u_.

-   Let _s = int(psig)_; fail if _s ≥ n_.

-   Let _R1,i = cpoint(pubnoncei\[0:33\])_; fail if that fails.

-   Let _R2,i = cpoint(pubnoncei\[33:66\])_; fail if that fails.

-   Let _Pi = lift\_x(int(pki))_; fail if that fails.

-   Let _aggnonce = NonceAgg(pubnonce0..u-1)_; fail if that fails.

-   Let _(R, b) = GetSessionValues(aggnonce, pk0..u-1, m0..u-1, pubnonce0..u-1)_; fail if that fails.

-   Let _e = 1_ if _has\_even\_y(R)_, otherwise let _e = n - 1_.

-   Let _L = pk0 || m0 || ... || pku-1 || mu-1_.

-   Let _ci = int(hashBIP0459/sig(L || xbytes(R) || pki || mi)) mod n_.

-   Let _R'i = R1,i + b⋅R2,i_.

-   Fail if _s⋅G ≠ e⋅R'i + ci⋅Pi_.

-   Return success iff no failure occurred before reaching this point.

#### Verify

_Verify_ verifies a given 64-byte aggregate signature against an ordered list of public key and message pairs. The inputs to _Verify_ are the only data required by a verifier. No nonces or other session data are needed.

Input:

-   _pk0..u-1_: an array of _u_ 32-byte public keys

-   _m0..u-1_: an array of _u_ 32-byte messages

-   _sig_: a 64-byte aggregate signature

**_Verify(pk0..u-1, m0..u-1, sig)_**[7]:

-   Let _r = sig\[0:32\]_.

-   Let _s = int(sig\[32:64\])_; fail if _s ≥ n_.

-   Let _R = lift\_x(int(r))_; fail if that fails.

-   For _i = 0 .. u-1_:
    -   Let _Pi = lift\_x(int(pki))_; fail if that fails.
-   Let _L = pk0 || m0 || ... || pku-1 || mu-1_.

-   For _i = 0 .. u-1_:
    -   Let _ci = int(hashBIP0459/sig(L || r || pki || mi)) mod n_.
-   Fail if _s⋅G ≠ R + c0⋅P0 + c1⋅P1 + ... + cu-1⋅Pu-1_.

-   Return success iff no failure occurred before reaching this point.

### Key Tweaking

The scheme supports additive key tweaking, allowing signers to use tweaked key pairs without changes to the verification algorithm. A tweak _t_ is a 256-bit integer with _0 ≤ t < 2256_. In both variants below, tweaking fails if _t ≥ n_ or if _is\_infinite(P')_. The tweaked public key _xbytes(P')_ appears in the public key list provided to _Verify_, and the signer uses _sk'_ as its secret key in _Sign_.

**Plain tweaking** modifies a key pair _(sk, P)_ with _P = sk⋅G_ and is used for BIP 32 unhardened derivation, where _t_ is the child offset:

-   _sk' = (sk + t) mod n_

-   _P' = P + t⋅G_

**X-only tweaking** is used for BIP 341 Taproot key path spending. Because an X-only public key denotes the point with even Y, the input key is first normalized to even Y. Let _d = sk_ if _has\_even\_y(P)_, otherwise _d = n - sk_, so that _d⋅G = lift\_x(x(P))_. Then:

-   _sk' = (d + t) mod n_

-   _P' = lift\_x(x(P)) + t⋅G_

For BIP 341, _t = int(hashTapTweak(xbytes(P) || merkle\_root))_ where _xbytes(P)_ is the X-only internal public key. The resulting _P'_ may have odd Y.

## Rationale

DahLIAS is the first aggregate signature scheme with constant-size signatures based directly on discrete logarithms in pairing-free groups.

-   A fully aggregated signature has the same shape as a standard Schnorr signature: a pair _(R, s)_ serialized as 64 bytes. The verification algorithm is different from BIP 340 verification and takes a _list_ of public key and message pairs as input rather than a single pair.

-   Every message is exactly 32 bytes. This is the size of a transaction sighash, the intended input for cross-input signature aggregation. Fixing the length also keeps the encoding of the list _L_ unambiguous, since the challenge binds to the entire list rather than to a single message as in BIP 340 and BIP 327. An application that needs to sign data of a different size should pre-hash it to a 32-byte digest, for example with a tagged hash.

-   Since the challenge binds to the entire list, _L || xbytes(R)_ is a common prefix of every challenge hash input. Verifiers should hash this prefix into a single hash state once and finalize a copy of that state with _pki || mi_ for each _i_, which keeps the hashing linear in the number of signers instead of quadratic.

-   Each signer contributes two nonces rather than one. A single nonce per signer would leave the scheme open to the [ROS attack](https://eprint.iacr.org/2020/945) mounted across many concurrent signing sessions. Deriving the common nonce as _R = R1 + b⋅R2_, with _b_ bound to the full session context, prevents this, following MuSig2 ([BIP 327](https://bipexplorer.com/bip/327)). A variant of the attack that exploits a signer signing multiple messages is in turn prevented by the _R2_ uniqueness and message checks in _Sign_ (see [Security](#security)).

-   A single nonce coefficient _b_ is applied uniformly to all signers' second nonce contributions. This keeps signing cost constant per signer (three group exponentiations) rather than requiring a multi-exponentiation of size _u_. The trade-off is the need for a uniqueness check on the second nonce component _R2_ during signing.

-   The scheme supports additive key tweaking, enabling compatibility with BIP 32 key derivation and BIP 341 Taproot outputs.

-   This document does not specify an optimized signing algorithm for a single party that knows all secret keys, e.g., a wallet spending several of its own inputs. Such a party can act as all signers and the coordinator and run the protocol locally. A more efficient method [has been outlined](https://groups.google.com/g/bitcoindev/c/eothFkxAvK0/m/PgRaFPovEQAJ) in the mailing list discussion but requires additional security analysis before it can be specified.

A non-interactive alternative is half-aggregation ([BIP 458](https://bipexplorer.com/bip/458)), which requires no cooperation between the signers but compresses _n_ signatures to _32\*n + 32_ bytes rather than to a constant 64 bytes.

## Security

**Nonce generation and reuse.** As detailed in [Nonce Generation](#nonce-generation) and [General Signing Flow](#general-signing-flow), _NonceGen_ must draw _rand'_ from a high-quality random number generator, nonces must not be derived deterministically, and a _secnonce_ must never be used in more than one _Sign_ invocation. Violating any of these can allow an adversary to extract the signer's secret key.

**Signer verification checks.** The checks performed by _Sign_ after recomputing _R2_ are security-critical. The signer locates its position by finding the unique index _j_ whose _R2_ matches its own. These _R2_ values act as ephemeral identifiers that distinguish signers even when they share a public key, and omitting the uniqueness check enables key extraction. The signer must also confirm that _both_ the public key and the message at index _j_ match its own. Verifying only the public key would let a malicious coordinator substitute a different message at the signer's position. These checks cover only the signer's own entry, so any requirement on the other entries of the list must be verified by the caller before invoking _Sign_ (see [Sign](#sign)).

**Partial signatures.** A partial signature is _not_ a signature. By choosing its nonces accordingly, an adversary can produce a partial signature that verifies for any public key. _PartialSigVerify_ therefore serves only to identify disruptive signers and does not prove that a signer knows the corresponding secret key.

**Untrusted coordinator.** The coordinator can cause a signing session to abort but cannot forge a signature, even when colluding with all but one signer (see [Role of the Coordinator](#role-of-the-coordinator)).

**Security model.** The scheme is proven secure in the concurrent setting, including when signers use key tweaking, under the algebraic one-more discrete logarithm (AOMDL) assumption, the same assumption used for [BIP 327](https://bipexplorer.com/bip/327).[8] AOMDL is a falsifiable and weaker variant of the well-studied OMDL problem. The proof models _hashBIP0459/sig_ as a random oracle and requires only that _hashBIP0459/noncecoef_ be collision-resistant. The scheme is also strongly binding, meaning it is infeasible to produce a single signature valid for two distinct lists of public key and message pairs.[9]

## Backward Compatibility

Full-aggregation specifies a new, optional interactive signing protocol for producing an aggregate signature for a list of BIP 340 public key and message pairs. It does not change the validation of individual BIP 340 signatures and does not affect any existing Bitcoin consensus rules or protocol behavior. Therefore, this BIP introduces no backward compatibility concerns.

## Test Vectors and Reference Code

A reference implementation in Python is provided in [reference.py](https://github.com/bitcoin/bips/blob/master/bip-0459/reference.py). Note that the reference implementation depends on a vendored copy of the [secp256k1lab library](https://github.com/secp256k1lab/secp256k1lab).

Test vectors are provided in [vectors](https://github.com/bitcoin/bips/blob/master/bip-0459/vectors/) and are generated with a [generator script](https://github.com/bitcoin/bips/blob/master/bip-0459/gen_test_vectors.py). The reference implementation can be executed with the test vectors by running [the run\_test\_vectors script](https://github.com/bitcoin/bips/blob/master/bip-0459/run_test_vectors.py).

## Acknowledgements

The scheme specified in this document is DahLIAS (Discrete Logarithm-Based Interactive Aggregate Signatures) by Jonas Nick, Tim Ruffing, and Yannick Seurin. Thanks to waxwing for his feedback on the mailing list, which, among other things, led to clarifying the uniqueness check in _Sign_ and adding test vectors for it. Thanks to w0xlt for reviewing and contributing additional test vectors.

## Footnotes

1.  Jonas Nick, Tim Ruffing, Yannick Seurin: _DahLIAS: Discrete Logarithm-Based Interactive Aggregate Signatures_. Cryptology ePrint Archive, Report 2025/692. [https://eprint.iacr.org/2025/692](https://eprint.iacr.org/2025/692) 
2.  We treat the _secnonce_ and _pubnonce_ as grammatically singular even though they include serializations of two scalars and two elliptic curve points, respectively. 
3.  An attacker who participates as a co-signer can run multiple signing sessions with the victim for the same message while varying its own nonce contributions. With deterministic derivation the victim reuses its secret nonces across these sessions while the aggregate nonce and therefore the nonce coefficient _b_ and the challenge change. Three such sessions yield a system of linear equations that reveals the victim's secret key. Deriving the nonces from additional session data does not prevent this since the other signers' nonces are unknown to the victim when its nonces are generated. This threat is not limited to sessions with malicious co-signers. With deterministic derivation, the nonce is reused whenever the same key and message are signed again in a session whose other public keys, messages, or nonces have changed. Any party who observes the resulting partial signatures, such as a coordinator, can then extract the secret key after three such sessions. Re-signing the same message in a changed session can arise naturally, for example when a transaction signed with _SIGHASH\_ANYONECANPAY_ is modified for a fee bump and signed again. 
4.  Among other pitfalls, using the specification with a curve whose order is not close to the size of the range of the nonce derivation function is insecure. 
5.  See [Nonce Generation](#nonce-generation) in the Overview for important security requirements regarding randomness and nonce reuse. 
6.  The uniqueness check applies to the _R2_ value alone. Checking instead that the combination of public key, message, and _R2_ occurs exactly once is not sufficient. If the signer's _R2_ appears at a second index with a different public key or message, _Sign_ must fail, because signing such a session enables a key extraction attack (see Section 4.2 of the [DahLIAS paper](https://eprint.iacr.org/2025/692)). 
7.  An [efficient algorithm for computing a sum of multiple EC multiplications](https://bitcoin.stackexchange.com/a/80702/109853) can significantly speed up verification. 
8.  The precise notion is cosigners-aware existential unforgeability (co-EUF-CMA) as defined in the DahLIAS paper. Each signer sees the entire list of public key and message pairs before finalizing its contribution, and unforgeability guarantees that no valid aggregate signature can attribute to an honest signer a message and cosigner list it never agreed to sign. This all-or-nothing guarantee over the whole list distinguishes interactive aggregate signatures from multisignatures like MuSig2, which produce a signature for a single message under a single aggregate key. 
9.  DahLIAS strong binding additionally requires the verifier to reject any public key equal to the point at infinity. This condition is satisfied implicitly in this specification: public keys are 32-byte X-only values that are decoded with _lift\_x_, which never yields the point at infinity, so no such public key can appear in the list.
