|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--moses.security.Secu
This class is a generic class providing a set of tools dealing with creation and verification of digital signatures, certificates, and hashes.
| Constructor Summary | |
Secu()
|
|
| Method Summary | |
static java.lang.String |
getHashOfKey(java.security.PublicKey pub)
This method is used to compute the secure MD5 hash of a public key. |
static byte[] |
sign(java.lang.String message,
java.security.PrivateKey Priv)
This method signs a message using a provided private key. |
static byte[] |
signCertificate(java.security.PublicKey issuer,
java.security.PublicKey subject,
java.lang.String attributes,
java.security.PrivateKey issuerPriv)
This method signs the components of a certificate. |
static byte[] |
signSelfCertificate(moses.security.LGICert c,
java.security.PrivateKey myKey)
This method signs a self certificate. |
static boolean |
verifyCertificate(moses.security.LGICert c)
This method is used to verify the integrity of a certificate. |
static int |
verifyControllerCert(moses.security.LGICert c,
byte[] sign)
This method verifies a controller's self-certificate. |
static int |
verifyControllerCert(moses.security.LGICert c,
byte[] sign,
java.security.PublicKey controllerAuPk)
This method verifies a controller's self-certificate. |
static boolean |
verifySelfCertificate(moses.security.LGICert c,
byte[] signature)
|
static boolean |
verifySignature(java.lang.String message,
java.security.PublicKey Pub,
byte[] signature)
This method is used to verify the authenticity of a digital signature. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Secu()
| Method Detail |
public static byte[] sign(java.lang.String message,
java.security.PrivateKey Priv)
message - represents the string to be signed.Priv - represents the private key used in signing the message.
public static boolean verifySignature(java.lang.String message,
java.security.PublicKey Pub,
byte[] signature)
message - represents the string whose signature is to be verified.Pub - represents the public key whose corresponding private key has been used originally in signing the message.signature - represents the signature to be verified.
public static byte[] signCertificate(java.security.PublicKey issuer,
java.security.PublicKey subject,
java.lang.String attributes,
java.security.PrivateKey issuerPriv)
issuer - represents the public key of the issuer of the certificate.subject - represents the public key of the subject.attributes - represents the attributes of the certificate.issuerPriv - represents the private key used for signing the certificate.
public static byte[] signSelfCertificate(moses.security.LGICert c,
java.security.PrivateKey myKey)
c - represents the LGI certificate object.myKey - represents the private key of the holder of the certificate.
public static boolean verifyCertificate(moses.security.LGICert c)
c - represents the certificate object to be verified.
public static boolean verifySelfCertificate(moses.security.LGICert c,
byte[] signature)
public static java.lang.String getHashOfKey(java.security.PublicKey pub)
pub - represents the public key to compute its hash.
public static int verifyControllerCert(moses.security.LGICert c,
byte[] sign,
java.security.PublicKey controllerAuPk)
c - represents the certificate to verify.sign - represents the self-signature over the certificate.controllerAuPk - public key of the desired certifying authority
public static int verifyControllerCert(moses.security.LGICert c,
byte[] sign)
c - represents the certificate to verify.sign - represents the self-signature over the certificate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||