|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.crypto.Crypto
de.upb.swtpra05.group03.crypto.AliceCrypto
crypto class used for the 'alice' role known from DiffieHellman example
| Field Summary | |
private javax.crypto.KeyAgreement |
keyAgree
object used for the key agreement |
private static boolean |
SKIP_PARAM_GENERATION
use pregenerated modulus and base |
private static java.math.BigInteger |
skip1024Base
The base used with the SKIP 1024 bit modulus |
private static java.math.BigInteger |
skip1024Modulus
The SKIP 1024 bit modulus |
private static byte[] |
skip1024ModulusBytes
The 1024 bit Diffie-Hellman modulus values used by SKIP |
| Fields inherited from class de.upb.swtpra05.group03.crypto.Crypto |
AGREEMENT_ALGORITHM, CIPHER_ALGORITHM, KEY_ALGORITHM, pubKeyFactory, SIGNATURE_ALGORITHM, signer, state, STATE_INIT, STATE_READY, STATE_WAITING, verifyer |
| Constructor Summary | |
AliceCrypto()
Constructor |
|
| Method Summary | |
DataSigPair |
generatePublicKey()
generates a public key for the key agreement |
void |
generateSecretKey(DataSigPair dsp)
generates the secret key by using the others public key for the key agreement |
| Methods inherited from class de.upb.swtpra05.group03.crypto.Crypto |
decryptObject, encryptObject, genPublicKeyFromX509, getSecretKey, isReady, loadSigningKeys, reset, setSecretKey, setSecretKey, sign, verify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final boolean SKIP_PARAM_GENERATION
private final javax.crypto.KeyAgreement keyAgree
private static final byte[] skip1024ModulusBytes
private static final java.math.BigInteger skip1024Modulus
private static final java.math.BigInteger skip1024Base
| Constructor Detail |
public AliceCrypto()
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException
javax.crypto.NoSuchPaddingException
java.security.NoSuchAlgorithmException| Method Detail |
public DataSigPair generatePublicKey()
throws java.security.NoSuchAlgorithmException,
java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException,
java.security.SignatureException,
java.security.spec.InvalidParameterSpecException
java.security.NoSuchAlgorithmException
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
java.security.SignatureException
java.security.spec.InvalidParameterSpecException
public void generateSecretKey(DataSigPair dsp)
throws java.security.SignatureException,
java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException,
java.security.InvalidKeyException,
java.lang.IllegalStateException
dsp - object containing key and signature
java.security.SignatureException
java.security.NoSuchAlgorithmException
java.security.spec.InvalidKeySpecException
java.lang.IllegalStateException
java.security.InvalidKeyException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||