Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 [scriptable, uuid(5ab02a98-5122-4b90-93cd-f259c4b42e3a)]
8 interface nsISyncJPAKE : nsISupports
9 {
10 /**
11 * Perform first round of the JPAKE exchange.
12 *
13 * @param aSignerID
14 * String identifying the signer.
15 * @param aGX1
16 * Schnorr signature value g^x1, in hex representation.
17 * @param aGV1
18 * Schnorr signature value g^v1 (v1 is a random value), in hex
19 * representation.
20 * @param aR1
21 * Schnorr signature value r1 = v1 - x1 * h, in hex representation.
22 * @param aGX2
23 * Schnorr signature value g^x2, in hex representation.
24 * @param aGV2
25 * Schnorr signature value g^v2 (v2 is a random value), in hex
26 * representation.
27 * @param aR2
28 * Schnorr signature value r2 = v2 - x2 * h, in hex representation.
29 */
30 void round1(in ACString aSignerID,
31 out ACString aGX1,
32 out ACString aGV1,
33 out ACString aR1,
34 out ACString aGX2,
35 out ACString aGV2,
36 out ACString aR2);
38 /**
39 * Perform second round of the JPAKE exchange.
40 *
41 * @param aPeerID
42 * String identifying the peer.
43 * @param aPIN
44 * String containing the weak secret (PIN).
45 * @param aGX3
46 * Schnorr signature value g^x3, in hex representation.
47 * @param aGV3
48 * Schnorr signature value g^v3 (v3 is a random value), in hex
49 * representation.
50 * @param aR3
51 * Schnorr signature value r3 = v3 - x3 * h, in hex representation.
52 * @param aGX4
53 * Schnorr signature value g^x4, in hex representation.
54 * @param aGV4
55 * Schnorr signature value g^v4 (v4 is a random value), in hex
56 * representation.
57 * @param aR4
58 * Schnorr signature value r4 = v4 - x4 * h, in hex representation.
59 * @param aA
60 * Schnorr signature value A, in hex representation.
61 * @param aGVA
62 * Schnorr signature value g^va (va is a random value), in hex
63 * representation.
64 * @param aRA
65 * Schnorr signature value ra = va - xa * h, in hex representation.
66 */
67 void round2(in ACString aPeerID,
68 in ACString aPIN,
69 in ACString aGX3,
70 in ACString aGV3,
71 in ACString aR3,
72 in ACString aGX4,
73 in ACString aGV4,
74 in ACString aR4,
75 out ACString aA,
76 out ACString aGVA,
77 out ACString aRA);
79 /**
80 * Perform the final step of the JPAKE exchange. This will compute
81 * the key and expand the key to two keys, an AES256 encryption key
82 * and a 256 bit HMAC key. It returns a key confirmation value
83 * (SHA256d of the key) and the encryption and HMAC keys.
84 *
85 * @param aB
86 * Schnorr signature value B, in hex representation.
87 * @param aGVB
88 * Schnorr signature value g^vb (vb is a random value), in hex
89 * representation.
90 * @param aRB
91 * Schnorr signature value rb = vb - xb * h, in hex representation.
92 * @param aAES256Key
93 * The AES 256 encryption key, in base64 representation.
94 * @param aHMAC256Key
95 * The 256 bit HMAC key, in base64 representation.
96 */
97 void final(in ACString aB,
98 in ACString aGVB,
99 in ACString aRB,
100 in ACString aHkdfInfo,
101 out ACString aAES256Key,
102 out ACString aHMAC256Key);
103 };