{"id":17011848,"url":"https://github.com/25a0/authentication-sets","last_synced_at":"2025-03-22T13:23:53.513Z","repository":{"id":78424003,"uuid":"232566155","full_name":"25A0/authentication-sets","owner":"25A0","description":"Code and statistics related to authentication sets.","archived":false,"fork":false,"pushed_at":"2020-01-14T13:39:04.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T12:49:35.519Z","etag":null,"topics":["cryptography","merkle-hash-trees"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/25A0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-08T13:11:05.000Z","updated_at":"2020-01-16T12:49:28.000Z","dependencies_parsed_at":"2023-03-13T20:13:51.753Z","dependency_job_id":null,"html_url":"https://github.com/25A0/authentication-sets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/25A0%2Fauthentication-sets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/25A0%2Fauthentication-sets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/25A0%2Fauthentication-sets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/25A0%2Fauthentication-sets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/25A0","download_url":"https://codeload.github.com/25A0/authentication-sets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244960791,"owners_count":20538885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","merkle-hash-trees"],"created_at":"2024-10-14T06:08:23.590Z","updated_at":"2025-03-22T13:23:53.505Z","avatar_url":"https://github.com/25A0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Authentication sets\n\nCode and statistics related to authentication sets can be found here.\n\n - [authset.py](./authset.py) contains a Python implementation of\n   authentication sets, as well as code to run tests to compare authentication\n   sets to the original optimization used in SPHINCS.\n   Run `python3 authset.py` to run tests on the performance of authentication sets.\n - [authset.c](./authset.c) contains a C implementation of authentication sets,\n   and some demo code to illustrate how to use it.\n - [plot.py](./plot.py) contains code to produce the plots in this README\n - [measure.py](./measure.py) contains code to export test data as a csv\n\nThis work is part of my master's thesis, which is yet to be published.\nMore information related to authentication sets will be available in there.\n\n## What are authentication sets?\n\nAuthentication sets compress the\nauthentication paths of multiple leaf nodes in a binary\nhash tree.\n\nAlice has a [binary hash tree](https://en.wikipedia.org/wiki/Merkle_tree) of\nheight h. Bob only knows the root of the tree. Now, Alice wants to prove to Bob\nthat a specific leaf node, n, is part of the tree. To do this, she can reveal\nthe\n[authentication path](https://en.wikipedia.org/wiki/Merkle_signature_scheme#/media/File:MerkleTree2.1.svg)\nof the leaf node to Bob. The authentication path of a leaf node n is the\nsmallest set of nodes that, together with n, can be used to restore the root\nnode of the tree.\n\nTo authenticate more than one leaf node, Alice can simply send Bob the\nauthentication paths of all those leaf nodes. However, as soon as more than one\nleaf node needs to be authenticated, there will always be some redundancy\nbetween the authentication paths: Different paths may contain the same node,\nmaking it redundant, or the information in one path may allow the computation\nof a node required in another path. Authentication sets are a way to utilise\nthis redundancy.\n\nAuthentication sets are never bigger, and usually smaller than the combined\nsize of the authentication paths. The following graph shows how their size\ncompares to the combined size of the authentication paths, in a tree of\nheight 16. For example, if 16 leaf nodes are given, authentication sets are on\naverage 30% smaller than the sum of the authentication paths.\n\n![A graph that compares the size of the authentication path to the size of the sum of the authentication sets, for varous numbers of given leaf nodes. The graph shows that authentication sets become increasingly small compared to the sum of authentication sets, the more leaf nodes are given.](num_leaves.png)\n\nIn the best case scenario, authentication sets can be drastically smaller than\nthe sum of the authentication paths. For example, in a binary tree of height\n16, with 32 revealed leaf nodes, authentication sets can be as small as 11\nnodes, while the separate authentication paths have a combined size of 16 * 32\n= 512 nodes. In reality, however, the size of authentication sets is usually\ncloser to the worst-case size. The following graph shows how the size of\nauthentication sets are distributed for 32 given leaf nodes in a tree of height\n16:\n\n![A histogram that shows the distribution of authentication set sizes for various samples of 32 given leaf nodes in a tree of height 16. The histogram shows that the average sample size lies between 320 and 330 nodes, and that barely any samples have a size smaller than 300 nodes.](sphincs_distribution.png)\n\nNonetheless, here the worst-case size of the authentication set, 352 nodes, is\nstill significantly smaller than the combined size of the separate\nauthentication paths (512 nodes), and still smaller than the optimization used\nin SPHINCS, which uses 384 nodes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F25a0%2Fauthentication-sets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F25a0%2Fauthentication-sets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F25a0%2Fauthentication-sets/lists"}