Hi Christian,
> a %= p; ----- why is this done?
> b %= p; ----- why is this done?
> x %= p;
> y %= p;
Certicom requirements. Domain Parameters are in the interval [0, p-1].
Some programs used to create curves use negative values.
Jeff
On 9/27/07, greatx <[EMAIL PROTECTED]> wrote:
>
> I still have my questions about the domain parameters.
>
> Question 1:
> -----------------
> >From the DPVal example (thanks Jeffrey) they mention the 'p', but is
> this the same as the prime 'p' from my ASN1 data (in the first
> posting)?
> DPVal sample code:
> // This is Curve P-112 from NIST
> CryptoPP::Integer
> p("6277101735386680763835789423207666416083908700390324961279");
>
> Given ASN1 data:
> ... OBJECT IDENTIFIER prime-field (1 2 840 10045 1 1)
> INTEGER -----> prime 'p'
> 00 D7 C1 34 AA 26 43 66 86 2A 18 30 25 75 D1 D7
> 87 B0 9F 07 57 97 DA 89 F5 7E C8 C0 FF
> ...
> ...
>
>
>
> Question 2:
> -----------------
> Based on the sample code from DPVal:
> Integer p; ------ load prime 'p' here
> Integer a; ------ load curve equation parameter 'a' here
> Integer b; ------ load curve equation parameter 'b' here
> Integer f; ------ load the cofactor 'f' here
> Integer n; ------- load the group order 'n' here
> a %= p; ----- why is this done?
> b %= p; ----- why is this done?
> x %= p;
> y %= p;
> ECP ec( p, a, b ); // is 'ec' the curve equation?
> PrivateKey.Initialize( ec, ECP::Point( x, y ), n, f );
>
> In my ASN1 data, 'a' and 'b' are in an OCTET STRING form. Can I pass
> that instead of an INTEGER? or do I have to convert from the OCTET to
> INTEGER before giving it to crypto++?
> In my ASN1 data, 'G' is the encoded Group Generator. Is this needed to
> be passed? What about:
> DL_GroupParameters_EC<ECP> gp;
> gp.Initialize(ec, G, n, f); ----- is G the same as ECP::Point( x,
> y )? if so, my G is given as an OCTET, how do I pass it in here? is
> the last parameter k the same as the cofactor 'f'??
>
>
> Thanks.
> Christian
>
>
>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---