Skip to content

Sign/verify implementations using OpenSSL library.#6

Open
pkthapa wants to merge 59 commits into
arc-vmware:crypto-decoupling-openssl-libfrom
pkthapa:openssl-sign-verify
Open

Sign/verify implementations using OpenSSL library.#6
pkthapa wants to merge 59 commits into
arc-vmware:crypto-decoupling-openssl-libfrom
pkthapa:openssl-sign-verify

Conversation

@pkthapa
Copy link
Copy Markdown
Collaborator

@pkthapa pkthapa commented May 19, 2022

  • Problem Overview
    The cryptographic algorithm involved in sign/verify operations should be changed to using OpenSSL's EdDSA algorithm.
    i) Cryptopp RSA signing and verification are replaced by OpenSSL EdDSA signing and verification.
    ii) Encryption and decryption using AES-256 bit Cipher algorithm using CBC mode implemented using OpenSSL library.
    iii) Base64 encoding and decoding using OpenSSL library APIs.
    iv) Introduced USE_RELIC and USE_EDDSA_OPENSSL compilation macros for BLS multi-sig and EdDSA multi-sig implementation.
    v) Introduced replicaMsgSigningAlgo and operatorMsgSigningAlgo config flags to hop between RSA, ECDSA and EdDSA signing and verification.

  • Testing Done
    i) Gtest for EdDSA sign/verify, AES-CBC encrypt/decrypt, and Base64 encode/decode are working for OpenSSL library only. The same gtest cases for Cryptopp RSA sign/verify, AES-CBC-256 encrypt/decrypt, and base64 encoding/decoding are commented.
    ii) Apollo test cases for OpenSSL library.
    iii) Benchmark tool [picobench] added for comparing EdDSA signing/verification vs RSA signing/verification.
    iv) Added missed OpenSSL digest holder test cases.

@arc-vmware arc-vmware force-pushed the crypto-decoupling-openssl-lib branch 2 times, most recently from 7b02ba2 to 16c6c50 Compare May 25, 2022 07:34
@pkthapa pkthapa force-pushed the openssl-sign-verify branch 2 times, most recently from 06b3943 to 6bcf209 Compare June 10, 2022 15:54
@arc-vmware arc-vmware force-pushed the crypto-decoupling-openssl-lib branch from 2f9f332 to efd7b2a Compare June 13, 2022 03:45
@pkthapa pkthapa force-pushed the openssl-sign-verify branch 4 times, most recently from 8a43b8b to 4f9b348 Compare June 13, 2022 15:02
Comment thread bftengine/include/bcstatetransfer/SimpleBCStateTransfer.hpp Outdated
@pkthapa pkthapa force-pushed the openssl-sign-verify branch 2 times, most recently from 985f38e to 6dc4b49 Compare June 13, 2022 15:49
Comment thread bftengine/src/bcstatetransfer/AsyncStateTransferCRE.cpp Outdated
Comment thread bftengine/src/bftengine/KeyExchangeManager.cpp Outdated
Comment thread bftengine/src/bftengine/SigManager.cpp Outdated
Comment thread bftengine/src/preprocessor/tests/preprocessor_test.cpp Outdated
Comment thread bftengine/src/preprocessor/tests/preprocessor_test.cpp Outdated
Comment thread util/include/openssl_utils.hpp Outdated
Comment thread util/include/openssl_utils.hpp Outdated
Comment thread util/include/openssl_utils.hpp Outdated
Comment thread util/include/openssl_utils.hpp Outdated
Comment thread util/src/cryptopp_utils.cpp Outdated
@pkthapa pkthapa force-pushed the openssl-sign-verify branch 6 times, most recently from 6c81258 to 9e6237f Compare June 16, 2022 18:31
Comment thread util/include/crypto_utils.hpp Outdated
Comment thread bftengine/src/bftengine/KeyExchangeManager.cpp Outdated
Comment thread bftengine/src/bftengine/SigManager.hpp Outdated
Comment thread client/reconfiguration/src/default_handlers.cpp
Comment thread secretsmanager/src/aes.cpp Outdated
Comment thread secretsmanager/src/aes.h Outdated
Comment thread tools/KeyfileIOUtils.cpp Outdated
<< "read-only: " << config.isReadOnly << "\n\n"
#ifdef USE_CRYPTOPP
<< "# RSA non-threshold replica public keys\n"
<< "rsa_public_keys:\n";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Object store integrity checker code look for this "rsa_public_keys" . Please check if we need to make relevant changes there?

@pkthapa pkthapa force-pushed the openssl-sign-verify branch from c9f9870 to ab57a5a Compare June 23, 2022 14:59
Comment thread bftengine/include/bcstatetransfer/SimpleBCStateTransfer.hpp Outdated
Comment thread util/include/digest.hpp
Comment thread bftengine/src/bftengine/KeyExchangeManager.cpp
Comment thread util/include/sign_verify_utils.hpp Outdated
Comment thread secretsmanager/src/base64.h Outdated
Comment thread secretsmanager/src/base64.h Outdated
Comment thread secretsmanager/src/base64.h Outdated
Comment thread util/include/memory.hpp Outdated
Comment thread util/src/openssl_utils.cpp Outdated
Comment thread util/src/openssl_utils.cpp Outdated
Comment thread util/src/openssl_utils.cpp Outdated
Comment thread util/src/openssl_utils.cpp Outdated
Comment thread util/src/openssl_utils.cpp Outdated
Comment thread util/include/crypto/eddsa/EdDSA.hpp Outdated
@toly-kournik
Copy link
Copy Markdown

@pkthapa, we have already 274 comments in this PR and it's not converging.
There are 116 affected files, which makes it impossible to make a comprehensive review.
I propose to close it and open new ones per topic, starting from digests refactoring.

@pkthapa
Copy link
Copy Markdown
Collaborator Author

pkthapa commented Jul 27, 2022

@pkthapa, we have already 274 comments in this PR and it's not converging. There are 116 affected files, which makes it impossible to make a comprehensive review. I propose to close it and open new ones per topic, starting from digests refactoring.

@toly-kournik New PR created here: #12

@pkthapa pkthapa force-pushed the openssl-sign-verify branch 2 times, most recently from 6c91764 to 57c20fe Compare July 28, 2022 10:48
i. Compilation macros (USE_CRYPTOPP_RSA and USE_EDDSA_SINGLE_SIGN) for RSA and EdDSA removed.
ii. The choice of signing algorithm is now based on the value set in 'replicaMsgSigningAlgo' and 'operatorMsgSigningAlgo' config variables.
@pkthapa pkthapa force-pushed the openssl-sign-verify branch from 57c20fe to 9cd5ab7 Compare July 28, 2022 10:57
@pkthapa
Copy link
Copy Markdown
Collaborator Author

pkthapa commented Jul 28, 2022

EdDSASigner

Namespace changed to concord::crypto::openssl for class EdDSASigner.

arc-vmware pushed a commit that referenced this pull request Aug 23, 2022
@arc-vmware arc-vmware force-pushed the crypto-decoupling-openssl-lib branch from 60f690d to f73a522 Compare August 25, 2022 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants