author | Nikita Kozlov <nikita@mbdsys.com> |
Tue, 07 Dec 2010 22:57:56 +0100 | |
changeset 815 | ca323cff3ac9 |
parent 810 | 0ff0059f2ec3 |
permissions | -rw-r--r-- |
810
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
1 |
package net.java.otr4j.session; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
2 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
3 |
import java.math.BigInteger; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
4 |
import java.security.KeyPair; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
5 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
6 |
import javax.crypto.interfaces.DHPublicKey; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
7 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
8 |
import net.java.otr4j.OtrException; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
9 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
10 |
interface SessionKeys { |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
11 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
12 |
public static final int Previous = 0; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
13 |
public static final int Current = 1; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
14 |
public static final byte HIGH_SEND_BYTE = (byte) 0x01; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
15 |
public static final byte HIGH_RECEIVE_BYTE = (byte) 0x02; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
16 |
public static final byte LOW_SEND_BYTE = (byte) 0x02; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
17 |
public static final byte LOW_RECEIVE_BYTE = (byte) 0x01; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
18 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
19 |
public abstract void setLocalPair(KeyPair keyPair, int localPairKeyID); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
20 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
21 |
public abstract void setRemoteDHPublicKey(DHPublicKey pubKey, |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
22 |
int remoteKeyID); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
23 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
24 |
public abstract void incrementSendingCtr(); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
25 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
26 |
public abstract byte[] getSendingCtr(); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
27 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
28 |
public abstract byte[] getReceivingCtr(); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
29 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
30 |
public abstract void setReceivingCtr(byte[] ctr); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
31 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
32 |
public abstract byte[] getSendingAESKey() throws OtrException; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
33 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
34 |
public abstract byte[] getReceivingAESKey() throws OtrException; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
35 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
36 |
public abstract byte[] getSendingMACKey() throws OtrException; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
37 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
38 |
public abstract byte[] getReceivingMACKey() throws OtrException; |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
39 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
40 |
public abstract void setS(BigInteger s); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
41 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
42 |
public abstract void setIsUsedReceivingMACKey(Boolean isUsedReceivingMACKey); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
43 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
44 |
public abstract Boolean getIsUsedReceivingMACKey(); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
45 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
46 |
public abstract int getLocalKeyID(); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
47 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
48 |
public abstract int getRemoteKeyID(); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
49 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
50 |
public abstract DHPublicKey getRemoteKey(); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
51 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
52 |
public abstract KeyPair getLocalPair(); |
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
53 |
|
0ff0059f2ec3
initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff
changeset
|
54 |
} |