gnu.crypto.key.dh

Class ElGamalKeyAgreement

Implemented Interfaces:
IKeyAgreementParty
Known Direct Subclasses:
ElGamalReceiver, ElGamalSender

public abstract class ElGamalKeyAgreement
extends BaseKeyAgreementParty

The ElGamal key agreement, also known as the half-certified Diffie-Hellman key agreement, is described in the Handbook of Applied Cryptography [HAC] as follows:

RFC-2631 describes an Ephemeral-Static Mode of operations with Diffie-Hellman keypairs as follows:

 "In Ephemeral-Static mode, the recipient has a static (and certified)
 key pair, but the sender generates a new key pair for each message
 and sends it using the originatorKey production. If the sender's key
 is freshly generated for each message, the shared secret ZZ will be
 similarly different for each message and partyAInfo MAY be omitted,
 since it serves merely to decouple multiple KEKs generated by the
 same set of pairwise keys. If, however, the same ephemeral sender key
 is used for multiple messages (e.g. it is cached as a performance
 optimization) then a separate partyAInfo MUST be used for each
 message. All implementations of this standard MUST implement
 Ephemeral-Static mode."
 

Reference:

  1. Diffie-Hellman Key Agreement Method
    Eric Rescorla.
  2. [HAC]: Handbook of Applied Cryptography.
    CRC Press, Inc. ISBN 0-8493-8523-7, 1997
    Menezes, A., van Oorschot, P. and S. Vanstone.
Version:
$Revision: 1.2 $

Field Summary

static String
KA_ELGAMAL_RECIPIENT_PRIVATE_KEY
static String
KA_ELGAMAL_RECIPIENT_PUBLIC_KEY
static String
SOURCE_OF_RANDOMNESS
protected BigInteger
ZZ
The shared secret key.

Fields inherited from class gnu.crypto.key.BaseKeyAgreementParty

TWO, complete, initialised, irnd, name, rnd, step

Constructor Summary

ElGamalKeyAgreement()

Method Summary

protected void
engineReset()
protected byte[]
engineSharedSecret()

Methods inherited from class gnu.crypto.key.BaseKeyAgreementParty

engineInit, engineProcessMessage, engineReset, engineSharedSecret, getSharedSecret, init, isComplete, name, nextRandomBytes, processMessage, reset

Field Details

KA_ELGAMAL_RECIPIENT_PRIVATE_KEY

public static final String KA_ELGAMAL_RECIPIENT_PRIVATE_KEY

KA_ELGAMAL_RECIPIENT_PUBLIC_KEY

public static final String KA_ELGAMAL_RECIPIENT_PUBLIC_KEY

SOURCE_OF_RANDOMNESS

public static final String SOURCE_OF_RANDOMNESS

ZZ

protected BigInteger ZZ
The shared secret key.

Constructor Details

ElGamalKeyAgreement

protected ElGamalKeyAgreement()

Method Details

engineReset

protected void engineReset()
Overrides:
engineReset in interface BaseKeyAgreementParty

engineSharedSecret

protected byte[] engineSharedSecret()
            throws KeyAgreementException
Overrides:
engineSharedSecret in interface BaseKeyAgreementParty

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.