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

Class semper.statement.StatementMan

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

public class StatementMan
extends Object
implements StatementConstants, ComPointConstants, CryptoConstants
Implements the interface for StatementMan
Version:
$Revision: 1.25 $ $Date: 1996/09/20 07:31:03 $
Author:
Jesper Drud Nielsen (drud@cryptomathic.aau.dk), Torben Pryds Pedersen (tpp@cryptomathic.aau.dk)
See Also:
StatementManException, StatementTransaction

Constructor Index

 o StatementMan()
Prevents instantiation of objects of this class.

Method Index

 o choose(Vector, ComPoint, Vector, String)
Select acceptable values from the list proposed by the client.
 o init()
Initialises the StatementMan object.
 o initConstInt()
Initialises the vector of integers of the available methods for key exchange
 o initConstString()
Initialises the vector of descriptions of the available methods for key exchange
 o int2Str(int)
Converts a constant to a string describing the constant.
 o isInitialised()
Tells whether StatementMan is initialised.
 o openInitiatorStatementSession(String, String, boolean[], Vector, String)
Constructs a StatementTransaction object.
 o openResponderStatementSession(String, String, boolean[], Vector, String)
Open a statement session, responder side.
 o openStatementSession(boolean, String, String, boolean[], Vector, String)
Open a statement session (used by openInitiatorStatementSession & openInitiatorStatementSession).
 o proposeAlgorithms(int)
Makes a list of proposed algorithms for the requested service.
 o requestChoice(Vector, ComPoint, Vector, String)
Propose a list of values for the parameters and request the server to choose from it.
 o str2Int(String)
Converts a String to a constant The conversion is based on two vectors which must have been initialised.
 o supportedAlgorithms(int)
Makes a list of supported algorithms for the requested service.
 o whichKeyExchanges()
Tell which methods for key exchange are supported.

Constructors

 o StatementMan
  public StatementMan() throws StatementManException
Prevents instantiation of objects of this class.
Throws: StatementManException
if this method is called

Methods

 o isInitialised
  public static boolean isInitialised()
Tells whether StatementMan is initialised. The StatementMan is initialised when StatementMan.init() has be called
Returns:
s true is StatementMan has been called, false otherwise.
 o init
  public static void init() throws StatementManException
Initialises the StatementMan object. This version generates keys needed for testing Later on a module will be loaded.
Throws: StatementManException
if the preferred Statement module could not be loaded
 o proposeAlgorithms
  public static Vector proposeAlgorithms(int secService) throws StatementManException
Makes a list of proposed algorithms for the requested service. Based on the list of supported algorithms, available certificates and the preferences set by the user a list of proposed algorithms for the service is given. The following encoding for security services is used. 0: Conventional krypto system 1: MAC algorithm 2: Method for making signatures 3: Method for verifying signatures 4: Method for public key encryption 5: Method for public key decryption 6: Hash functions 7: Method for key exchange
Parameters:
secService - indicates the security service
Returns:
Integer vector of proposed algorithms for the security service
Throws: StatementManException
if the secService is not supported
 o supportedAlgorithms
  public static Vector supportedAlgorithms(int secService) throws StatementManException
Makes a list of supported algorithms for the requested service. The following encoding for security services is used. 0: Conventional krypto system 1: MAC algorithm 2: Method for making signatures 3: Method for verifying signatures 4: Method for public key encryption 5: Method for public key decryption 6: Hash functions 7: Method for key exchange
Parameters:
secService - indicates the security service
Returns:
vector of proposed algorithms for the security service
Throws: StatementManException
if the secService is not supported
 o openStatementSession
  public static StatementTransaction openStatementSession(boolean server,
                                                          String partnerId,
                                                          String serveraddress,
                                                          boolean neededAlgs[],
                                                          Vector options,
                                                          String ext_ref) throws StatementManException, ComPointException, NegotiationException
Open a statement session (used by openInitiatorStatementSession & openInitiatorStatementSession). A list of supported algorithms is sent from the initiator to the responder and the preferred algorithm per security service is returned by the responder in a StatementCapabilities object. Afterwards, a StatementTransaction object is returned on both Initiator and Responder side. . Classes of algorithms are 0: Conventional krypto system 1: MAC algorithm 2: Method for making signatures 3: Method for verifying signatures 4: Method for public key encryption 5: Method for public key decryption 6: Hash functions 7: Method for key exchange
Parameters:
partnerId - is the name of the counterpart
servicePoint - is the thread on which the server is listening
serverAddress - the address of the server (responder side)
neededAlgs - is an arry of boolean. the i'th element is true if and only if the i'th class of algorithms above should be negotiated
ext_ref - external reference string sent by the peer
Returns:
An object corresponding to the session
Throws: StatementManException
if the transaction object could not be opened
Throws: ComPointException
in case of communication problems
Throws: NegotiationException
if the negotiation failed
See Also:
openInitiatorStatementSession
 o openInitiatorStatementSession
  public static StatementTransaction openInitiatorStatementSession(String partnerId,
                                                                   String serverAddress,
                                                                   boolean neededAlgs[],
                                                                   Vector options,
                                                                   String ext_ref) throws StatementManException, ComPointException, NegotiationException
Constructs a StatementTransaction object. Open a statement session, initiator side. Vectors of supported algorithms are collected for each type needed in the session. Based on the preference manager the preferred algorithm is first in the vector (this should be changed when different negotiation methods are available). Next the choice of algorithms is negotiated. The statement man recovers identifiers of keys and certificates corresponding to the chosen algorithms. Finally, if required the key exchange module is called to exchange a conventional session key. This key is stored in archive and its identifier stored as part of the context. Classes of algorithms are 0: Conventional krypto system 1: MAC algorithm 2: Method for making signatures 3: Method for verifying signatures 4: Method for public key encryption 5: Method for public key decryption 6: Hash functions 7: Method for key exchange
Parameters:
partnerId - is the name partner
serverAddress - the address of the server
neededAlgs - is an arry of boolean. the i'th element is true if and only if the i'th class of algorithms above should be negotiated
options - is a placeholder for security options (e.g., for communication)
ext_ref - external reference string sent by the peer
Returns:
A StatementTransaction object corresponding to the session
Throws: StatementManException
if the transaction object could not be opened
Throws: ComPointException
in case of communication problems
Throws: NegotiationException
if the negotiation failed
See Also:
StatementTransaction
 o openResponderStatementSession
  public static StatementTransaction openResponderStatementSession(String partnerId,
                                                                   String serverAddress,
                                                                   boolean neededAlgs[],
                                                                   Vector options,
                                                                   String ext_ref) throws StatementManException, ComPointException, NegotiationException
Open a statement session, responder side. A list of supported algorithms is received from the initiator, and the preferred algorithm per security service is returned in a StatementCapabilities object. Afterwards, a StatementTransaction object is returned. Classes of algorithms are 0: Conventional krypto system 1: MAC algorithm 2: Method for making signatures 3: Method for verifying signatures 4: Method for public key encryption 5: Method for public key decryption 6: Hash functions 7: Method for key exchange
Parameters:
partnerId - is the name of the counterpart
servicePoint - is the thread on which the server is listening
serverAddress - the address of the server (responder side)
neededAlgs - is an arry of boolean. the i'th element is true if and only if the i'th class of algorithms above should be negotiated
options - is a placeholder for security options (e.g., for communication)
ext_ref - external reference string sent by the peer
Returns:
An object corresponding to the session
Throws: StatementManException
if the transaction object could not be opened
Throws: ComPointException
in case of communication problems
Throws: NegotiationException
if the negotiation failed
See Also:
openInitiatorStatementSession
 o whichKeyExchanges
  public static Vector whichKeyExchanges()
Tell which methods for key exchange are supported.
Returns:
vector of Integer of supported methods
See Also:
whichAlgs
 o requestChoice
  public static Vector requestChoice(Vector array_of_values,
                                     ComPoint com_point,
                                     Vector options,
                                     String ext_ref) throws NegotiationException
Propose a list of values for the parameters and request the server to choose from it. Client and Server both input their own list of proposed values for the parameter. The server then picks the intersection ordered according to client's priority and returns the result
Parameters:
param_name - name of parameter.
param_class - class name of the values for this parameter.
peer_address - address of the peer manager.
list_of_values - list of acceptable values for the parameter.
options - a Vector (place holder to support security options).
ext_ref - external reference string.
Returns:
Vector containing values common to both client and server.
Throws: NegotiationException
on misc errors.
See Also:
choose
 o choose
  public static Vector choose(Vector array_of_values,
                              ComPoint com_point,
                              Vector options,
                              String ext_ref) throws NegotiationException
Select acceptable values from the list proposed by the client.
Parameters:
param_name - name of parameter.
param_class - class name of the values for this parameter.
my_address - local ComPoint address to listen in on.
list_of_values - list of acceptable values for the parameter.
options - a Vector (place holder to support security options).
a_ext_ref - one element array containing the external reference string (if the element is null on input, the incoming reference string will be returned in its place).
Returns:
Vector containing values common to both client and server.
Throws: NegotiationException
on misc errors.
See Also:
requestChoice
 o initConstString
  public static void initConstString()
Initialises the vector of descriptions of the available methods for key exchange
 o initConstInt
  public static void initConstInt()
Initialises the vector of integers of the available methods for key exchange
 o int2Str
  public static String int2Str(int elem)
Converts a constant to a string describing the constant. The conversion is based on two vectors which must have been initialised.
Parameters:
elem - is the integer constant
Returns:
string describning the constant (null if the constant is not defined)
See Also:
initConstString, initConstInt
 o str2Int
  public static int str2Int(String str)
Converts a String to a constant The conversion is based on two vectors which must have been initialised.
Parameters:
str - is the string constant
Returns:
the corresponding integer (0 if the str does not define a constant)
See Also:
initConstString, initConstInt

All Packages  Class Hierarchy  This Package  Previous  Next  Index