comparison kex.h @ 801:7dcb46da72d9 ecc

merge in HEAD
author Matt Johnston <matt@ucc.asn.au>
date Tue, 21 May 2013 12:09:35 +0800
parents 76fba0856749 3062da90dab8
children 6c69e7df3621
comparison
equal deleted inserted replaced
799:c344607b7341 801:7dcb46da72d9
59 59
60 struct KEXState { 60 struct KEXState {
61 61
62 unsigned sentkexinit : 1; /*set when we've sent/recv kexinit packet */ 62 unsigned sentkexinit : 1; /*set when we've sent/recv kexinit packet */
63 unsigned recvkexinit : 1; 63 unsigned recvkexinit : 1;
64 unsigned firstfollows : 1; /* true when first_kex_packet_follows is set */ 64 unsigned them_firstfollows : 1; /* true when first_kex_packet_follows is set */
65 unsigned sentnewkeys : 1; /* set once we've send MSG_NEWKEYS (will be cleared once we have also received */ 65 unsigned sentnewkeys : 1; /* set once we've send MSG_NEWKEYS (will be cleared once we have also received */
66 unsigned recvnewkeys : 1; /* set once we've received MSG_NEWKEYS (cleared once we have also sent */ 66 unsigned recvnewkeys : 1; /* set once we've received MSG_NEWKEYS (cleared once we have also sent */
67 67
68 unsigned donefirstkex : 1; /* Set to 1 after the first kex has completed, 68 unsigned donefirstkex : 1; /* Set to 1 after the first kex has completed,
69 ie the transport layer has been set up */ 69 ie the transport layer has been set up */
70
71 unsigned our_first_follows_matches : 1;
70 72
71 time_t lastkextime; /* time of the last kex */ 73 time_t lastkextime; /* time of the last kex */
72 unsigned int datatrans; /* data transmitted since last kex */ 74 unsigned int datatrans; /* data transmitted since last kex */
73 unsigned int datarecv; /* data received since last kex */ 75 unsigned int datarecv; /* data received since last kex */
74 76
78 extern const unsigned char dh_p_1[DH_P_1_LEN]; 80 extern const unsigned char dh_p_1[DH_P_1_LEN];
79 #define DH_P_14_LEN 256 81 #define DH_P_14_LEN 256
80 extern const unsigned char dh_p_14[DH_P_14_LEN]; 82 extern const unsigned char dh_p_14[DH_P_14_LEN];
81 83
82 struct kex_dh_param { 84 struct kex_dh_param {
83 mp_int pub; 85 mp_int pub; /* e */
84 mp_int priv; 86 mp_int priv; /* x */
85 }; 87 };
86 88
87 #ifdef DROPBEAR_ECDH 89 #ifdef DROPBEAR_ECDH
88 struct kex_ecdh_param { 90 struct kex_ecdh_param {
89 ecc_key key; 91 ecc_key key;