Skip to content

Instantly share code, notes, and snippets.

View Davidson-Souza's full-sized avatar

Davidson Souza Davidson-Souza

View GitHub Profile
@nickfarrow
nickfarrow / malleablefrost.md
Last active May 13, 2024 05:03
Modifying FROST Threshold and Signers

Modifying FROST Signers and Threshold

FROST's distributed key generation involves N parties each creating a secret polynomial, and sharing evaluations of this polynomial with other parties to create a distributed FROST key.

The final FROST key is described by a joint polynomial, where the x=0 intercept is the jointly shared secret s=f(0). Each participant controls a single point on this polynomial at their participant index.

The degree T-1 of the polynomials determines the threshold T of the multisignature - as this sets the number of points required to interpolate the joint polynomial and compute evaluations under the joint secret.

T parties can interact in order to interpolate evaluations using the secret f[0] without ever actually reconstructing this secret in isolation (unlike Shamir Secret Sharing where you have to reconstruct the secret).


@RobinLinus
RobinLinus / modified-secret-sharing.py
Last active August 9, 2023 17:07
A variation of Shamir's t-of-n Secret Sharing scheme, which allows to use any given values as secret shares
#
# A variation of Shamir's t-of-n Secret Sharing scheme,
# which allows to use any `n` values as secret shares
# at the expense of having to store `(n-t)` many public shares.
# This overcomes a drawback of the orginal scheme,
# which requires to use the secret shares resulting from the scheme.
#
# For example, for a 3-of-5 this requires to store 2 public points.
#
@RobinLinus
RobinLinus / covenants_cat_ecdsa.md
Last active July 25, 2024 08:20
Emulate covenants using only OP_CAT and ECDSA signatures

Covenants with CAT and ECDSA

In his article, CAT and Schnorr Tricks I, Andrew Poelstra showed how to emulate OP_CHECKSIGFROMSTACK-like covenants using only OP_CATand Schnorr signatures.

Here, we show that a similar trick is possible to emulate covenants using only OP_CAT and ECDSA signatures.

The High-Level Idea

Recall the ECDSA Signature Equation