Iraklis
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
      • No invitee
    • Publish Note

      Publish Note

      Everyone on the web can find and read all notes of this public team.
      Once published, notes can be searched and viewed by anyone online.
      See published notes
      Please check the box to agree to the Community Guidelines.
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
No invitee
Publish Note

Publish Note

Everyone on the web can find and read all notes of this public team.
Once published, notes can be searched and viewed by anyone online.
See published notes
Please check the box to agree to the Community Guidelines.
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Threshold Cryptography ## Signatures Provide authenticity and non repudiation assuming a secure public key infrastructure: Party A signs a message m with a signature Sig using its secret key $\mathsf{sk_A}$. Party B verifies correctness of the signature using public key of party A $\mathsf{pk_A}$ and gets assurances that the message trully came from party A, nobody tamper it and party A cannot deny that it signed message m using its secret key $\mathsf{sk_A}$ [Toc] ### Custodial signatures Signatures are used in our everyday digital life to sign transactions, payments, contracts, documents, reports, etc. With the wide adoption of cryptocurrencies, the validity of a transactions lies on the signature of the issuer who holds its secret key to a wallet. Bitcoin,Ethereum use ECDSA digital signature algorithm. ## Crypto machinery ### Modular Arithmetics ### Shamir secret sharing A dealer wants to secret share a secret $s \in \mathbb{Z}_q$,for a prime $q$ such that $t$ shares $\{y_i\}_{i=0}^{t-1}$ out of total $n$ suffice to reconstruct the secret $s$. It chooses a polynomial $a=a_0+a_1x+a_2x^2+a_{t-1}x^{t-1}$ of degree $t-1$, sets $a_0=s$ and gives to each party $P_i$ the share $a(i) = y_i$, $i\in 1...n$. To reconstruct Lagrange interpolation is used. We are looking for ways to identify a unique polynomial $p_{t-1}(x)$, which satisfies $p(i)=y_i$ of degree $t-1$, from $t$ pairs $(x_i,y_i), i\in 1...t$. That can be seen as solving the equation: $$\mathbf{A}x=b$$, for a matrix $\mathbf{A}$ and vectors $x,b$ where $b_i=y_i, i\in 1...t$ and $A_{i,j} = p_j(x_i)$, where $p_j(x) = x^j$. Define the interpolation polynomial: $$p_{t-1}(x) = \sum_{j=0}^{t}y_j\mathcal{L_{t-1,j}(x)}$$ where the Lagrange polynomials $\mathcal{L_{t-1,j}}(x)$ are defined as follows: $$\mathcal{L_{t-1,j}}(x) = \prod_{k=0,k\ne j}^{t}\frac{x-x_k}{x_j-x_k}$$ Finally the polynomial $f(x)$ we are looking: $f(x)= p_{t-1}(x)$ #### Example Find the 2 degree polynomial from the following pairs | i | x | y | | -------- | -------- | -------- | | 0 | 2 | 3 | | 1 | 1 | 4 | | 2 | -5 | 8 | First construct the Lagrange polynomials $\mathcal{L_{2,0}}(2)=\frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)}=\frac{(x-1)(x+5)}{(2-1)(2+5)}=\frac{x^2+5x-x-5}{7} =\frac{1}{7}(x^2+4x-5)$ $\mathcal{L_{2,1}}(1)= \frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)}=\frac{(x-2)(x+5)}{(1-2)(1+5)}=\frac{x^2+5x-2x-10}{-6}=\frac{-1}{6}(x^2+3x-10)$ $\mathcal{L_{2,2}}(-5) = \frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}=\frac{(x-2)(x-1)}{(-5-2)(-5-1)}=\frac{x^2-x-2x+2}{42}=\frac{1}{42}(x^2-3x+2)$ Compute the interpolating polynomial: $p_{2}(x) = \sum_{j=0}^{2}y_j\mathcal{L}_{2,j}=y_0\mathcal{L}_{2,0}+y_1\mathcal{L}_{2,1}+y_2\mathcal{L}_{2,2}\\=3\frac{1}{7}(x^2+4x-5)+4\frac{-1}{6}(x^2+3x-10)+8\frac{1}{42}(x^2-3x+2)\\=\frac{3}{7}(x^2+4x-5)-\frac{2}{3}(x^2+3x-10)+\frac{4}{21}(x^2-3x+2)\\=\frac{1}{3}x^2-\frac{18}{21}x+\frac{103}{21} = f(x)$ That does not seem correct :) I am missing sth. ### Distributed Key Generation Goal: A coalition of $n$ parties being able to generate a key such that without collaboration ($t$ out of $n$, $t\le n$ ) noone knows the final secret key. #### Pedersen VSS with no trusted dealer (based on Feldman VSS) Verifiable secret sharing allows the receivers of the shares to verify whether they are consistent to all the participants and to the secret key the party has chosen. e.g: What if a party shares his correct public key with party $j$ but a wrong one with all other parties? * **JoinPublicKey**: Each party $P_i$ chooses secret $x_i$ from $\mathbb{Z}_q$ and broadcasts to all $h_i=g^{x_i}$. The public key for everyone is $\prod_{i=0}^{n-1}{h_i} =g^{ \sum_{i=0}^{n-1}{x_i}}$. * **VerifyShare**: Each party $P_i$ chooses chooses a polynomial of degree $k-1$: $$f_i = x_i+f_{i1}x+f_{i2}x^2+\cdots+f_{i1}x^3+f_{i,k-1}x^{k-1}$$ * * $P_i$ computes $F_{i,j}=g^{f_{ij}}, j\in[0,k-1]$ and distributes each $F_{i,j}$ to everyone. * * $P_i$ computes $s_{ij} = f_i(j),\forall j \ne i, j\in[0,n-1]$ and sends it to party $P_j$. * * $P_i$ verifies correctness for $P_j$ if : $$ g^{s_{ji}} == \prod_{l=0}^{n-1}{F_{j,l}^{i^l}}$$ If the equation does not hold then $P_i$ claims that publicly and publishes $s_{ji}$. * * The secret key x for party $P_j$ equals $\sum_{i=0}^{n-1}{s_{ij}}$ #### Scrape (https://cryptorating.eu/whitepapers/Cardano/216.pdf) #### Aggr-DKG (https://eprint.iacr.org/2021/005.pdf) ### Partial Homomorphic Encryption #### Paillier #### Elgamal ## ECDSA * Setup(): Output an elliptic curv group $\mathbb{G}$ of order $q$ and an element G which generates $\mathbb{G}$. * KeyGen($1^{\lambda}$): Choose uniformly at random $x\gets \mathbb{Z}_q$. Set $\mathsf{sk} = x$ and publish the public key $\mathsf{pk} = G \cdot x$ * Sign(m,$\mathsf{sk} = x$)-> $\sigma$: * Pick uniform at random $k\gets \mathbb{Z}_q^*$ * Compute $R = k \cdot G$ * Let $R=(r_x,r_y)$ * Set $r = r_x \mod q$ * s = $k^{-1}(H(m) + x\cdot r)\mod q$ * Output $\sigma = (r,s)$, if $r=0$ or $s=0$ repeat the above steps. * Verify($\sigma,\mathsf{pk}$): * Compute $a=H(m)/s \mod \mathbb{Z}_q$ and $b=r/s \mod \mathbb{Z}_q$ * $u = G \cdot a + G \cdot b \in \mathbb{G}$ * Let $u=(u_x,u_y)$ * $r' = u_x\mod \mathbb{Z}_q$ * if $r==r'$ accept, otherwise reject ### Threshold ECDSA To avoid single point of failure: stealing/loosing the secret signing key which authorizes transfers of assets - threshold signatures are adopted by FinTech industry to distribute trust among multiple signers holding a share of the secret key but never the secret key at each entire form. Threshold ECDSA aglorithms in general are executed in two phases between $n$ parties: 1. ThresholdKeyGen: Each party $P_j$ computes its share of random secret share $x_i^j$ 2. ThresholdSign: Each party computes its share of the signature $\sigma_i^j$ [TODO]:Add appropriate security definitions. Basically unforgeability: malicious parties cannot produce signatures for messages they haven't seen their signatures. Depends on number of corrupted parties: honest/dishonest majority and malicious/passive adversaries ### Multiplicative shares + Paillier [MR04,GGN16,L17]: 2 parties setting **ThresholdKeyGen**: - $P_1$ and $P_2$ hold $x_1$ and $x_2$ such that $x=x_1\cdot x_2$ - $P_1,P_2$ compute $a=x_1\cdot G,b=x_2\cdot G$, respectively and send each other $a,b$ - $P_1,P_2$ compute $\mathsf{pk}=x_1 \cdot x_2\cdot G$ **ThresholdSign:** - $P_1$ chooses $k_1$ uniformly at random and $P_2$ choses $k_2$ uniformly at random - They both compute $R = k_1\cdot k_2 \cdot G$ (DH) - $P_1$ computes $k_1^{-1}$ and $P_2$ computes $k_2^{-1}$ - Each compute $r_x = R \mod q$ - P1 computes Pailier public key $pk1$ and secret key $sk1$ - $P_1$ sends to $P_2$: $c_1=E_{pk1}(k_1^{-1}\cdot H(m))$ and $c_2=E_{pk1}(k_1^{-1}\cdot x_1\cdot r)$ - $P_2$ computes $\sigma_1 = c_2^{k_2^{-1}} = E_{pk1}(k_1^{-1}\cdot k_2^{-1}\cdot H(m))$ and $\sigma_2 = c_1^{k_2^{-1}\cdot x_2} = E_{pk1}(k_1^{-1}\cdot k_2^{-1}x_1\cdot x_2 \cdot r)$ - Finally $\sigma(m) = Dec_{sk1}(\sigma_1\cdot \sigma_2)\\ = Dec_{sk1}((E_{pk1}(k_1^{-1}\cdot k_2^{-1}\cdot H(m))\cdot E_{pk1}(k_1^{-1}\cdot k_2^{-1}x_1\cdot x_2 \cdot r))\\=Dec_{sk1}(E_{pk1}(k^{-1}(H(m) + x\cdot r)\mod q))= k^{-1}(H(m) + x\cdot r)\mod q$ [MR04]: That works well for honest but curious adversaries. For malicious adversaries expensive ZKP are needed. [L17] approach removes ZKP with some more preparation: - ThresholdKeyGen is as above but $P_1$ also sends to $P_2$, $x_1$ encrypted which $P_1$ pailllier public key $pk1: E_{pk1}(x_1)$ - The first $4$ steps from ThresholdSign are executed as above, coupled with ZKP for DH exchanges: sender proves that it knows the secret exponent (fast and simple). - Interestengly $P_2$ has almost an encrypted signature and it computes: $\sigma'=E_{pk1}(k_2^{-1}\cdot H(m))\cdot E_{pk1}(k_2^{-1}x_1\cdot x_2 \cdot r)$. and sends $\sigma'$ to $P_1$. - $P_1$ decrypts $\sigma'$ and computes $\sigma=\sigma'\cdot k_1^{-1}$ - $P_1$ verifies whether r,s is a valid ECDSA signature Notice that if $P_1$ is malicious then its only input to the protocol is $k_1,x_1$ for the DH exchange and can be proven secure with ZKP. Another proof is needed to guarantee $P_1$ actually faithfully encrypted $E_{pk1}(x_1)$: Given $X_1=x_1\cdot G$ and $E_{pk1}(x_1)$ prove that there exists such $x_1$. If $P_2$ wants to cheat by sending an invalid message $\sigma'$ then $P_1$ can recompute the signature and check whether $P_2$ is cheating because $\sigma'$ is almost one step before being a valid signature: $\sigma'=\sigma\cdot k_1^{-1}$. As such, there is no need for expensive ZKP. ### Fully Threshold - [GGN16] Expensive key generation phase: distributed Paillier key generation. - [GG18] Paillier - [LNR18] Elgamal - [DKLS19] OT based for multiplicative shareS: light computation, heavy bandwidth ## Comparison factors ### Assumptions The more well established hard problem assumptions a protocol is based its security, the better. ### Complexity Rounds of the MPC protocol are mostly governing the complexity for threshold signatures schemes - thus network latency is crucial. ### Adversarial behavior 1. **Honest majority**: The majority of the players has the expected behavior in terms of funtionality and obey in the protocol rules: Out of $n$ players at least $(n-1)/2$ are honest. 2. **Dishonest majority**: The majority of the players behave arbitrarily. 3. **Static**: The adversary has chosen before the beginning of the protocl which parties will corrupt. 4. **Adaptive**: The adversary can wait before the protocol starts to select the corrupted parties. 5. **Identifiable abort**: The honest parties can faithfully identify the cheating parties. Honest majority allows for simpler protocols and subsequently more efficient but in real world that might be a strong assumption. ## EdDSA ### Threshold EdDSA ## BLS Bohen-Lynn-Shacham (BLS) is a determnistic signature scheme that uses bilinear pairings. It enjoys many interesting properties, such as: unique signatures that are unpredictable, signatures can be used as verifiable pseudo-random values, signatures can be aggregated in a compact fashion. Importantly is amenable to distributed computation. ### Threshold BLS ## References - [FROST] Chelsea Komlo, Ian Goldberg: FROST: Flexible Round-Optimized Schnorr Threshold Signatures. SAC 20 - [MR04] Philip D. MacKenzie, Michael K. Reiter: Two-party generation of DSA signatures. Int. J. Inf. Sec - [GGN16] Rosario Gennaro, Steven Goldfeder, Arvind Narayanan:Threshold-Optimal DSA/ECDSA Signatures and an Application to Bitcoin Wallet Security. ACNS 2016: 156-174 - [L17] Y Lindell:Fast secure two-party ECDSA signing Annual International Cryptology Conference, 2017 - [LNR18] Yehuda Lindell Ariel Nof Samuel Ranellucci: Fast Secure Multiparty ECDSA with Practical Distributed Key Generation and Applications to Cryptocurrency Custody - [GG18] Rosario Gennaro and Steven Goldfeder: Fast Multiparty Threshold ECDSA with Fast Trustless Setup - [Sepior] Ivan Damgard, Thomas Pelle Jakobsen,, Jesper Buus Nielsen, Jakob Illeborg, Pagter, and Michael Bæksvang Østergaard: Fast Threshold ECDSA with Honest Majority - [GG20] Rosario Gennaro, Steven Goldfeder: One Round Threshold ECDSA with Identifiable Abort - [Fireblocks] Ran Canetti, Rosario Gennaro, Steven Goldfeder, Nikolaos Makriyannis, Udi Peled: UC Non-Interactive, Proactive, Threshold ECDSA with Identifiable Aborts - [DKLS18] Jack Doerner, Yashvanth Kondi, Eysa Lee, Abhi Shelat: Secure two-party threshold ECDSA from ECDSA assumptions - [DKLS19] Jack Doerner, Yashvanth Kondi, Eysa Lee, Abhi Shelat: Threshold ECDSA from ECDSA Assumptions: The Multiparty - [P21] Michaella Pettit: Efficient Threshold-Optimal ECDSA https://eprint.iacr.org/2021/1386.pdf

Import from clipboard

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template is not available.
Upgrade
All
  • All
  • Team
No template found.

Create custom template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

How to use Slide mode

API Docs

Edit in VSCode

Install browser extension

Get in Touch

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Upgrade to Prime Plan

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

No updates to save
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Upgrade

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully