moses.security
Class LGICert

java.lang.Object
  |
  +--moses.security.LGICert
All Implemented Interfaces:
java.io.Serializable

public class LGICert
extends java.lang.Object
implements java.io.Serializable

This class is the LGI own implementation of a digital certificate. A certificate, as used in LGI represents an object binding together the following elements:

  1. the public key of a certificate issuer
  2. the public key of a subject
  3. an attributes string that holds the attributes (or properties) of the subject
  4. the digital signature of the issuer, that binds the above elements together.
The signature are generated using the SHA/DSA signing algorithm, as implemented by java.security package. The public/private key pairs are DSA keys as well. This class is serializable, in order to allow for the transfer of certificates.

See Also:
Serialized Form

Constructor Summary
LGICert(java.security.PublicKey issuer, java.security.PublicKey subject, java.lang.String attributes, byte[] signature)
          LGI certificate constructor.
LGICert(java.security.PublicKey issuer, java.security.PublicKey subject, java.lang.String attributes, java.security.PrivateKey issuerPriv)
          LGI certificate constructor.
 
Method Summary
 java.lang.String getAttributes()
          Getter method.
 java.security.PublicKey getIssuer()
          Getter method.
 byte[] getSignature()
          Getter method.
 java.security.PublicKey getSubject()
          Getter method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LGICert

public LGICert(java.security.PublicKey issuer,
               java.security.PublicKey subject,
               java.lang.String attributes,
               byte[] signature)
LGI certificate constructor. It creates a certificate based on its arguments. The following list of parameters should be provided:

Parameters:
issuer - represents the public key of the certifying authority issuing this certificate.
subject - represents the public key of the subject of this certificate.
attributes - specifies an arbitrary string that represents the properties of the subject, as asserted by the issuer.
signature - represents the signature issued by the certifying authority binding the previous arguments together.

LGICert

public LGICert(java.security.PublicKey issuer,
               java.security.PublicKey subject,
               java.lang.String attributes,
               java.security.PrivateKey issuerPriv)
LGI certificate constructor. It creates a certificate based on its arguments. It is similar to the previous method, except that instead of a pre-computed signature it takes a private key as argument and it generates the signature on the spot. The following list of parameters should be provided:

Parameters:
issuer - represents the public key of the certifying authority issuing this certificate.
subject - represents the public key of the subject of this certificate.
attributes - specifies an arbitrary string that represents the properties of the subject, as asserted by the issuer.
issuerPriv - represents the private key of the issuer used to generate the signature of the certifying authority binding the previous arguments together.
Method Detail

getIssuer

public java.security.PublicKey getIssuer()
Getter method.

Returns:
returns the public key of the issuer of this certificate.

getSubject

public java.security.PublicKey getSubject()
Getter method.

Returns:
returns the public key of the subject of this certificate.

getAttributes

public java.lang.String getAttributes()
Getter method.

Returns:
the attributes of the subject of this certificate.

getSignature

public byte[] getSignature()
Getter method.

Returns:
the signature issued by the certifying authority.