gnu.crypto.key.dh

Class DiffieHellmanKeyAgreement

Implemented Interfaces:
IKeyAgreementParty
Known Direct Subclasses:
DiffieHellmanReceiver, DiffieHellmanSender

public abstract class DiffieHellmanKeyAgreement
extends BaseKeyAgreementParty

The basic version of the Diffie-Hellman key agreement is described in the Handbook of Applied Cryptography [HAC] as follows:

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

 "In Static-Static mode, both the sender and the recipient have a
static (and certified) key pair. Since the sender's and recipient's
keys are therefore the same for each message, ZZ will be the same for
each message. Thus, partyAInfo MUST be used (and different for each
message) in order to ensure that different messages use different
KEKs. Implementations MAY implement Static-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.1 $

Field Summary

static String
KA_DIFFIE_HELLMAN_OWNER_PRIVATE_KEY
static String
SOURCE_OF_RANDOMNESS
protected BigInteger
ZZ
The shared secret key.
protected DHPrivateKey
ownerKey
The key agreement party's private key.

Fields inherited from class gnu.crypto.key.BaseKeyAgreementParty

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

Constructor Summary

DiffieHellmanKeyAgreement()

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_DIFFIE_HELLMAN_OWNER_PRIVATE_KEY

public static final String KA_DIFFIE_HELLMAN_OWNER_PRIVATE_KEY


SOURCE_OF_RANDOMNESS

public static final String SOURCE_OF_RANDOMNESS


ZZ

protected BigInteger ZZ
The shared secret key.


ownerKey

protected DHPrivateKey ownerKey
The key agreement party's private key.

Constructor Details

DiffieHellmanKeyAgreement

protected DiffieHellmanKeyAgreement()

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.