Hello all,
Problem:
Case1:
There is a difference in the public key generated by Crypto 5.2.1 and the
public key generated by 5.6.2. This is resulting in backward compatability
issue.
Case 2:
In Crypto 5.6.2 , there is difference in the public key generated before
and after.
History:
The version of crypto++ used in our project is Crypto 5.2.1. We use
cryptlib unicode static and unicode dynamic libraries.
Our project is built in VS 2005
We are trying upgrade to Crypto 5.6.2.
I obtanied Crypto 5.6.2. from your website. Built the same with VS 2005
with settings as /MT for static .lib and /MD for dynamic .lib. To get the
unicode format changed the character set to "Use Unicode character set".
The cryptlib.lib built successfully and integrated in our project.
The details of algorithms used for both the cases as below:
1. Using the user entered password a binary key is derived.
BYTE Binary Key [ CryptoPP::SHA1::DIGESTSIZE ];
The algorithm used in binary key generation is password-based
key-derive-function. This is SHA1 based Crypto algorithm
CryptoPP::PKCS12_PBKDF< CryptoPP::SHA1 >.
The function used is Derive Key :
unsigned int PKCS12_PBKDF<T>::DeriveKey(byte *derived, size_t derivedLen,
byte purpose, const byte *password, size_t passwordLen, const byte *salt,
size_t saltLen, unsigned int iterations, double timeInSeconds) const
2. Binary Key is 20 bytes.
3. Static Application Master Initialization vector is used to generate the
binary key.
4. The binary key is used as seed for random number generator.
RandomPool * pRng = new RandomPool;
pRng->Put ( derived, NUMELMTS ( derived ) );
5.The private key is generated based on RNG seeded with password.
CryptoPP::RSAES_OAEP_SHA_Encryptor::SchemeOptions::PrivateKey keyPriv;
The function used is GenerateRandomWithKeySize:
void GenerateRandomWithKeySize(RandomNumberGenerator &rng, unsigned
int keySize);
6. The public key is generated using the private key.
CryptoPP::RSAES_OAEP_SHA_Encryptor::SchemeOptions::PublicKey keyPub(
keyPriv );
ArraySink sink ( key, *pKeyLen );
keyPub.Save ( sink );
7. Public key size is 32 bytes.
Please let us know the reason for difference in the public key generations
--
--
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.