blob: 95e0f24ce73dbe046efc936025caa352cb95c5aa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
using System;
using Org.BouncyCastle.Math;
namespace 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 string ParticipantId
{
get { return participantId; }
}
public BigInteger MacTag
{
get { return macTag; }
}
}
}
|