Class JadexJPakeParticipant
java.lang.Object
org.bouncycastle.crypto.agreement.jpake.JPAKEParticipant
jadex.ipc.impl.security.authentication.JadexJPakeParticipant
public class JadexJPakeParticipant
extends org.bouncycastle.crypto.agreement.jpake.JPAKEParticipant
Extends the JPAKEParticipant of Bouncy with some functionality.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]
The derived key.protected org.bouncycastle.crypto.Digest
Digest.protected static final char[]
Empty password for initializing.protected static final Field
Field access for setting JPAKE password late.Fields inherited from class org.bouncycastle.crypto.agreement.jpake.JPAKEParticipant
STATE_INITIALIZED, STATE_KEY_CALCULATED, STATE_ROUND_1_CREATED, STATE_ROUND_1_VALIDATED, STATE_ROUND_2_CREATED, STATE_ROUND_2_VALIDATED, STATE_ROUND_3_CREATED, STATE_ROUND_3_VALIDATED
-
Constructor Summary
ConstructorsConstructorDescriptionJadexJPakeParticipant
(String participantid, String password, org.bouncycastle.crypto.Digest digest) Create a participant.JadexJPakeParticipant
(String participantid, org.bouncycastle.crypto.Digest digest) Create a participant. -
Method Summary
Modifier and TypeMethodDescriptionCalculates keying material and derives key.void
dispose()
Disposes the exchange.byte[]
Returns the derived key.void
setPassword
(byte[] password) Sets the password after round 1.Methods inherited from class org.bouncycastle.crypto.agreement.jpake.JPAKEParticipant
createRound1PayloadToSend, createRound2PayloadToSend, createRound3PayloadToSend, getState, validateRound1PayloadReceived, validateRound2PayloadReceived, validateRound3PayloadReceived
-
Field Details
-
JPAKE_PW_FIELD
Field access for setting JPAKE password late. -
DUMMY_PW
protected static final char[] DUMMY_PWEmpty password for initializing. -
digest
protected org.bouncycastle.crypto.Digest digestDigest. -
derivedkey
protected byte[] derivedkeyThe derived key.
-
-
Constructor Details
-
Method Details
-
calculateKeyingMaterial
Calculates keying material and derives key.- Overrides:
calculateKeyingMaterial
in classorg.bouncycastle.crypto.agreement.jpake.JPAKEParticipant
-
getDerivedKey
public byte[] getDerivedKey()Returns the derived key.- Returns:
- The derived key.
-
setPassword
public void setPassword(byte[] password) Sets the password after round 1.- Parameters:
password
- The password.
-
dispose
public void dispose()Disposes the exchange.
-