Thank you - I understand what you are saying about Domain parameters, but I 
think I have solved my initial query. I believe A can be pre-computed 
before Bob has even entered the picture, and it appears CryptoPP does just 
that. In ElGamalKeys::PublicKey, I found a parameter calle "PublicElement" 
that corresponds to the A, i.e. it is, in CryptoPP terms:

A(PublicElement) = SubgroupGenerator^PrivateExponent mod Modulus

so I need not access Alice's private key in order to extract the parameters 
for "manually" performing ElGamal encryption from Bob to Alice, I have 
everything I need to do it from the PublicKey from the beginning.

Thanks,

-Derek

On Monday, September 11, 2017 at 11:21:38 PM UTC-4, Jeffrey Walton wrote:
>
>
>
> On Monday, September 11, 2017 at 10:01:41 PM UTC-4, Derek Cole wrote:
>>
>> Hello,
>>
>> I have been trying to learn ElGamal encryption by way of this site:
>>
>> https://cryptographyacademy.com/elgamal/
>>
>> I am able to find the SubgroupOrder, SubgroupGenerator, and Modulus of an 
>> ElGamalKeys::PublicKey, but I am unable to find the 3rd parameter of the 
>> PublicKey which is computed using Alice's private exponent. According to 
>> the site:
>>
>>  Next Alice chooses the secret key sk=a between 1 and p−1 and computes 
>>> A=g^a mod p
>>>
>> Alice then publish the public key pk=(p,g,A). 
>>>
>>
>> So how do I find the A parameter from the PublicKey?
>>
>
> I believe A is a domain parameter. Alice and Bob have to agree to use them 
> before any instance of a protocol is run.
>
> The equivalent problem in elliptic curves is, how do you know which field 
> you are working in. That's why you have named curves like NIST P-256. The 
> name P-256 conveys the domain parameters we need to execute an instance of 
> the protocol.
>
> My apologies if I mis-parsed the question.
>
> Jeff
>

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
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 cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to