{"id":1808,"date":"2024-02-14T00:00:00","date_gmt":"2024-02-13T23:00:00","guid":{"rendered":"https:\/\/stap-wiki.fr\/index.php\/hash-functions-2\/"},"modified":"2024-02-14T00:00:00","modified_gmt":"2024-02-13T23:00:00","slug":"hash-functions-2","status":"publish","type":"page","link":"https:\/\/stap-wiki.fr\/index.php\/hash-functions-2\/","title":{"rendered":"STAP hash functions"},"content":{"rendered":"<p>[vc_row us_bg_overlay_color=&#8221;#f5f5f5&#8243; us_shape_show_bottom=&#8221;1&#8243; us_shape_color_bottom=&#8221;#ffffff&#8221; css=&#8221;%7B%22default%22%3A%7B%22background-color%22%3A%22_header_middle_text%22%7D%7D&#8221;][vc_column width=&#8221;5\/6&#8243;][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%23023047%22%7D%7D&#8221;]<\/p>\n<h2>STAP hash functions<\/h2>\n<p>[\/vc_column_text][us_separator][\/vc_column][vc_column width=&#8221;1\/6&#8243;][\/vc_column][\/vc_row][vc_row height=&#8221;small&#8221; us_bg_overlay_color=&#8221;#ffffff&#8221;][vc_column][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%23023047%22%2C%22font-family%22%3A%22Source%20Code%20Pro%22%2C%22background-color%22%3A%22%23ffffff%22%7D%7D&#8221;]A hash function H maps an arbitrary-length string to a fixed-length hash value (often called the digest).[\/vc_column_text][\/vc_column][\/vc_row][vc_row height=&#8221;small&#8221; color_scheme=&#8221;alternate&#8221; us_bg_overlay_color=&#8221;#ffffff&#8221; css=&#8221;%7B%22default%22%3A%7B%22background-color%22%3A%22%23ffffff%22%7D%7D&#8221;][vc_column width=&#8221;1\/12&#8243;][\/vc_column][vc_column us_bg_overlay_color=&#8221;#ffffff&#8221; link=&#8221;%7B%22url%22%3A%22%22%7D&#8221; width=&#8221;11\/12&#8243;][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%231a1a1a%22%7D%7D&#8221;]For application purposes, a hash function\u00a0should satisfy the following properties:<\/p>\n<ul>\n<li><strong>Collision resistance<\/strong>: It should be difficult to find a pair of distinct messages x_1 \u2260 x_2 such that H(x_1) = H(x_2).<\/li>\n<li><strong>Pre-image resistance<\/strong>: Given a hash value y, it should be difficult to find any message x such that H(x) = y.<\/li>\n<li><strong>Second pre-image resistance<\/strong>: Given an input x_1, it should be infeasible to find a different input x_2 such that H(x_1) = H(x_2).<\/li>\n<\/ul>\n<p>On top of that, it is desirable that hash functions <strong>behave like random oracles<\/strong> while being <strong>deterministic<\/strong> and <strong>efficiently computable<\/strong>.[\/vc_column_text][\/vc_column][\/vc_row][vc_row height=&#8221;small&#8221; color_scheme=&#8221;alternate&#8221; us_bg_overlay_color=&#8221;#ffffff&#8221; css=&#8221;%7B%22default%22%3A%7B%22background-color%22%3A%22%23ffffff%22%7D%7D&#8221;][vc_column us_bg_overlay_color=&#8221;#ffffff&#8221; link=&#8221;%7B%22url%22%3A%22%22%7D&#8221;][vc_custom_heading text=&#8221;Constructions&#8221; font_container=&#8221;tag:h2|font_size:42|text_align:left|color:%23219ebc&#8221; google_fonts=&#8221;font_family:ABeeZee%3Aregular%2Citalic|font_style:400%20regular%3A400%3Anormal&#8221;][us_separator size=&#8221;small&#8221;][vc_row_inner][vc_column_inner width=&#8221;1\/2&#8243;][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%23023047%22%2C%22font-size%22%3A%2230px%22%7D%7D&#8221;]<\/p>\n<p style=\"text-align: center;\"><strong>Merkle-Damg\u00e5rd<\/strong><\/p>\n<p>[\/vc_column_text][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%231a1a1a%22%7D%7D&#8221;]The Merkle-Damg\u00e5rd construction relies on a compression function iterated as many times as there are message blocks.[\/vc_column_text][us_image image=&#8221;1356&#8243; align=&#8221;center&#8221; size=&#8221;us_600_600&#8243; link=&#8221;%7B%22url%22%3A%22%22%7D&#8221;][us_separator size=&#8221;small&#8221;][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%231a1a1a%22%7D%7D&#8221;]The advantage of such a construction is that studying the security of the entire hash function is reduced to studying the security of the compression function.[\/vc_column_text][\/vc_column_inner][vc_column_inner width=&#8221;1\/2&#8243;][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%23023047%22%2C%22font-size%22%3A%2230px%22%7D%7D&#8221;]<\/p>\n<p style=\"text-align: center;\"><strong>Sponge<\/strong><\/p>\n<p>[\/vc_column_text][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%231a1a1a%22%7D%7D&#8221;]The sponge construction is parameterized by two integers: the rate r and the capacity c so that r + c is equal to the width of the permutation.<\/p>\n<p>A sponge is decomposed into two phases: absorption and squeezing. During absorption, the first r bits of the state are XOR-ed to a block of the padded message so that each time a block of message is added, the permutation is applied to the full state. Then, squeezing consists of extracting blocks of messages by applying the permutation each time a block of message is produced.[\/vc_column_text][us_image image=&#8221;1357&#8243; align=&#8221;center&#8221; link=&#8221;%7B%22url%22%3A%22%22%7D&#8221;][us_separator size=&#8221;small&#8221;][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%231a1a1a%22%7D%7D&#8221;]For a well-chosen permutation, the capacity must give the security level of the hash function.[\/vc_column_text][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row][vc_row height=&#8221;small&#8221; color_scheme=&#8221;alternate&#8221; us_bg_overlay_color=&#8221;#f5f5f5&#8243; css=&#8221;%7B%22default%22%3A%7B%22background-color%22%3A%22_header_middle_bg%22%7D%7D&#8221;][vc_column link=&#8221;%7B%22url%22%3A%22%22%7D&#8221; css=&#8221;%7B%22default%22%3A%7B%22background-color%22%3A%22%23f5f5f5%22%7D%7D&#8221;][vc_row_inner content_placement=&#8221;middle&#8221; css=&#8221;%7B%22default%22%3A%7B%22background-color%22%3A%22%23f5f5f5%22%2C%22border-style%22%3A%22solid%22%2C%22border-color%22%3A%22%231a1a1a%22%7D%7D&#8221;][vc_column_inner width=&#8221;1\/12&#8243;][\/vc_column_inner][vc_column_inner us_bg_overlay_color=&#8221;#f5f5f5&#8243; link=&#8221;%7B%22url%22%3A%22%22%7D&#8221; css=&#8221;%7B%22default%22%3A%7B%22background-color%22%3A%22%23f5f5f5%22%2C%22border-radius%22%3A%225px%22%2C%22border-style%22%3A%22double%22%2C%22border-left-width%22%3A%2255%22%2C%22border-top-width%22%3A%2244%22%2C%22border-bottom-width%22%3A%2255%22%2C%22border-right-width%22%3A%2255%22%2C%22border-color%22%3A%22%23023047%22%2C%22box-shadow-blur%22%3A%223px%22%2C%22box-shadow-color%22%3A%22%23023047%22%7D%7D&#8221; width=&#8221;10\/12&#8243;][vc_custom_heading text=&#8221;STAP Lounge&#8221; font_container=&#8221;tag:h2|font_size:42|text_align:center|color:%23219ebc&#8221; google_fonts=&#8221;font_family:ABeeZee%3Aregular%2Citalic|font_style:400%20regular%3A400%3Anormal&#8221;][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%23333333%22%7D%7D&#8221;]<\/p>\n<p style=\"text-align: center;\">The STAP Zoo currently collects information about the following list of STAP hash functions:<\/p>\n<p style=\"padding-left: 240px; text-align: left;\">\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#anemoi\">Anemoi<\/a><\/span><br \/>\n\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#arion\">Arion<\/a><br \/>\n<\/span>\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#gmimc\">GMiMC<\/a><\/span><br \/>\n\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#grendel\">Grendel<\/a><\/span><br \/>\n\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#griffin\">Griffin<\/a><\/span><br \/>\n\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#marvellous-1\">MARVELlous design<\/a> (Friday)<\/span><br \/>\n\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#marvellous-2\">Marvellous designs<\/a> (Rescue-Prime, Rescue-Prime Optimized, Vision Mark-32, XHash8 and XHash12)<\/span><br \/>\n\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#mimc\">MiMC<\/a><\/span><br \/>\n\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#monolith\">Monolith<\/a><\/span><br \/>\n\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#poseidon-variants\">Poseidon variants<\/a> (HadesMiMC, Neptune, Poseidon and Poseidon 2)<\/span><br \/>\n\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#reinforcedconcrete\">Reinforced Concrete<\/a><\/span><br \/>\n\u25ca <span style=\"color: #219ebc;\"><a style=\"color: #219ebc;\" href=\"https:\/\/stap-zoo.com\/all-stap-primitives\/#tip5-variants\">Tip5 variants<\/a> (Tip5, Tip4 and Tip4&#8242;)<\/span><\/p>\n<p>[\/vc_column_text][us_separator][us_image image=&#8221;1742&#8243; meta=&#8221;1&#8243; align=&#8221;center&#8221; link=&#8221;%7B%22url%22%3A%22%22%7D&#8221; css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22_header_middle_bg%22%7D%7D&#8221;][\/vc_column_inner][vc_column_inner width=&#8221;1\/12&#8243;][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[vc_row us_bg_overlay_color=&#8221;#f5f5f5&#8243; us_shape_show_bottom=&#8221;1&#8243; us_shape_color_bottom=&#8221;#ffffff&#8221; css=&#8221;%7B%22default%22%3A%7B%22background-color%22%3A%22_header_middle_text%22%7D%7D&#8221;][vc_column width=&#8221;5\/6&#8243;][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%23023047%22%7D%7D&#8221;] STAP hash functions [\/vc_column_text][us_separator][\/vc_column][vc_column width=&#8221;1\/6&#8243;][\/vc_column][\/vc_row][vc_row height=&#8221;small&#8221; us_bg_overlay_color=&#8221;#ffffff&#8221;][vc_column][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%23023047%22%2C%22font-family%22%3A%22Source%20Code%20Pro%22%2C%22background-color%22%3A%22%23ffffff%22%7D%7D&#8221;]A hash function H maps an arbitrary-length string to a fixed-length hash value (often called the digest).[\/vc_column_text][\/vc_column][\/vc_row][vc_row height=&#8221;small&#8221; color_scheme=&#8221;alternate&#8221; us_bg_overlay_color=&#8221;#ffffff&#8221; css=&#8221;%7B%22default%22%3A%7B%22background-color%22%3A%22%23ffffff%22%7D%7D&#8221;][vc_column width=&#8221;1\/12&#8243;][\/vc_column][vc_column us_bg_overlay_color=&#8221;#ffffff&#8221; link=&#8221;%7B%22url%22%3A%22%22%7D&#8221; width=&#8221;11\/12&#8243;][vc_column_text css=&#8221;%7B%22default%22%3A%7B%22color%22%3A%22%231a1a1a%22%7D%7D&#8221;]For application purposes, a hash function\u00a0should satisfy the following properties: Collision resistance: It should be difficult [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":4,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-1808","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/stap-wiki.fr\/index.php\/wp-json\/wp\/v2\/pages\/1808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stap-wiki.fr\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/stap-wiki.fr\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/stap-wiki.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stap-wiki.fr\/index.php\/wp-json\/wp\/v2\/comments?post=1808"}],"version-history":[{"count":0,"href":"https:\/\/stap-wiki.fr\/index.php\/wp-json\/wp\/v2\/pages\/1808\/revisions"}],"wp:attachment":[{"href":"https:\/\/stap-wiki.fr\/index.php\/wp-json\/wp\/v2\/media?parent=1808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}