92 B. Mi, D. Huang and S. Wan et al. / Computers and Electrical Engineering 75 (2019) 90–100
During the encryption phase, the message is represented as a N -dimensional vector m , whose elements are integers
within [ −p/ 2 , p/ 2] . After a stochastic polynomial r ∈ J (d , d ) is generated, the ciphertext can be obtained:
e = pr ∗ h + m (mod q ) . (3)
In order to decrypt the ciphertext e , the receiver should first calculate
a = f ∗ e (mod q ) (4)
and lift all its elements to the ring R . Then, one can recover the plaintext by multiplying the result with the latter part of
his/her private key, such that
m = f
p
∗ a (mod p) . (5)
According to the following lemma, it can be concluded that once the parameters p, q, N and d are properly chosen, any
plaintext can be correctly restored from its corresponding ciphertext in NTRU.
Lemma 1. The receiver can accurately decode any NTRU cipher, if
q > p(6 d + 1) . (6)
Proof. Since both r and g are sampled from J (d , d ) , the maximum elements of r ∗ g will not exceed 2 d as a result of
convolutional multiplication. Similarly, the absolute value of elements in f ∗ m is p(2 d + 1) / 2 because f ∈ J (d + 1 , d) and m
are composed of integers belonging to [ −p/ 2 , p/ 2] . Considering that
a = f ∗ e (mod q ) = p r ∗ g + f ∗ m (mod q ) , (7)
its elements will be limited to interval [0 , p(6 d + 1)] after central lifting. That means if the condition q > p(6 d + 1) holds,
no information will be lost in ring R and the message can thus be resumed as m = f
p
∗ a (mod p) .
3.
Proposed 1-out- n OT protocol
The proptocol is designed to achieve the following two goals.
1. Quantum computing attack resilience, even in the presence of an active adaptive adversary.
2. Efficient and suitable for deployment in resource-constraint settings, even when the number of message entries scale up
considerably (e.g., by pre-computing and distributing all encrypted messages in real-time).
As discussed earlier, we use NTRUEncrypt as the main building block, as well as a symmetric cryptosystem (E, D) and a
hash function H. In the protocol, we assume that the sender has n messages denoted as m
0
, m
1
, m
n −1
, while the receiver
expects to obliviously retrieve τ th of these messages. We will now describe the various phases of the protocol.
3.1. Initialization phase
For each message m
i
, we represent its subscript as a binary string i = (i
0
, i
1
, ··· , i
N−1
) , where N = log
2
n is ex-
actly the length of any plaintext identity to be retrieved. In the beginning, the sender picks a random Cartesian vector
α = ((α
0
0
, α
1
0
) , (α
0
1
, α
1
1
) , ··· , (α
0
N−1
, α
1
N−1
)) from {{0, 1} × {0, 1}}
N
and a reversible vector β over R
q
whose elements belong
to [ −q/ 2 , q/ 2] . Based on the vector α, (s)he can trivially calculate
¯
α = ((α
0
0
, α
1
0
) , (α
0
1
, α
1
1
) , ··· , (α
0
N−1
, α
1
N−1
)) to achieve a
N-dimensional vector relating to {−1 , 0 , 1 }
N
. In order to encrypt message m
i
, (s)he needs to sample a corresponding irre-
versible vector ϕ
i
∈ J (d , d ) over R
q
stochastically and multiply it with β as
¯
ϕ
i
= ϕ
i
∗ β
−1
(mod q ) . Then, (s)he computes the
symmetric key k
i
= H (ϕ
i
∗ (−α
i
)(mod p)) , where α
i
= (α
i
0
0
, α
i
1
1
, ··· , α
i
N−1
N−1
) , so as to achieve the ciphertext c
i
= E
k
i
(m
i
) .
It is clear that all encrypted messages are independent of any receiver or temporary parameter; thus, the sender performs
such computation only once. After all ciphertexts are obtained, they can be stored or delivered. Meanwhile, the sender
should also distribute all
¯
ϕ
i
, where i = 0 , 1 , ··· , n − 1 .
3.2. Retrieval phase
a. Assuming that the key pairs are (h
S
, (f
S
, f
Sp
)) and h
R
, (f
R
, f
Rp
) respectively for the sender and receiver in NTRU cryp-
tosystem, the decryption key can be obliviously transferred as follows.
(1) The sender randomly samples r
S
1
∈ J (d , d ) to encrypt as
¯
α
e
1
= pr
S
1
∗ h
S
+
¯
α(mod q ) , (8)
which will be subsequently transmitted to the receiver.
(2) In order to retrieve the key corresponding to message m
τ
, the receiver should represent its index τ to be
¯
τ =
( ¯τ
0
, ¯τ
1
, ··· , ¯τ
N−1
) where
¯τ
i
=
1 , τ
i
= 0
−1 , τ
i
= 1
(9)
for i = 0 , 1 , ··· , N − 1 .