Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

MASH-1

From Wikipedia, the free encyclopedia
Cryptographic hash function
This article is about Modular Arithmetic Secure Hash. For MASH-1 gene, seeASCL1.
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "MASH-1" – news ·newspapers ·books ·scholar ·JSTOR
(April 2011) (Learn how and when to remove this message)
This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(April 2011) (Learn how and when to remove this message)
(Learn how and when to remove this message)

For acryptographic hash function (a mathematicalalgorithm), aMASH-1 (Modular Arithmetic Secure Hash) is ahash function based onmodular arithmetic.

History

[edit]

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

[edit]

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

Description

[edit]

MASH-1 involves use of anRSA-like modulusN{\displaystyle N}, whose bitlength affects the security.N{\displaystyle N} is a product of twoprime numbers and should be difficult tofactor, and forN{\displaystyle N} of unknown factorization, the security is based in part on the difficulty of extracting modular roots.

LetL{\displaystyle L} be the length of a message block inbit.N{\displaystyle N} is chosen to have a binary representation a few bits longer thanL{\displaystyle L}, typicallyL<|N|L+16{\displaystyle L<|N|\leq L+16}.

The message is padded by appending the message length and is separated into blocksD1,,Dq{\displaystyle D_{1},\cdots ,D_{q}} of lengthL/2{\displaystyle L/2}. From each of these blocksDi{\displaystyle D_{i}}, an enlarged blockBi{\displaystyle B_{i}} of lengthL{\displaystyle L} is created by placing four bits fromDi{\displaystyle 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:

H0=IV{\displaystyle H_{0}=IV}
Hi=f(Bi,Hi1)=((((BiHi1)E)emodN)mod2L)Hi1;i=1,,q{\displaystyle H_{i}=f(B_{i},H_{i-1})=((((B_{i}\oplus H_{i-1})\vee E)^{e}{\bmod {N}}){\bmod {2}}^{L})\oplus H_{i-1};\quad i=1,\cdots ,q}

WhereE=152L4{\displaystyle E=15\cdot 2^{L-4}} ande=2{\displaystyle e=2}.{\displaystyle \vee } denotes thebitwise OR and{\displaystyle \oplus } thebitwise XOR.

FromHq{\displaystyle H_{q}} are now calculated more data blocksDq+1,,Dq+8{\displaystyle D_{q+1},\cdots ,D_{q+8}} by linear operations (where{\displaystyle \|} denotes concatenation):

Hq=Y1Y3Y0Y2;|Yi|=L/4{\displaystyle H_{q}=Y_{1}\,\|\,Y_{3}\,\|\,Y_{0}\,\|\,Y_{2};\quad |Y_{i}|=L/4}
Yi=Yi1Yi4;i=4,,15{\displaystyle Y_{i}=Y_{i-1}\oplus Y_{i-4};\quad i=4,\cdots ,15}
Dq+i=Y2i2Y2i1;i=1,,8{\displaystyle D_{q+i}=Y_{2i-2}\,\|\,Y_{2i-1};\quad i=1,\cdots ,8}

These data blocks are now enlarged toBq+1,,Bq+8{\displaystyle B_{q+1},\cdots ,B_{q+8}} like above, and with these the compression process continues with eight more steps:

Hi=f(Bi,Hi1);i=q+1,,q+8{\displaystyle H_{i}=f(B_{i},H_{i-1});\quad i=q+1,\cdots ,q+8}

Finally the hash value isHq+8modp{\displaystyle H_{q+8}{\bmod {p}}}, wherep{\displaystyle p} is a prime number with72L/23<p<2L/2{\displaystyle 7\cdot 2^{L/2-3}<p<2^{L/2}}.[1]

MASH-2

[edit]

There is a newer version of the algorithm called MASH-2 with a different exponent. The originale=2{\displaystyle e=2} is replaced bye=28+1{\displaystyle e=2^{8}+1}. This is the only difference between these versions.

References

[edit]
  1. ^Smashing MASH-1, Vladimir Antipkin
Common functions
SHA-3 finalists
Other functions
Password hashing/
key stretching functions
General purpose
key derivation functions
MAC functions
Authenticated
encryption
modes
Attacks
Design
Standardization
Utilization
General
Mathematics
Retrieved from "https://en.wikipedia.org/w/index.php?title=MASH-1&oldid=1194389101"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp