Свойство | Type | Description | |
---|---|---|---|
STATE_INITIALIZED | int | ||
STATE_KEY_CALCULATED | int | ||
STATE_ROUND_1_CREATED | int | ||
STATE_ROUND_1_VALIDATED | int | ||
STATE_ROUND_2_CREATED | int | ||
STATE_ROUND_2_VALIDATED | int | ||
STATE_ROUND_3_CREATED | int | ||
STATE_ROUND_3_VALIDATED | int |
Méthode | Description | |
---|---|---|
CalculateKeyingMaterial ( ) : BigInteger |
Calculates and returns the key material. A session key must be derived from this key material using a secure key derivation function (KDF). The KDF used to derive the key is handled externally (i.e. not by JPakeParticipant). The keying material will be identical for each participant if and only if each participant's password is the same. i.e. If the participants do not share the same password, then each participant will derive a different key. Therefore, if you immediately start using a key derived from the keying material, then you must handle detection of incorrect keys. If you want to handle this detection explicitly, you can optionally perform rounds 3 and 4. See JPakeParticipant for details on how to execute rounds 3 and 4. The keying material will be in the range [0, p-1]. ValidateRound2PayloadReceived(JPakeRound2Payload) must be called prior to this method. As a side effect, the internal password array is cleared, since it is no longer needed. After execution, the State state will be STATE_KEY_CALCULATED. Throws InvalidOperationException if called prior to ValidateRound2PayloadReceived(JPakeRound2Payload), or if called multiple times.
|
|
CreateRound1PayloadToSend ( ) : Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound1Payload |
Creates and returns the payload to send to the other participant during round 1. After execution, the State state} will be STATE_ROUND_1_CREATED}.
|
|
CreateRound2PayloadToSend ( ) : Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound2Payload |
Creates and returns the payload to send to the other participant during round 2. ValidateRound1PayloadReceived(JPakeRound1Payload) must be called prior to this method. After execution, the State state will be STATE_ROUND_2_CREATED. Throws InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times
|
|
CreateRound3PayloadToSend ( BigInteger keyingMaterial ) : Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound3Payload |
Creates and returns the payload to send to the other participant during round 3. See JPakeParticipant for more details on round 3. After execution, the State state} will be STATE_ROUND_3_CREATED. Throws InvalidOperationException if called prior to CalculateKeyingMaterial, or multiple times.
|
|
JPakeParticipant ( string participantId, Array password ) : System |
Convenience constructor for a new JPakeParticipant that uses the JPakePrimeOrderGroups#NIST_3072 prime order group, a SHA-256 digest, and a default SecureRandom implementation. After construction, the State state will be STATE_INITIALIZED. Throws NullReferenceException if any argument is null. Throws ArgumentException if password is empty.
|
|
JPakeParticipant ( string participantId, Array password, Org.BouncyCastle.Crypto.Agreement.JPake.JPakePrimeOrderGroup group ) : System |
Convenience constructor for a new JPakeParticipant that uses a SHA-256 digest, and a default SecureRandom implementation. After construction, the State state will be STATE_INITIALIZED. Throws NullReferenceException if any argument is null. Throws ArgumentException if password is empty.
|
|
JPakeParticipant ( string participantId, Array password, Org.BouncyCastle.Crypto.Agreement.JPake.JPakePrimeOrderGroup group, IDigest digest, SecureRandom random ) : System |
Constructor for a new JPakeParticipant. After construction, the State state will be STATE_INITIALIZED. Throws NullReferenceException if any argument is null. Throws ArgumentException if password is empty.
|
|
ValidateRound1PayloadReceived ( Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound1Payload round1PayloadReceived ) : void |
Validates the payload received from the other participant during round 1. Must be called prior to CreateRound2PayloadToSend(). After execution, the State state will be STATE_ROUND_1_VALIDATED. Throws CryptoException if validation fails. Throws InvalidOperationException if called multiple times.
|
|
ValidateRound2PayloadReceived ( Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound2Payload round2PayloadReceived ) : void |
Validates the payload received from the other participant during round 2. Note that this DOES NOT detect a non-common password. The only indication of a non-common password is through derivation of different keys (which can be detected explicitly by executing round 3 and round 4) Must be called prior to CalculateKeyingMaterial(). After execution, the State state will be STATE_ROUND_2_VALIDATED. Throws CryptoException if validation fails. Throws InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times
|
|
ValidateRound3PayloadReceived ( Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound3Payload round3PayloadReceived, BigInteger keyingMaterial ) : void |
Validates the payload received from the other participant during round 3. See JPakeParticipant for more details on round 3. After execution, the State state will be STATE_ROUND_3_VALIDATED. Throws CryptoException if validation fails. Throws InvalidOperationException if called prior to CalculateKeyingMaterial or multiple times
|
public CalculateKeyingMaterial ( ) : BigInteger | ||
Résultat | BigInteger |
public CreateRound1PayloadToSend ( ) : Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound1Payload | ||
Résultat | Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound1Payload |
public CreateRound2PayloadToSend ( ) : Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound2Payload | ||
Résultat | Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound2Payload |
public CreateRound3PayloadToSend ( BigInteger keyingMaterial ) : Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound3Payload | ||
keyingMaterial | BigInteger | The keying material as returned from CalculateKeyingMaterial(). |
Résultat | Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound3Payload |
public JPakeParticipant ( string participantId, Array password ) : System | ||
participantId | string | Unique identifier of this participant. /// The two participants in the exchange must NOT share the same id. |
password | Array | Shared secret. /// A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called). /// Caller should clear the input password as soon as possible. |
Résultat | System |
public JPakeParticipant ( string participantId, Array password, Org.BouncyCastle.Crypto.Agreement.JPake.JPakePrimeOrderGroup group ) : System | ||
participantId | string | Unique identifier of this participant. /// The two participants in the exchange must NOT share the same id. |
password | Array | Shared secret. /// A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called). /// Caller should clear the input password as soon as possible. |
group | Org.BouncyCastle.Crypto.Agreement.JPake.JPakePrimeOrderGroup | Prime order group. See JPakePrimeOrderGroups for standard groups. |
Résultat | System |
public JPakeParticipant ( string participantId, Array password, Org.BouncyCastle.Crypto.Agreement.JPake.JPakePrimeOrderGroup group, IDigest digest, SecureRandom random ) : System | ||
participantId | string | Unique identifier of this participant. /// The two participants in the exchange must NOT share the same id. |
password | Array | Shared secret. /// A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called). /// Caller should clear the input password as soon as possible. |
group | Org.BouncyCastle.Crypto.Agreement.JPake.JPakePrimeOrderGroup | Prime order group. See JPakePrimeOrderGroups for standard groups. |
digest | IDigest | Digest to use during zero knowledge proofs and key confirmation /// (SHA-256 or stronger preferred). |
random | SecureRandom | Source of secure random data for x1 and x2, and for the zero knowledge proofs. |
Résultat | System |
public ValidateRound1PayloadReceived ( Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound1Payload round1PayloadReceived ) : void | ||
round1PayloadReceived | Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound1Payload | |
Résultat | void |
public ValidateRound2PayloadReceived ( Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound2Payload round2PayloadReceived ) : void | ||
round2PayloadReceived | Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound2Payload | |
Résultat | void |
public ValidateRound3PayloadReceived ( Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound3Payload round3PayloadReceived, BigInteger keyingMaterial ) : void | ||
round3PayloadReceived | Org.BouncyCastle.Crypto.Agreement.JPake.JPakeRound3Payload | The round 3 payload received from the other participant. |
keyingMaterial | BigInteger | The keying material as returned from CalculateKeyingMaterial(). |
Résultat | void |
public static int STATE_KEY_CALCULATED | ||
Résultat | int |
public static int STATE_ROUND_1_CREATED | ||
Résultat | int |
public static int STATE_ROUND_1_VALIDATED | ||
Résultat | int |
public static int STATE_ROUND_2_CREATED | ||
Résultat | int |
public static int STATE_ROUND_2_VALIDATED | ||
Résultat | int |
public static int STATE_ROUND_3_CREATED | ||
Résultat | int |