Class semper.statement.StatementTransaction
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.statement.StatementTransaction

java.lang.Object
   |
   +----semper.statement.StatementTransaction

public class StatementTransaction
extends Object
implements StatementConstants, CryptoConstants
Provides statement operations. A StatementTransaction object allows a number of parameters to be chosen based on a context, which is set through negotiation when the object is created. Thus, this class is appropriate each time a number of operations should be grouped together in a session.
Version:
$Revision: 1.9 $ $Date: 1996/09/02 14:35:50 $
Author:
Jesper Drud Nielsen ([email protected])

Constructor Index

 o StatementTransaction(String, String, CryptoKeyInfo, CryptoKeyInfo, Certificate, CryptoKeyInfo, CryptoKeyInfo, CryptoKeyInfo, CryptoKeyInfo, int, int, int)
creates a new StatementTransaction object.

Method Index

 o decipher(Statement)
Decipher a ciphered statement.
 o encipher(Statement)
Encipher a statement.
 o generateMAC(Statement, Date)
Generate a (keyed) MAC value on a statement object.
 o generateSignature(Statement)
Sign a statement.
 o getRecipient(Statement)
Get the recipient.
 o getSender(Statement)
Get the sender.
 o myStreamSize(StreamOutputInterface)
Returns the size of the StatementTransaction object when externalized.
 o pkDecipher(Statement)
Decipher a pkEnciphered statement object using skCipherOwn.
 o pkEncipher(Statement)
Encipher a statement object under a random conventional key (same algorithm as the session key, and include the DES key enciphered under pkSignaturePartner.
 o readObject(StreamInputInterface)
Internalizes a StatementTransaction object.
 o setRecipient(Statement)
Set the recipient.
 o setSender(Statement)
Set the sender.
 o verifyMAC(Statement)
Verify a (keyed) MAC value on a statement object.
 o verifySignature(Statement, Date, Date)
Verify the signature in a signed statement.
 o writeObject(StreamOutputInterface)
Externalizes a StatementTransaction object.

Constructors

 o StatementTransaction
  public StatementTransaction(String newSenderId,
                              String newRecipientId,
                              CryptoKeyInfo newSessionKeyEnc,
                              CryptoKeyInfo newSessionKeyMAC,
                              Certificate newCertificateSignatureOwn,
                              CryptoKeyInfo newSKSignatureOwn,
                              CryptoKeyInfo newSKCipherOwn,
                              CryptoKeyInfo newPkSignaturePartner,
                              CryptoKeyInfo newPkCipherPartner,
                              int newHashAlg,
                              int newMACalg,
                              int newKeyEncryption)
creates a new StatementTransaction object. The StatementTransaction object may be used in case multiple consecutive operation are to be performed on the same Statement object. The StatementTransaction will contain a user defined context to be used for each operation on the Statement (sender identification, recipient identification, MAC verification key etc).
Parameters:
newSenderId - sender identification
newRecipientId - recipient identification
newSessionKeyEnc - new session key for encryption
newSessionKeyMAC - new session key for MAC
newCertificateSignatureOwn - users own certificate used by generateSignature
newSkSignatureOwn - secret key used to make signatures
newSkCipherOwn - secret key used for public key decryption
newPkSignaturePartner - public key to use when verifyin a signature
newPkCipherPartner - public key to use when pkEncrypting a statement
newHashAlg - designates the hash algorithm to be used in this session
newMACalg - designates the MAC algorithm to be used
newKeyEncryption - is the preferred mode of padding when encrypting conv. keys
See Also:
Statement

Methods

 o encipher
  public int encipher(Statement s) throws StatementManException
Encipher a statement. The statement is enciphered using the session key.
Parameters:
s - the statement on which to operate
Throws: StatementManException
if the encryption fails
See Also:
encipher
 o decipher
  public int decipher(Statement s) throws StatementManException
Decipher a ciphered statement. The statement is deiphered using the keyDecipher key.
Parameters:
s - the statement on which to operate
Throws: StatementManException
if the decryption fails
See Also:
decipher
 o generateSignature
  public int generateSignature(Statement s) throws StatementManException
Sign a statement. Signs the statement using the skSignatureOwn.
Parameters:
s - the statement on which to operate
Throws: StatementManException
if signing fails
See Also:
generateSignature
 o verifySignature
  public int verifySignature(Statement s,
                             Date timewindowstart,
                             Date timewindowend) throws StatementManException
Verify the signature in a signed statement. The signature is verified using pkSignaturePartner
Parameters:
s - the statement on which to operate
Returns:
0 if the signature is ok and 1 otherwise
Throws: StatementManException
if the process fails
See Also:
verifySignature
 o generateMAC
  public int generateMAC(Statement s,
                         Date date) throws StatementManException
Generate a (keyed) MAC value on a statement object. The MAC value is generated using sessionKeyMAC.
Parameters:
s - the statement on which to operate
Throws: StatementManException
if the process fails
See Also:
generateMAC
 o verifyMAC
  public int verifyMAC(Statement s) throws StatementManException
Verify a (keyed) MAC value on a statement object. The MAC value is verified using sessionKeyMAC.
Parameters:
s - the statement on which to operate
Returns:
0 if the MAC is OK and 1 otherwise
Throws: StatementManException
if the process fails
See Also:
verifyMAC
 o pkEncipher
  public int pkEncipher(Statement s) throws StatementManException
Encipher a statement object under a random conventional key (same algorithm as the session key, and include the DES key enciphered under pkSignaturePartner.
Parameters:
s - the statement on which to operate
Throws: StatementManException
if the encryption fails
See Also:
pkDecipher
 o pkDecipher
  public int pkDecipher(Statement s) throws StatementManException
Decipher a pkEnciphered statement object using skCipherOwn.
Parameters:
s - the statement on which to operate
Throws: StatementManException
if the the Statement could not be deciphered
See Also:
pkDecipher
 o setSender
  public void setSender(Statement s)
Set the sender. The senderId attribute is set to senderId. A null string clears the sender.
Parameters:
s - the statement on which to operate
See Also:
getSender
 o getSender
  public String getSender(Statement s)
Get the sender. The senderId attribute is returned as a string. A null string means "no sender".
Parameters:
s - the statement on which to operate
Returns:
the sender identification
See Also:
setSender
 o setRecipient
  public void setRecipient(Statement s)
Set the recipient. The recipientId attribute is set to a specified string. A null string clears the recipient.
Parameters:
s - the statement on which to operate
See Also:
getRecipient
 o getRecipient
  public String getRecipient(Statement s)
Get the recipient. The recipientId attribute is returned as a string. A null string means "no recipient".
Parameters:
s - the statement on which to operate
Returns:
the recipient identification
See Also:
setRecipient
 o writeObject
  public void writeObject(StreamOutputInterface s) throws StreamIOException
Externalizes a StatementTransaction object. By calling this method a StatementTransaction will be written to the IO stream.
Parameters:
s - is the StreamOutputInterface onto which the object is written
Returns:
no return value
Throws: IOException
If the output data is corrupt.
 o readObject
  public void readObject(StreamInputInterface s) throws StreamIOException
Internalizes a StatementTransaction object. By calling this method a StatementTransaction will be read from the IO stream.
Parameters:
s - is the StreamOutputInterface from which the object is read
Returns:
no return value
Throws: IOException
If the input data is corrupt.
See Also:
readObject
 o myStreamSize
  public int myStreamSize(StreamOutputInterface s) throws StreamIOException
Returns the size of the StatementTransaction object when externalized.
Parameters:
s - is the StreamOutputInterface relative to which the size is computed
Returns:
Size of externalized object
Throws: IOException
if the size could not be computed

All Packages  Class Hierarchy  This Package  Previous  Next  Index