-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yf/crypto algo alignment #2794
Yf/crypto algo alignment #2794
Conversation
In this commit we will create new classes such that the Digest data and digest creation is decoupled. Digest data will be kept at the same place but the creation can be choosen by different libraries like cryptopp or openssl. This rearrangement of classes will be done in this PR. Rearranging DigestCreator and DigestHolder 1) Added the proper way for type subsetting 2) Added skeleton code for proper maintainability. This commit includes below changes:- * OpenSSL library implementation for SHA_256 & SHA3_256 hashing. * Design change for existing Crypto++ library hashing (existing Digest class modified). The storing of generated digest and the digest generation procedures are decoupled and achieved with the help of 'DigestHolder' & 'DigestCreator' classes respectively. * Introduced compilation macros to choose between cryptographic hashing libraries i.e. Cryptopp and OpenSSL (SHA_256 and SHA3_256). Review comments addressed. Cryptographic libs macros added in CI runs. This commit contains:- * CryptoppDigestCreator class implemented for digest generation. * DigestUtil class modified to templated DigestHelper class which takes the digest creator class. DigestUtil class removed. CryptoppDigestCreator will do the job of DigestUtil. Compilation error fixed. Review comments addressed. compute() added in interface. Changes mentioned below: - DigestCreator class moved to digest_creator.hpp file. - CryptoppDigestCreator class moved to cryptopp_digest_creator.*pp files. - OpenSSLDigestCreator class moved to openssl_digest_creator.ipp file. - DigestHolder class moved to digest_holder.hpp file. - Renamed files: Digest.hpp to digest.hpp, DigestType.hpp to digest_type.hpp. Removed unwanted file. Decoupling crypto digest to choose crypto algos In this commit we will create new classes such that the Digest data and digest creation is decoupled. Digest data will be kept at the same place but the creation can be choosen by different libraries like cryptopp or openssl. This rearrangement of classes will be done in this PR. Rearranging DigestCreator and DigestHolder 1) Added the proper way for type subsetting 2) Added skeleton code for proper maintainability. Merge pull request #2 from pkthapa/cryptographic-openssl-hashing OpenSSL SHA hashing implementation. Minor include changes.
- Remove init() from DigestCreator class. - Change update() and compute to updateDigest() and computeDigest() respectively. - static property of a function removed from EVPHash class.
- Remove init() from DigestCreator class. - Change update() and compute to updateDigest() and computeDigest() respectively. - static property of a function removed from EVPHash class.
Apollo now logs when it generates keys Apollo now logs the command line arguments when it starts a replica
Integrated EdDSA multisig to conconrd-bft's key generation and to commit path threshold signature collection Added unittests for EdDSA multisig interface
Introduced the USE_RELIC cmake option to control relic linkage and control relic-dependant target generation.
Added configuration flags to the threshsign benchmark
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.
…al-merge Compilation error fixed.
Review comments addressed.
Removed SHA3_256 digest algorithm as per spec review meeting comment.
8046f3e
to
0fa99a5
Compare
9702db0
to
541b4ea
Compare
@@ -110,6 +127,67 @@ class AsymmetricPublicKey { | |||
AsymmetricPublicKey() {} | |||
}; | |||
|
|||
// Wrapper class for OpenSSL Crypto's EVP_PKEY objects implementing | |||
// AsymmetricPrivateKey. | |||
class EVPPKEYPrivateKey : public AsymmetricPrivateKey { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is needed if we want to use existing code to generate ecdsa keys.
We still need to adapt the interface to support PEM files, which are used by
ClientTlsKeyExchangeHandler::exchangeTlsKeys.
The purposes of moving all of the crypto utilities are:
Currently, cryptopp cannot be removed as it is used for ecdsa key generation and aes encryption. Both should be replaced by openssl so that we can build without cryptopp. |
541b4ea
to
7623ec6
Compare
Remove relic and cryptopp from our repository and use openssl instead.
There have been multiple previous pull requests which were not directed to master:
arc-vmware#6
arc-vmware#15
arc-vmware#12