MASH-1
   HOME

TheInfoList



OR:

For a
cryptographic hash function A cryptographic hash function (CHF) is a hash algorithm (a map (mathematics), map of an arbitrary binary string to a binary string with a fixed size of n bits) that has special properties desirable for a cryptography, cryptographic application: ...
(a mathematical
algorithm In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
), a MASH-1 (Modular Arithmetic Secure Hash) is a
hash function A hash function is any Function (mathematics), function that can be used to map data (computing), data of arbitrary size to fixed-size values, though there are some hash functions that support variable-length output. The values returned by a ...
based on
modular arithmetic In mathematics, modular arithmetic is a system of arithmetic operations for integers, other than the usual ones from elementary arithmetic, where numbers "wrap around" when reaching a certain value, called the modulus. The modern approach to mo ...
.


History

Despite many proposals, few hash functions based on modular arithmetic have withstood attack, and most that have tend to be relatively inefficient. MASH-1 evolved from a long line of related proposals successively broken and repaired.


Standard

Committee Draft ISO/IEC 10118-4 (Nov 95)


Description

MASH-1 involves use of an RSA-like modulus N, whose bitlength affects the security. N is a product of two
prime number A prime number (or a prime) is a natural number greater than 1 that is not a Product (mathematics), product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime ...
s and should be difficult to
factor Factor (Latin, ) may refer to: Commerce * Factor (agent), a person who acts for, notably a mercantile and colonial agent * Factor (Scotland), a person or firm managing a Scottish estate * Factors of production, such a factor is a resource used ...
, and for N of unknown factorization, the security is based in part on the difficulty of extracting modular roots. Let L be the length of a message block in
bit The bit is the most basic unit of information in computing and digital communication. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented as ...
. N is chosen to have a binary representation a few bits longer than L, typically L < , N, \leq L+16. The message is padded by appending the message length and is separated into blocks D_1, \cdots, D_q of length L/2. From each of these blocks D_i, an enlarged block B_i of length L is created by placing four bits from D_i in the lower half of each byte and four bits of value 1 in the higher half. These blocks are processed iteratively by a compression function: :H_0 = IV :H_i = f(B_i, H_) = ((((B_i \oplus H_) \vee E)^e \bmod N) \bmod 2^L) \oplus H_; \quad i=1,\cdots,q Where E=15 \cdot 2^ and e=2. \vee denotes the
bitwise OR In computer programming, a bitwise operation operates on a bit string, a bit array or a binary numeral (considered as a bit string) at the level of its individual bits. It is a fast and simple action, basic to the higher-level arithmetic opera ...
and \oplus the
bitwise XOR In computer programming, a bitwise operation operates on a bit string, a bit array or a binary numeral (considered as a bit string) at the level of its individual bits. It is a fast and simple action, basic to the higher-level arithmetic opera ...
. From H_q are now calculated more data blocks D_,\cdots,D_ by linear operations (where \, denotes concatenation): :H_q = Y_1 \,\, \, Y_3 \,\, \, Y_0 \,\, \, Y_2; \quad , Y_i, = L/4 :Y_i = Y_ \oplus Y_; \quad i=4,\cdots,15 :D_ = Y_ \,\, \, Y_; \quad i=1,\cdots,8 These data blocks are now enlarged to B_,\cdots,B_ like above, and with these the compression process continues with eight more steps: :H_i = f(B_i, H_); \quad i=q+1,\cdots,q+8 Finally the hash value is H_ \bmod p, where p is a prime number with 7\cdot 2^ < p < 2^.Smashing MASH-1, Vladimir Antipkin
/ref>


MASH-2

There is a newer version of the algorithm called MASH-2 with a different exponent. The original e=2 is replaced by e=2^8+1. This is the only difference between these versions.


References

* A. Menezes, P. van Oorschot, S. Vanstone, ''Handbook of Applied Cryptography'', {{cryptography navbox, hash Cryptographic hash functions