Okamoto–Uchiyama cryptosystem explained

The Okamoto–Uchiyama cryptosystem is a public key cryptosystem proposed in 1998 by Tatsuaki Okamoto and Shigenori Uchiyama. The system works in the multiplicative group of integers modulo n,

(Z/nZ)*

, where n is of the form p2q and p and q are large primes.

Background

Let

p

be an odd prime. Define

\Gamma=\{x\in(Z/p2Z)*|x\equiv1\bmodp\}

.

\Gamma

is a subgroup of

(Z/p2Z)*

with

|\Gamma|=p

(the elements of

\Gamma

are

1,1+p,1+2p...1+(p-1)p

).

Define

L:\Gamma\toZ/pZ

by

L(x)=

x-1
p

L

is a homomorphism between

\Gamma

and the additive group

Z/pZ

: that is,

L(ab)=L(a)+L(b)\bmodp

. Since

L

is bijective, it is an isomorphism.

One can now show the following as a corollary:

Let

x\in\Gamma

such that

L(x)0\bmodp

and

y=xm\bmodp2

for

0\leqm<p

. Then

m=

L(y)
L(x)

=

y-1
x-1

\bmodp

The corollary is a direct consequence of

L(xm)=mL(x)

.

Operation

Like many public key cryptosystems, this scheme works in the group

(Z/nZ)*

. This scheme is homomorphic and hence malleable.

Key generation

A public/private key pair is generated as follows:

  1. Generate two large primes

p

and

q

.
  1. Compute

n=p2q

.
  1. Choose a random integer

g\in\{2...n-1\}

such that

gp-1\not\equiv1\modp2

.
  1. Compute

h=gn\bmodn

.

The public key is then

(n,g,h)

and the private key is

(p,q)

.

Encryption

A message

m<p

can be encrypted with the public key

(n,g,h)

as follows.
  1. Choose a random integer

r\in\{1...n-1\}

.
  1. Compute

c=gmhr\bmodn

.The value

c

is the encryption of

m

.

Decryption

An encrypted message

c

can be decrypted with the private key

(p,q)

as follows.
  1. Compute

a=L(cp-1\bmod{p2})

.
  1. Compute

b=L(gp-1\bmod{p2})

.

a

and

b

will be integers.
  1. Using the Extended Euclidean Algorithm, compute the inverse of

b

modulo

p

:

b'=b-1\bmodp

.
  1. Compute

m=ab'\bmodp

.The value

m

is the decryption of

c

.

Example

Let

p=3

and

q=5

. Then

n=325=45

. Select

g=22

. Then

h=2245\bmod45=37

.

Now to encrypt a message

m=2

, we pick a random

r=13

and compute

c=gmhr\bmodn=2223713\bmod45=43

.

To decrypt the message 43, we compute

a=

(432\bmod32)-1
3

=1

.

b=

(222\bmod32)-1
3

=2

.

b'=2-1\bmod3=2

.And finally

m=ab'=2

.

Proof of correctness

We wish to prove that the value computed in the last decryption step,

ab'\bmodp

, is equal to the original message

m

. We have

(gmhr)p-1\equiv(gmgnr)p-1\equiv(gp-1)mgp(p-1)rpq\equiv(gp-1)m\modp2

So to recover

m

we need to take the discrete logarithm with base

gp-1

. This can be done by applying

L

, as follows.

By Fermat's little theorem,

gp-1\equiv1\bmodp

. Since

gp-1\not\equiv1\bmodp2

one can write

gp-1=1+pr

with

0<r<p

. Then

L(gp-1)\not\equiv0\bmodp

and the corollary from earlier applies:

m=

L((gp-1)m)
L(gp-1)

\bmodp

.

Security

Inverting the encryption function can be shown to be as hard as factoring n, meaning that if an adversary could recover the entire message from the encryption of the message they would be able to factor n. The semantic security (meaning adversaries cannot recover any information about the message from the encryption) rests on the p-subgroup assumption, which assumes that it is difficult to determine whether an element x in

(Z/nZ)*

is in the subgroup of order p. This is very similar to the quadratic residuosity problem and the higher residuosity problem.

References