Class semper.statement.StatementModule
All Packages Class Hierarchy This Package Previous Next Index
Class semper.statement.StatementModule
java.lang.Object
|
+----semper.statement.StatementModule
- public class StatementModule
- extends Object
- implements StatementConstants, ComPointConstants, CryptoConstants
Implements the module performing keyexchange. Such a key exchange is used
to share conventinal keys when setting up a statement session. The present
module describes two methods for key exchange described. In simple key exchange
one party selects a key and sends it encrypted and signed to the other party.
In "mutual key exchange" one party sends a signed hash value of a key to the other
party, gets back a signed and encrypted new random value and then returns his
own initial key (encrypted). The final negotiated value is the bitwise XOR of
the two keys.
- Version:
- $Revision: 1.17 $ $Date: 1997/01/28 10:07:50 $
- Author:
- Jesper Drud Nielsen ([email protected]), Torben Pryds Pedersen ([email protected])
- See Also:
- openStatementSession, StatementTransaction
-
MUTUAL
-
-
SIMPLE
-
-
StatementModule()
-
-
getDescr(int)
- Returns a short textual description of the key exchange method given as parameter.
-
originatorExchangeKey(ComPointAddress, ComPoint, int, int, Vector, CryptoKeyInfo, CryptoKeyInfo, CryptoKeyInfo, CryptoKeyInfo)
- Performs the key exchange using the indicated method and stores it in the
archive.
-
originatorMutual(ComPoint, int, Vector, CryptoKeyInfo, CryptoKeyInfo, CryptoKeyInfo, CryptoKeyInfo)
- Mutual random key exchange - originator side.
-
originatorSimple(ComPoint, int, Vector, CryptoKeyInfo, CryptoKeyInfo)
- Simple key exchange - originator side.
-
responderExchangeKey(ComPointAddress, ComPoint, int, int, Vector, CryptoKeyInfo, CryptoKeyInfo, CryptoKeyInfo, CryptoKeyInfo)
- Performs the key exchange using the indicated method and stores it in the
archive.
-
responderMutual(ComPoint, int, Vector, CryptoKeyInfo, CryptoKeyInfo, CryptoKeyInfo, CryptoKeyInfo)
- Mutual random key exchange - responder side.
-
responderSimple(ComPoint, int, Vector, CryptoKeyInfo, CryptoKeyInfo)
- Simple key exchange - responder side.
-
whichAlgs()
- Returns a vector of integers describing the supported key exchange methods.
SIMPLE
public final static int SIMPLE
MUTUAL
public final static int MUTUAL
StatementModule
public StatementModule()
whichAlgs
public static Vector whichAlgs()
- Returns a vector of integers describing the supported key exchange methods.
This list can for example be used for negotiation later on
- Returns:
- vector of Integer of suported methods
getDescr
public static String getDescr(int method_id) throws StatementModuleException
- Returns a short textual description of the key exchange method given as parameter.
- Parameters:
- method_id - identifies the method for which a description is requested
- Returns:
- a description of the method.
- Throws: StatementModuleException
- if method_id is not a supported method
originatorSimple
public static CryptoKeyInfo originatorSimple(ComPoint com_point,
int convAlg,
Vector options,
CryptoKeyInfo secKey,
CryptoKeyInfo pubKey) throws StatementModuleException
- Simple key exchange - originator side.
The originator selects a key, signs it and encrypts under the public key
of the responder. The responder can verify that it comes from the asumed
originator. On the other hand the originator knows that only the assumed
responder can recover the key.
- Parameters:
- com_point - is used for communication with the responder
- convAlg - is the conventional algorithm for which a key is needed
- options - gives security options of the communication channel (placeholder)
- secKey - is the secret key of the originator
- pubKey - is the public key of the responder
- Returns:
- handle to the exchanged key
- Throws: StatementModuleException
- if the key exchange fails
- See Also:
- responderSimple
responderSimple
public static CryptoKeyInfo responderSimple(ComPoint com_point,
int convAlg,
Vector options,
CryptoKeyInfo secKey,
CryptoKeyInfo pubKey) throws StatementModuleException
- Simple key exchange - responder side.
The originator selects a key, signs it and encrypts under the public key
of the responder. The responder can verify that it comes from the asumed
originator. On the other hand the originator knows that only the assumed
responder can recover the key.
- Parameters:
- com_point - is used to communicate with the originator
- convAlg - is the conventional algorithm for which a key is needed
- options - gives security options of the communication channel (placeholder)
- secKey - is the secret key of the responder
- pubKey - is the public key of the originator
- Returns:
- handle to the exchanged key
- Throws: StatementModuleException
- if the key exchange fails
- See Also:
- originatorSimple
originatorMutual
public static CryptoKeyInfo originatorMutual(ComPoint com_point,
int convAlg,
Vector options,
CryptoKeyInfo secKeyEnc,
CryptoKeyInfo secKeySig,
CryptoKeyInfo pubKeyEnc,
CryptoKeyInfo pubKeySig) throws StatementModuleException
- Mutual random key exchange - originator side.
The originator commits to a random number (using a hash function) and signs
it. The responder chooses a random number, r, signs the pair (r, h(r)),
where h is the hash function (MD5) and encrypts the result under the originators
public encrypton key. This is sent to the originator, who finally sends back
its random number encrypted under the responders public key.
Later versions should also give the key size/algorithm as input.
and the chosen hash function. For the moment MD5 is used.
- Parameters:
- com_point - is used for communication with the responder
- convAlg - is the conventional algorithm for which a key is needed
- options - gives security options of the communication channel (placeholder)
- secKeyEnc - is the secret decryption key of the originator
- secKeySig - is the secret signature key of the originator
- pubKeyEnc - is the public encryption key of the responder
- pubKeySig - is the public signature key of the responder
- Returns:
- handle to the exchanged key (which in later versions is
archived)
- Throws: StatementModuleException
- f the key exchange fails
- See Also:
- responderSimple
responderMutual
public static CryptoKeyInfo responderMutual(ComPoint com_point,
int convAlg,
Vector options,
CryptoKeyInfo secKeyEnc,
CryptoKeyInfo secKeySig,
CryptoKeyInfo pubKeyEnc,
CryptoKeyInfo pubKeySig) throws StatementModuleException
- Mutual random key exchange - responder side.
The originator commits to a random number (using a hash function) and signs
it. The responder chooses a random number, r, signs the pair (r, h(r)),
where h is the hash function (MD5) and encrypts the result under the originators
public encrypton key. This is sent to the originator, who finally sends back
its random number encrypted under the responders public key.
Later versions should also give the key size/algorithm as input.
and the chosen hash function. For the moment MD5 is used.
- Parameters:
- com_point - is used for communication with the originator
- convAlg - is the conventional algorithm for which a key is needed
- options - gives security options of the communication channel (placeholder)
- secKeyEnc - is the secret decryption key of the originator
- secKeySig - is the secret signature key of the originator
- pubKeyEnc - is the public encryption key of the responder
- pubKeySig - is the public signature key of the responder
- Returns:
- handle to the exchanged key (which in later versions is
archived)
- Throws: StatementModuleException
- if the key exchange fails
- See Also:
- originatorSimple
originatorExchangeKey
public static CryptoKeyInfo originatorExchangeKey(ComPointAddress serverAddress,
ComPoint com_point,
int method_id,
int convAlg,
Vector options,
CryptoKeyInfo secKeyEnc,
CryptoKeyInfo secKeySig,
CryptoKeyInfo pubKeyEnc,
CryptoKeyInfo pubKeySig) throws StatementModuleException
- Performs the key exchange using the indicated method and stores it in the
archive. Originator side.
- Parameters:
- server_address - is the address of the responder
- com_point - is used for communication with the responder
- method_id - identifies the key exchange method
- convAlg - describes the conventional algorithm for which a key is needed
- options - gives security options of the communication channel (placeholder)
- secKeyEnc - is the secret decryption key of the originator
- secKeySig - is the secret signature key of the originator
- pubKeyEnc - is the public encryption key of the responder
- pubKeySig - is the public signature key of the responder
- Returns:
- handle to the exchanged key (which in later versions is
archived)
- Throws: StatementModuleException
- if the key exchange fails
- See Also:
- responderExchangeKey
responderExchangeKey
public static CryptoKeyInfo responderExchangeKey(ComPointAddress my_address,
ComPoint com_point,
int method_id,
int convAlg,
Vector options,
CryptoKeyInfo secKeyEnc,
CryptoKeyInfo secKeySig,
CryptoKeyInfo pubKeyEnc,
CryptoKeyInfo pubKeySig) throws StatementModuleException
- Performs the key exchange using the indicated method and stores it in the
archive. Server side.
- Parameters:
- my_address - is the address of the responder (not used in this module)
- com_point - is used for communication with the originator
- method_id - identifies the key exchange method
- convAlg - describes the conventional algorithm for which a key is needed
- options - gives security options of the communication channel
- secKeyEnc - is the secret decryption key of the responder
- secKeySig - is the secret signature key of the responder
- pubKeyEnc - is the public encryption key of the originator
- pubKeySig - is the public signature key of the originator
- Returns:
- handle to the exchanged key (which in later versions is
archived)
- Throws: StatementModuleException
- if the key exchange fails
- See Also:
- originatorExchangeKey
All Packages Class Hierarchy This Package Previous Next Index