This repository accompanies with the paper Algorithmic Views of Vectorized Polynomial Multipliers -- NTRU at International Conference on Cryptology in India, 2023. The paper is also available at ePrint 2023/1637.
Authors:
- Han-Ting Chen
r10922073@csie.ntu.edu.tw
- Yi-Hua Chung
yhchiara@gmail.com
- Vincent Hwang
gting906@gmail.com
- Bo-Yin Yang
by@crypto.tw
- Cortex-A72.
- 64-bit Armv8.0-A.
- No hardware support for cryptographic operations.
- NTRU
ntruhps2048677
ntruhrss701
- Ubuntu 22.04.1
- GCC 11.2.0
- A hardware supporting 64-bit Armv8.0-A.
- A C compiler.
- Raspberry pi 4, Uubntu 22.04.1, clang 14.0.0
- Apple M1, macOS Monterey, clang 13.1.6
- Apple M1, macOS Monterey, gcc 11.3.0
cycles
: Code for accessing cycle counters.enable_ccr
: Something that should be done prior to accessing cycle counters.hash
:aes
,fips202
,sha2
.randombytes
: Randombytes. From system by default, switch tochacha20
for pseudorandom.sort
:crypto_sort_int32
andcrypto_sort_uint32
.ntruhps2048677
ntruhrss701
Go to the folders {scheme}/{implementation}/
and type make
where {scheme}
is one of the following.
ntruhps2048677
ntruhrss701
The following binaries will be produced.
test
testvectors
test
tests for the key encapsulation mechanisim. OK KEYS
means success and ERROR KEYS
means that the resulting keys are different.
testvectors
prints all the bytes computed from crypto_kem_keypair
, crypto_kem_enc
, and crypto_kem_dec
.
Implementations targeting the same parameter should have the same testvectors.
We compare our implementations with the reference implementations.
Go to the folders {scheme}/{implementation}/
and type make speed
where {scheme}
is one of the following.
ntruhps2048677
ntruhrss701
The binaryspeed
will be produced.
Additionally, there are various profiling code as follows (compile with make XXX
where XXX
is one of the following targets).
ntruhps2048677
aarch64_tc
,aarch64_tmvp
speed_arith
speed_hash
speed_polymul
speed_rand
speed_sort
prior
speed_polymul
ref
speed_arith
speed_sort
ntruhrss701
aarch64_tmvp
speed_arith
speed_hash
speed_polymul
speed_rand
ref
speed_arith