Very smooth hash explained

Very Smooth Hash (VSH)
Designers:Scott Contini, Arjen K. Lenstra, Ron Steinfeld
Publish Date:2005
Derived To:VSH*
Digest Size:1024 bits and up

In cryptography, Very Smooth Hash (VSH) is a secure cryptographic hash function invented in 2005 by Scott Contini, Arjen Lenstra and Ron Steinfeld.Provably secure means that finding collisions is as difficult as some known hard mathematical problem. Unlike other secure collision-resistant hashes, VSH is efficient and usable in practice. Asymptotically, it only requires a single multiplication per log(n) message-bits and uses RSA-type arithmetic. Therefore, VSH can be useful in embedded environments where code space is limited.

Two major variants of VSH were proposed. For one, finding a collision is as difficult as finding a nontrivial modular square root of a very smooth number modulo n. The other one uses a prime modulus p (with no trapdoor), and its security proof relies on the hardness of finding discrete logarithms of very smooth numbers modulo p. Both versions have similar efficiency.

VSH is not suitable as a substitute for a random oracle, but can be used to build a secure randomized trapdoor hash function. This function can replace the trapdoor function used in the Cramer–Shoup signature scheme, maintaining its provable security while speeding up verification time by about 50%.

VSN and VSSR

All cryptographic hash functions that are now widely used are not based on hard mathematical problems. Those few functions that are constructed on hard mathematical problems are called provably secure. Finding collisions is then known to be as hard as solving the hard mathematical problem. For the basic version of Very Smooth Hash function, this hard problem is to find modular square roots (VSSR) of certain special numbers (VSN). This is assumed to be as hard as factoring integers.

For a fixed constant c and n an integer m is a Very Smooth Number (VSN) if the largest prime factor of m is at most (log n)c.

An integer b is a Very Smooth Quadratic Residue modulo n if the largest prime in bs factorization is at most (log n)c and there exists an integer x such that

b\equivx2\modn

. The integer x is said to be a Modular Square Root of b.

We are interested only in non-trivial square roots, those where x2n. If x2 < n, the root can be easily computed using algorithms from fields of characteristics 0, such as real field. Therefore, they are not suitable in cryptographic primitives.

Very Smooth Number Nontrivial Modular Square Root (VSSR) is the following problem: Let n be the product of two unknown primes of approximately the same size and let

k\le(logn)c

. Let

p1=2,p2=3,p3=5,...

be the sequence of primes. VSSR is the following problem: Given n, find

x\in

*
Z
n
such that

stylex2\equiv

k
\prod
i=0
ei
p
i
and at least one of e0,...,ek is odd.

The VSSR assumption is that there is no probabilistic polynomial (in

logn

) time algorithm which solves VSSR with non-negligible probability. This is considered a useless assumption for practice because it does not tell for what size of moduli VSSR is computationally hard. Instead The computational VSSR assumption is used. It says that solving VSSR is assumed to be as hard as factoring a hard-to-factor

s

bit modulus, where

s

is somewhat smaller than the size of

n

.

Examples of VSN and VSSR

Let the parameters be fixed as follows:

c=5

and

n=31

.

Then

m1=35=57

is a Very Smooth Number with respect to these parameters because

(log

5~=
31)

~7.37

is greater than all

m1

's prime factors. On the other hand,

m2=55=5 ⋅ 11

is not a VSN under

c=5

and

n=31

.

The integer

b1=9

is Very Smooth Quadratic Residue modulo

n

because it is Very Smooth Number (under

c,n

) and we have

x1=3

such that
2
x
1

=b1

(mod

n

). This is a trivial modular square root, because

32\not\geqn

and so the modulus is not involved when squaring.

The integer

b2=15

is also Very Smooth Quadratic Residue modulo

n

. All prime factors are smaller than 7.37 and the Modular Square Root is

x2=20

since

202=400\equiv15

(mod

n

). This is thus a non-trivial root. The VSSR problem is to find

x2

given

b2

and

n

. And we suppose that this is computationally as hard as factoring

n

.

VSH algorithm, basic versions

Let

n

be a large RSA composite and let

p1=2,p2=3,\ldots

the sequence of primes. Let

k

, the block length, be the largest integer such that
k
style\prod
i=1

pi<n

. Let

m

be an

\ell

-bit message to be hashed consisting of bits

(m1,\ldots,m\ell)

and assume that

\ell<2k

. To compute the hash of

m

:
  1. x0 = 1
  2. Let

L

, the smallest integer greater or equal to

l/k

, be the number of blocks. Let

mi=0

for

l<i\leqLk

(padding)
  1. Let

style\ell=

k
\sum
i=1

li2i-1

with

\elli\in\{0,1\}

be the binary representation of the message length

\ell

and define

mLk+i=\elli

for

1\leqi\leqk

.
  1. for j = 0, 1,..., L in succession compute

xj+1=

2
x
j
k
\prod
i=1
mjk+i
p
i

\modn

  1. return xL + 1.

The function in step 4 is called the compression function.

Properties of VSH

\Omega(logn/loglogn)

message bits.

Variants of VSH

Several improvements, speedups and more efficient variants of VSH have been proposed. None of them changes the underlying concept of the function. These improvements are called:

VSDL and VSH-DL variant

The VSH-DL is a discrete logarithm variant of VSH that has no trapdoor, its security depends on the difficulty of finding discrete logarithm modulo a prime p.

Very Smooth Number Discrete Logarithm (VSDL) is a problem where given a very smooth number, we want to find its discrete logarithm modulo some number n.

Similarly as in previous section, by

pi

we denote the

i

-th prime. Let furthermore

c

be a fixed constant and

p

,

q

be primes with

p=2q+1

and let

k\leq(logp)c

. VSDL is the following problem: given

p

, find integers

e1,...,ek

such that
e1
2

\equiv

k
\prod
i=2
ei
p
i

\modp

with

|ei|<q

for

i=1,...,k

and at least one of

e1,...,ek

non-zero.

The VSDL assumption is that there is no probabilistic polynomial (in

logp

) time algorithm which solves VSDL with non-negligible probability. There is a strong connection between the hardness of VSDL and the hardness of computing discrete logarithm modulo

p

, which is reminiscent of, but somewhat weaker than, the connection between VSSR and integer factorization.

Security of VSH

Strong collision resistance is the only property proven for VSH. This does not imply preimage-resistance or otherimportant hash function properties, and the authors state that "VSH should not be used to model random oracles," and cannot be substituted into constructions that depend upon them (RSA signatures, some MACs). VSH should not be considered a general-purpose hash function as usually understood in security engineering.

Multiplicative property

VSH is multiplicative: Let x, y, and z be three bit strings of equal length, where zconsists only of zero bits and the strings satisfy x AND y = z. It is easy to see thatH(z)H(x OR y) ≡ H(x)H(y) (mod n). As a result, VSH succumbs to a classical time-memory trade-off attack that applies to multiplicative and additive hashes.

This fact can be used to construct a preimage attack against VSH of

\ell

bits which has

2\ell/2

complexity rather than

2\ell

as expected.

Attack against truncated version

VSH produces a very long hash (typically 1024 bits). There are no indications thata truncated VSH hash offers security that is commensurate with the hash length.

There exists a partial collision attack on VSH truncated to least significant l bits.

The complexity of this attack against VSH is:

2\ell/3

time and space.

2\ell/3

iterations.

2\ell/3

, rather than

2\ell/2

as expected from a hash function with good pseudorandomness properties.

This probably rules out the applicability of VSH in digital signature schemes which produce signatures shorter than the VSH hash result, such as elliptic-curve signature schemes.

See also