Class JadexJPakeParticipant


  • public class JadexJPakeParticipant
    extends org.bouncycastle.crypto.agreement.jpake.JPAKEParticipant
    Extends the JPAKEParticipant of Bouncy with some functionality.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected byte[] derivedkey
      The derived key.
      protected org.bouncycastle.crypto.Digest digest
      Digest.
      protected static char[] DUMMY_PW
      Empty password for initializing.
      protected static java.lang.reflect.Field JPAKE_PW_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

      Constructors 
      Constructor Description
      JadexJPakeParticipant​(java.lang.String participantid, java.lang.String password, org.bouncycastle.crypto.Digest digest)
      Create a participant.
      JadexJPakeParticipant​(java.lang.String participantid, org.bouncycastle.crypto.Digest digest)
      Create a participant.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.math.BigInteger calculateKeyingMaterial()
      Calculates keying material and derives key.
      void dispose()
      Disposes the exchange.
      protected void finalize()
      Override.
      byte[] getDerivedKey()
      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
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • JPAKE_PW_FIELD

        protected static final java.lang.reflect.Field JPAKE_PW_FIELD
        Field access for setting JPAKE password late.
      • DUMMY_PW

        protected static final char[] DUMMY_PW
        Empty password for initializing.
      • digest

        protected org.bouncycastle.crypto.Digest digest
        Digest.
      • derivedkey

        protected byte[] derivedkey
        The derived key.
    • Constructor Detail

      • JadexJPakeParticipant

        public JadexJPakeParticipant​(java.lang.String participantid,
                                     org.bouncycastle.crypto.Digest digest)
        Create a participant.
      • JadexJPakeParticipant

        public JadexJPakeParticipant​(java.lang.String participantid,
                                     java.lang.String password,
                                     org.bouncycastle.crypto.Digest digest)
        Create a participant.
    • Method Detail

      • calculateKeyingMaterial

        public java.math.BigInteger calculateKeyingMaterial()
        Calculates keying material and derives key.
        Overrides:
        calculateKeyingMaterial in class org.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.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Override.
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable