You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by km...@apache.org on 2019/10/11 16:09:22 UTC
[incubator-milagro-crypto-c] 01/01: Add support for FF_8192
required for Paillier
This is an automated email from the ASF dual-hosted git repository.
kmccusker pushed a commit to branch issue51
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-crypto-c.git
commit d428cbecd1c73831f475b98897a5128a3e9d0f28
Author: Kealan McCusker <ke...@gmail.com>
AuthorDate: Fri Oct 11 17:08:44 2019 +0100
Add support for FF_8192 required for Paillier
---
cmake/AMCLParameters.cmake | 1 +
config.mk | 4 ++--
test/CMakeLists.txt | 12 +++++++-----
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/cmake/AMCLParameters.cmake b/cmake/AMCLParameters.cmake
index b9f8a93..4fe7339 100644
--- a/cmake/AMCLParameters.cmake
+++ b/cmake/AMCLParameters.cmake
@@ -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 )
diff --git a/config.mk b/config.mk
index 6191947..e9b25ef 100644
--- a/config.mk
+++ b/config.mk
@@ -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
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c350acc..6f13d71 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -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()
################################################