A Fast Single-Key Two-Level Universal Hash Function
Universal hash functions based on univariate polynomials are well known, e.g. Poly1305 and GHASH. Using Horner’s rule to evaluate such hash functionsrequire l − 1 field multiplications for hashing a message consisting of l blocks where each block is one field element. A faster method is based on the...
Main Authors: | , , |
---|---|
Format: | Article |
Language: | English |
Published: |
Ruhr-Universität Bochum
2017-03-01
|
Series: | IACR Transactions on Symmetric Cryptology |
Subjects: | |
Online Access: | https://tosc.iacr.org/index.php/ToSC/article/view/586 |
id |
doaj-2d244daa290145068462d149ac59d60d |
---|---|
record_format |
Article |
spelling |
doaj-2d244daa290145068462d149ac59d60d2021-03-02T05:00:29ZengRuhr-Universität BochumIACR Transactions on Symmetric Cryptology2519-173X2017-03-0110612810.13154/tosc.v2017.i1.106-128586A Fast Single-Key Two-Level Universal Hash FunctionDebrup Chakraborty0Sebati Ghosh1Palash Sarkar2Indian Statistical Institute 203, B.T.Road, KolkataIndian Statistical Institute 203, B.T.Road, KolkataIndian Statistical Institute 203, B.T.Road, KolkataUniversal hash functions based on univariate polynomials are well known, e.g. Poly1305 and GHASH. Using Horner’s rule to evaluate such hash functionsrequire l − 1 field multiplications for hashing a message consisting of l blocks where each block is one field element. A faster method is based on the class of Bernstein-Rabin-Winograd (BRW) polynomials which require ⌊l/2⌋ multiplications and ⌊lgl⌋ squarings for l≥3 blocks. Though this is significantly smaller than Horner’s rule based hashing, implementation of BRW polynomials for variable length messages present significant difficulties. In this work, we propose a two-level hash function where BRW polynomial based hashing is done at the lower level and Horner’s rule based hashing is done at the higher level. The BRW polynomial based hashing is applied to a fixed number of blocks and hence the difficulties in handling variable length messages is avoided. Even though the hash function has two levels, we show that it is sufficient to use a single field element as the hash key. The basic idea is instantiated to propose two new hash functions, one which hashes a single binary string and the other can hash a vector of binary strings. We describe two actual implementations, one over F2128 and the other over F2256 both using the pclmulqdq instruction available in modern Intel processors. On both the Haswell and Skylake processors, the implementation over F2128 is faster than both an implementation of GHASH by Gueron; and a highly optimised implementation, also by Gueron, of another polynomial based hash function called POLYVAL. We further show that the Fast Fourier Transform based field multiplication over F2256 proposed by Bernstein and Chou can be used to evaluate the new hash function at a cost of about at most 46 bit operations per bit of digest, but, unlike the Bernstein-Chou analysis, there is no hidden cost of generating the hash key. More generally, the new idea of building a two-level hash function having a single field element as the hash key can be applied to other finite fields to build new hash functions.https://tosc.iacr.org/index.php/ToSC/article/view/586universal hash functionHorner’s ruleBRW polynomialtwo-level hash functionMAC schemes |
collection |
DOAJ |
language |
English |
format |
Article |
sources |
DOAJ |
author |
Debrup Chakraborty Sebati Ghosh Palash Sarkar |
spellingShingle |
Debrup Chakraborty Sebati Ghosh Palash Sarkar A Fast Single-Key Two-Level Universal Hash Function IACR Transactions on Symmetric Cryptology universal hash function Horner’s rule BRW polynomial two-level hash function MAC schemes |
author_facet |
Debrup Chakraborty Sebati Ghosh Palash Sarkar |
author_sort |
Debrup Chakraborty |
title |
A Fast Single-Key Two-Level Universal Hash Function |
title_short |
A Fast Single-Key Two-Level Universal Hash Function |
title_full |
A Fast Single-Key Two-Level Universal Hash Function |
title_fullStr |
A Fast Single-Key Two-Level Universal Hash Function |
title_full_unstemmed |
A Fast Single-Key Two-Level Universal Hash Function |
title_sort |
fast single-key two-level universal hash function |
publisher |
Ruhr-Universität Bochum |
series |
IACR Transactions on Symmetric Cryptology |
issn |
2519-173X |
publishDate |
2017-03-01 |
description |
Universal hash functions based on univariate polynomials are well known, e.g. Poly1305 and GHASH. Using Horner’s rule to evaluate such hash functionsrequire l − 1 field multiplications for hashing a message consisting of l blocks where each block is one field element. A faster method is based on the class of Bernstein-Rabin-Winograd (BRW) polynomials which require ⌊l/2⌋ multiplications and ⌊lgl⌋ squarings for l≥3 blocks. Though this is significantly smaller than Horner’s rule based hashing, implementation of BRW polynomials for variable length messages present significant difficulties. In this work, we propose a two-level hash function where BRW polynomial based hashing is done at the lower level and Horner’s rule based hashing is done at the higher level. The BRW polynomial based hashing is applied to a fixed number of blocks and hence the difficulties in handling variable length messages is avoided. Even though the hash function has two levels, we show that it is sufficient to use a single field element as the hash key. The basic idea is instantiated to propose two new hash functions, one which hashes a single binary string and the other can hash a vector of binary strings. We describe two actual implementations, one over F2128 and the other over F2256 both using the pclmulqdq instruction available in modern Intel processors. On both the Haswell and Skylake processors, the implementation over F2128 is faster than both an implementation of GHASH by Gueron; and a highly optimised implementation, also by Gueron, of another polynomial based hash function called POLYVAL. We further show that the Fast Fourier Transform based field multiplication over F2256 proposed by Bernstein and Chou can be used to evaluate the new hash function at a cost of about at most 46 bit operations per bit of digest, but, unlike the Bernstein-Chou analysis, there is no hidden cost of generating the hash key. More generally, the new idea of building a two-level hash function having a single field element as the hash key can be applied to other finite fields to build new hash functions. |
topic |
universal hash function Horner’s rule BRW polynomial two-level hash function MAC schemes |
url |
https://tosc.iacr.org/index.php/ToSC/article/view/586 |
work_keys_str_mv |
AT debrupchakraborty afastsinglekeytwoleveluniversalhashfunction AT sebatighosh afastsinglekeytwoleveluniversalhashfunction AT palashsarkar afastsinglekeytwoleveluniversalhashfunction AT debrupchakraborty fastsinglekeytwoleveluniversalhashfunction AT sebatighosh fastsinglekeytwoleveluniversalhashfunction AT palashsarkar fastsinglekeytwoleveluniversalhashfunction |
_version_ |
1724242776329027584 |