Am 07.03.2016 um 13:06 schrieb Andrés Garagiola:
> I've been adding a few log lines to my code and I found where I have
> the problem.
>
Could you please post the keypairs that cause the problems?
> 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?
We may indeed have some borderline issue in our generation code and I'd
like to confirm that.
> 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?
Level 0 should suffice, depending on the cause of the issue, you may
want to try to sequentially increase the level if you can't detect the
issue.
> 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?
Apparently chances will be that trying again will yield a "better" key.
>
> 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
>
> <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]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout.
--
--
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.