5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2005 - 2006 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;
31 SilcSKECallbacks callbacks;
35 /* Negotiated Security properties. May be NULL in case of error. */
36 SilcSKESecurityProperties prop;
38 /* Key Exchange payloads filled during key negotiation with
39 remote data. Responder may save local data here as well. */
40 SilcSKEStartPayload start_payload;
41 SilcSKEKEPayload ke1_payload;
42 SilcSKEKEPayload ke2_payload;
44 /* Temporary copy of the KE Start Payload used in the
46 SilcBuffer start_payload_copy;
48 /* Random number x, 1 < x < q. This is the secret exponent
49 used in Diffie Hellman computations. */
52 /* The secret shared key */
55 /* The hash value HASH of the key exchange */
59 char *version; /* Local version */
60 char *remote_version; /* Remote version */
62 SilcPublicKey public_key;
63 SilcPrivateKey private_key;
64 SilcSKEPKType pk_type;
66 SilcSKESecurityPropertyFlag flags;
67 SilcSKEKeyMaterial keymat;
68 SilcSKERekeyMaterial rekey;
69 SilcSchedule schedule;
71 SilcAsyncOperationStruct op;
72 SilcUInt16 session_port;
74 unsigned int aborted : 1;
75 unsigned int responder : 1;
78 #endif /* SILCSKE_I_H */