edu.rit.crypto
Class MuH1

java.lang.Object
  extended by edu.rit.crypto.MuH1

public class MuH1
extends Object

Class MuH1 provides the compression function for the MicroHash-One (μH-1) 32-bit one-way hash function. The compression function is used as a building block for message digests (class MuH1MessageDigest) and pseudorandom number generators (class MuH1Random) based on the μH-1 one-way hash function.

The compression function's inputs are two 32-bit values A and B. The compression function's output is a 32-bit value C. The compression function is defined as follows:

Compress (A, B)
X <- (A << 32) + B
Return ((X * X) >> 48) & 0xFFFFFFFF

The μH-1 compression function is designed to run quickly, even on small devices with limited memory and CPU power.

The μH-1 compression function is intended to be used in applications where it only has to withstand attack for a short time, a few milliseconds at most. Typically, an attacker knows the output C and one of the input values, say A, and the attacker needs to find a second preimage for the other input value B -- that is, a value B' such that Compress (A, B) = Compress (A, B') = C. A brute force search would require trying all 232 possible values for B'. In 2003, such a search takes several minutes. If the attack's window of opportunity is over in a few milliseconds, the brute force search will not finish in time and the attack will fail. It is not known whether there is a shortcut that would let the attacker find a second preimage with less work than an exhaustive search.

An example of such an application -- and the application for which the μH-1 compression function was originally designed -- is preventing packet insertion attacks in messages sent over an insecure network using the Many-to-Many Protocol (M2MP). See package edu.rit.m2mp for further information.


Method Summary
static int compress(int m, int c)
          The μH-1 compression function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compress

public static int compress(int m,
                           int c)
The μH-1 compression function.



Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.