Skip to content

Signatures in oracle messages updated to Schnorr type (ECDSA signatures specified currently)#218

Open
raulcano wants to merge 1 commit intodiscreetlogcontracts:masterfrom
raulcano:oracle-signature-type
Open

Signatures in oracle messages updated to Schnorr type (ECDSA signatures specified currently)#218
raulcano wants to merge 1 commit intodiscreetlogcontracts:masterfrom
raulcano:oracle-signature-type

Conversation

@raulcano
Copy link
Copy Markdown

@raulcano raulcano commented Mar 24, 2026

The signatures included in oracle_announcement and oracle_attestation should be specified as Schnorr. However, the way it is described now, it uses the field type signature, which is defined as an ECDSA signature.
This PR creates a new convenience type schnorr_signature and uses it in the descriptions of the oracle_announcement and oracle_attestation.

Current definition of the signature convenience type:

* `signature`: a 64-byte bitcoin Elliptic Curve signature

According to the current spec, the signature within the announcement is a Schnorr signature, but the ECDSA signature field is used. See here an explicit contradition:

dlcspecs/Messaging.md

Lines 418 to 427 in 9cd9148

#### `oracle_announcement`
1. type: 55332
1. data:
* [`signature`:`annoucement_signature`]
* [`x_point`:`oracle_public_key`]
* [`oracle_event`:`oracle_event`]
where `signature` is a Schnorr signature over a sha256 hash of the serialized `oracle_event`, using the tag `announcement/v0`.

The oracle attestation also needs of Schnorr signatures, but is pointing to the signature type.

dlcspecs/Messaging.md

Lines 436 to 452 in 9cd9148

#### `oracle_attestation`
1. type: 55400
1. data:
* [`string`:`event_id`]
* [`x_point`:`oracle_public_key`]
* [`u16`: `nb_signatures`]
* [`signature`:`signature_1`]
* ...
* [`signature`:`signature_n`]
* [`string`:`outcome_1`]
* ...
* [`string`:`outcome_n`]
Where the signatures are ordered the same as the nonces in their original `oracle_event`.
The outcomes should be the message signed, ordered the same as the signatures.

For reference, this implementation of the oracle announcement and attestation uses Schnorr signatures:
https://docs.rs/dlc-messages/latest/dlc_messages/oracle_msgs/struct.OracleAnnouncement.html
https://docs.rs/dlc-messages/latest/dlc_messages/oracle_msgs/struct.OracleAttestation.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant