question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement verification by a threshold of keys

See original GitHub issue

Description of issue or feature request: A verification of signed metadata by a threshold of keys is needed both for client and repository.

Metadata already has vanilla one-signature verify and could potentially be the right location for this implementation. See https://github.com/theupdateframework/tuf/pull/1060#issuecomment-660056376 for thoughts about that distinction.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
joshuaglcommented, Apr 22, 2021

(Apologies for the brevity of this drive-by comment)

I think delegator verifies the delegated is the right approach (I do not like delegated verifies itself with info from delegator, options 2 & 3 in the original breakdown).

verify_delegate_with_threshold() in https://github.com/theupdateframework/tuf/compare/develop...jku:verify_with_threshold looks like a good starting point (at first glance it’s missing at least an optional Signer parameter).

1reaction
jkucommented, Apr 22, 2021

So the problem space is this:

  • Root contains keys and thresholds for top level metadata
  • delegating (targets) roles contain keys and thresholds for their delegated roles
  • The “metadata controller” (client code or some repository tool) wants to verify all metadata using the correct keys and thresholds from the delegating role in a way that makes it clear what is happening
  • “key uniqueness” wrt threshold needs to be upheld

Some options I see are (examples for a hypothetical client that wants to verify a timestamp file it has just downloaded):

  • Root and Targets provide a function that verifies their delegates (note that this one turns the verifier/verifiee around – root verifies timestamp instead of timestamp verifying itself with data from root):
    root.signed.verify_delegate_with_threshold("timestamp", unverified_metadata)
    
  • Metadata provides a way to verify itself and the delegating roles provide an easy way to get actual securesystemlib keys for a specific role
    keys = root.signed.get_keys("timestamp") # returns list of sslib key dict
    threshold = root.signed.get_threshold("timestamp")
    unverified_metadata.verify_with_threshold(keys, threshold)
    
  • Metadata provides a way to verify itself and knows how to transform keyids to sslib keys
    keyids = root.signed.roles["timestamp"]["keyids"]
    threshold = root.signed.roles["timestamp"]["threshold"]
    unverified_metadata.verify_with_threshold(keyids, threshold)
    

(editing to add a fourth option)

  • Metadata verifies that delegate is signed by correct threshold of keys:
    md.verify_delegate_with_threshold("timestamp", unverified_metadata)
    

This looks nice but does mean the function will have to check that self.signed is a Root or Targets…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building A New Digital World: Threshold Signing and Key ...
This uses the Schnorr signature method, and where we can easily aggregate public keys together. The verification key will then be used to...
Read more >
Improper uniqueness verification of signature threshold - GitHub
It allows someone with access to a valid signing key to create multiple valid signatures in order to circumvent TUF requiring a minimum ......
Read more >
Verification of Threshold-Based Distributed Algorithms by ...
In this paper we develop a methodology for deductive verification of threshold-based distributed protocols using decidable logic, well- ...
Read more >
Threshold Signatures Explained - Binance Academy
Threshold Signature Scheme (TSS) is a cryptographic primitive for distributed key generation and signing. The use of TSS in blockchain ...
Read more >
Centralized Threshold Key Generation Protocol Based on ...
This paper proposes an efficient centralized threshold shared secret protocol based on the Shamir secret sharing technique and supporting key ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found