1 package net.java.otr4j.session; |
|
2 |
|
3 import java.math.BigInteger; |
|
4 import java.security.KeyPair; |
|
5 |
|
6 import javax.crypto.interfaces.DHPublicKey; |
|
7 |
|
8 import net.java.otr4j.OtrException; |
|
9 |
|
10 interface SessionKeys { |
|
11 |
|
12 public static final int Previous = 0; |
|
13 public static final int Current = 1; |
|
14 public static final byte HIGH_SEND_BYTE = (byte) 0x01; |
|
15 public static final byte HIGH_RECEIVE_BYTE = (byte) 0x02; |
|
16 public static final byte LOW_SEND_BYTE = (byte) 0x02; |
|
17 public static final byte LOW_RECEIVE_BYTE = (byte) 0x01; |
|
18 |
|
19 public abstract void setLocalPair(KeyPair keyPair, int localPairKeyID); |
|
20 |
|
21 public abstract void setRemoteDHPublicKey(DHPublicKey pubKey, |
|
22 int remoteKeyID); |
|
23 |
|
24 public abstract void incrementSendingCtr(); |
|
25 |
|
26 public abstract byte[] getSendingCtr(); |
|
27 |
|
28 public abstract byte[] getReceivingCtr(); |
|
29 |
|
30 public abstract void setReceivingCtr(byte[] ctr); |
|
31 |
|
32 public abstract byte[] getSendingAESKey() throws OtrException; |
|
33 |
|
34 public abstract byte[] getReceivingAESKey() throws OtrException; |
|
35 |
|
36 public abstract byte[] getSendingMACKey() throws OtrException; |
|
37 |
|
38 public abstract byte[] getReceivingMACKey() throws OtrException; |
|
39 |
|
40 public abstract void setS(BigInteger s); |
|
41 |
|
42 public abstract void setIsUsedReceivingMACKey(Boolean isUsedReceivingMACKey); |
|
43 |
|
44 public abstract Boolean getIsUsedReceivingMACKey(); |
|
45 |
|
46 public abstract int getLocalKeyID(); |
|
47 |
|
48 public abstract int getRemoteKeyID(); |
|
49 |
|
50 public abstract DHPublicKey getRemoteKey(); |
|
51 |
|
52 public abstract KeyPair getLocalPair(); |
|
53 |
|
54 } |
|