You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.8 KiB
56 lines
1.8 KiB
11 months ago
|
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||
|
#pragma warning disable
|
||
|
using System;
|
||
|
|
||
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||
|
|
||
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Agreement.JPake
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// The payload sent/received during the optional third round of a J-PAKE exchange,
|
||
|
/// which is for explicit key confirmation.
|
||
|
///
|
||
|
/// Each JPAKEParticipant creates and sends an instance
|
||
|
/// of this payload to the other JPAKEParticipant.
|
||
|
/// The payload to send should be created via
|
||
|
/// JPAKEParticipant#createRound3PayloadToSend(BigInteger)
|
||
|
///
|
||
|
/// Eeach JPAKEParticipant must also validate the payload
|
||
|
/// received from the other JPAKEParticipant.
|
||
|
/// The received payload should be validated via
|
||
|
/// JPAKEParticipant#validateRound3PayloadReceived(JPakeRound3Payload, BigInteger)
|
||
|
/// </summary>
|
||
|
public class JPakeRound3Payload
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// The id of the {@link JPAKEParticipant} who created/sent this payload.
|
||
|
/// </summary>
|
||
|
private readonly string participantId;
|
||
|
|
||
|
/// <summary>
|
||
|
/// The value of MacTag, as computed by round 3.
|
||
|
///
|
||
|
/// See JPAKEUtil#calculateMacTag(string, string, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, org.bouncycastle.crypto.Digest)
|
||
|
/// </summary>
|
||
|
private readonly BigInteger macTag;
|
||
|
|
||
|
public JPakeRound3Payload(string participantId, BigInteger magTag)
|
||
|
{
|
||
|
this.participantId = participantId;
|
||
|
this.macTag = magTag;
|
||
|
}
|
||
|
|
||
|
public virtual string ParticipantId
|
||
|
{
|
||
|
get { return participantId; }
|
||
|
}
|
||
|
|
||
|
public virtual BigInteger MacTag
|
||
|
{
|
||
|
get { return macTag; }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
#pragma warning restore
|
||
|
#endif
|