1
$\begingroup$

I am trying to generate shared secret from remote EC public key(static) and client EC private key(ephemeral). In this process I am successfully able to generate shared secret using ECDH Key agreement available BC library.My work requirement is to use ElGamal key agreement but there is no specific supported Key agreement representing ECKA-ElGamal.

I was wondering if you can help confirm that ECKA-ElGamal is indeed a version of ECKA-ECDH where remote public key is static and client ephemeral key is dymanic.

Code snippet:

//I am using ECDH  
KeyAgreement ka = KeyAgreement.getInstance("ECDH","BC");

// clientEphemeralPrivateKey is Client ephemeral Private key already generated  
ka.init(clientEphemeralPrivateKey);

//serverECCPublicKey is remote server public key  
ka.doPhase(serverECCPublicKey, true);
$\endgroup$
  • $\begingroup$ Do you expect anything else from an answer except "yes, ElGamal indeed is DH with the sender using an ephemeral key and using the group operation for encryption"? $\endgroup$ – SEJPM Jan 29 '18 at 14:37
  • $\begingroup$ No.. just a confirmation.. I wanted to make sure I am doing it right. Thanks for confirming $\endgroup$ – vison Jan 29 '18 at 14:40
0
$\begingroup$

Yes, ElGamal indeed is DH with the sender using an ephemeral key and using the group operation for encryption.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.