I've been adding a few log lines to my code and I found where I have the
problem.
I'm generating a lot of key pairs aprox. 2.000.000 (with less key pairs 1K,
10K or 100K no problem occurs) my program close trying create a public key
after initialize the private key:
privateKey.Initialize(rng, params);
privateKey.MakePublicKey(publicKey); // <<- Here my program raise an
'Unhandled Exception' and died
My question is could be my problem that the previously created private key
is bad? Adding a validation of the private key before create the public key
could I detect the problem?
I'm creating keys using my program, no external keys are loaded so could I
validate the keys in level 0? Is enough to detect the problem? I detected
that level 2 or 3 is very slow to my volume of keys.
Once that the bad key is detected, is right try again?
Thank you very much
Regards
On Sunday, March 6, 2016 at 9:42:43 PM UTC-3, Andrés Garagiola wrote:
>
> | To ensure you actually loaded genuine keys that haven't been damaged
> since last use and to ensure that everything is operational.
>
> Right. But I'm creating new keys using CryptoPP. Why I should distrust of
> this keys?
>
> When I execute my key generation process with many keys (2.000.000 key
> pairs request) I found and error (Segmentation fault error). Could it be
> related with a not validated key?
>
>
>
> On Friday, March 4, 2016 at 5:02:34 PM UTC-3, Andrés Garagiola wrote:
>>
>> I'm seeing a few examples where after create keys it are validated. What
>> is the reason to do it? What kind of problem without validate the keys?
>>
>> bool GeneratePublicKey( const ECDSA<ECP, SHA1>::PrivateKey& privateKey,
>> ECDSA<ECP, SHA1>::PublicKey& publicKey )
>> {
>> AutoSeededRandomPool prng;
>>
>> // Sanity check
>> assert( *privateKey.Validate( prng, 3 )* );
>>
>> privateKey.MakePublicKey(publicKey);
>> assert( *publicKey.Validate( prng, 3 )* );
>>
>> return* publicKey.Validate( prng, 3 );*
>> }
>>
>> What's means the level?
>>
>> I'm looking this wiki page
>> https://www.cryptopp.com/wiki/Elliptic_Curve_Digital_Signature_Algorithm
>> but the explanation about validation is not included with the examples.
>>
>> Regards
>>
>
--
--
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/d/optout.