Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Add support for FF_8192 required for Paillier
Browse files Browse the repository at this point in the history
  • Loading branch information
kealan committed Oct 11, 2019
1 parent feecb27 commit d428cbe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions cmake/AMCLParameters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ set(AMCL_RSA_FIELDS TB TFF NB BASE ML)
set(AMCL_RSA_64_2048 1024 2048 128 58 2 )
set(AMCL_RSA_64_3072 384 3072 48 56 8 )
set(AMCL_RSA_64_4096 512 4096 64 60 8 )
set(AMCL_RSA_64_8192 512 8192 64 60 16 )
# ( TB TFF NB BASE ML)
set(AMCL_RSA_32_2048 1024 2048 128 28 2 )
set(AMCL_RSA_32_3072 384 3072 48 28 8 )
Expand Down
4 changes: 2 additions & 2 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ WORD_SIZE:=64
# Current choice of Elliptic Curve ANSSI C25519 NIST521 BLS24 C41417 NUMS256E BLS381 ED25519 NUMS256W BLS383 FP256BN NUMS384E BLS461 FP512BN NUMS384W BLS48 GOLDILOCKS NUMS512E BN254 HIFIVE NUMS512W BN254CX NIST256 SECP256K1 BRAINPOOL NIST384
AMCL_CURVE:=ED25519,NIST256,GOLDILOCKS,BLS381

# RSA security level: 2048 3072 4096
AMCL_RSA:=2048,3072
# RSA security level: 2048 3072 4096 (8192 for Paillier)
AMCL_RSA:=2048,4096,8192

# Build type Debug Release Coverage ASan Check CheckFull
CMAKE_BUILD_TYPE:=Release
Expand Down
12 changes: 7 additions & 5 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,14 @@ endforeach()
# RSA Tests
################################################
foreach(level ${AMCL_RSA})
amcl_rsa_field(BD "${level}")
amcl_rsa_field(TFF "${level}")
if (NOT level STREQUAL "8192")
amcl_rsa_field(BD "${level}")
amcl_rsa_field(TFF "${level}")

amcl_rsa_test(${level} test_big_arithmetics_${BD} test_big_arithmetics_XXX.c.in amcl_rsa_${TFF} "SUCCESS" "big/test_vector_big.txt")
amcl_rsa_test(${level} test_big_consistency_${BD} test_big_consistency_XXX.c.in amcl_rsa_${TFF} "SUCCESS")
amcl_rsa_test(${level} test_rsa_${TFF} test_rsa_WWW.c.in amcl_rsa_${TFF} "SUCCESS")
amcl_rsa_test(${level} test_big_arithmetics_${BD} test_big_arithmetics_XXX.c.in amcl_rsa_${TFF} "SUCCESS" "big/test_vector_big.txt")
amcl_rsa_test(${level} test_big_consistency_${BD} test_big_consistency_XXX.c.in amcl_rsa_${TFF} "SUCCESS")
amcl_rsa_test(${level} test_rsa_${TFF} test_rsa_WWW.c.in amcl_rsa_${TFF} "SUCCESS")
endif()
endforeach()

################################################
Expand Down

0 comments on commit d428cbe

Please sign in to comment.