5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2005 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
23 /* Length of cookie in Start Payload */
24 #define SILC_SKE_COOKIE_LEN 16
27 struct SilcSKEStruct {
28 SilcPacketStream stream;
30 SilcSKECallbacks callbacks;
34 /* Negotiated Security properties. May be NULL in case of error. */
35 SilcSKESecurityProperties prop;
37 /* Key Exchange payloads filled during key negotiation with
38 remote data. Responder may save local data here as well. */
39 SilcSKEStartPayload start_payload;
40 SilcSKEKEPayload ke1_payload;
41 SilcSKEKEPayload ke2_payload;
43 /* Temporary copy of the KE Start Payload used in the
45 SilcBuffer start_payload_copy;
47 /* Random number x, 1 < x < q. This is the secret exponent
48 used in Diffie Hellman computations. */
51 /* The secret shared key */
54 /* The hash value HASH of the key exchange */
58 char *version; /* Local version */
59 char *remote_version; /* Remote version */
61 SilcPublicKey public_key;
62 SilcPrivateKey private_key;
63 SilcSKEPKType pk_type;
65 SilcSKESecurityPropertyFlag flags;
66 SilcSKEKeyMaterial keymat;
67 SilcSKERekeyMaterial rekey;
68 SilcSchedule schedule;
70 SilcAsyncOperationStruct op;
72 unsigned int aborted : 1;
73 unsigned int responder : 1;
76 #endif /* SILCSKE_I_H */