Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/kex.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7027 - (hide annotations) (download) (as text)
Thu Jan 25 12:22:02 2018 UTC (6 years, 2 months ago) by doda
Original Path: trunk/ttssh2/ttxssh/kex.h
File MIME type: text/x-chdr
File size: 4191 byte(s)
GEX 関連の定数名を変更

GETX_GRP_MINSIZE -> GEX_GRP_LIMIT_MIN
GETX_GRP_MAXSIZE -> GEX_GRP_LIMIT_MAX

全体としての下限/上限である事をわかりやすくする為。
GEX には SSH_MSG_KEY_DH_GEX_REQUEST での min, max があり、
これとの混同を避けたい。
これらの値そのものではなく、これらの値がとれる LIMIT という事を
表したかった。
1 maya 4304 /*
2 doda 6841 * (C) 2011-2017 TeraTerm Project
3     * All rights reserved.
4     *
5     * Redistribution and use in source and binary forms, with or without
6     * modification, are permitted provided that the following conditions
7     * are met:
8     *
9     * 1. Redistributions of source code must retain the above copyright
10     * notice, this list of conditions and the following disclaimer.
11     * 2. Redistributions in binary form must reproduce the above copyright
12     * notice, this list of conditions and the following disclaimer in the
13     * documentation and/or other materials provided with the distribution.
14     * 3. The name of the author may not be used to endorse or promote products
15     * derived from this software without specific prior written permission.
16     *
17     * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
18     * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19     * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20     * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21     * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22     * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23     * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24     * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25     * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26     * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27     */
28 maya 4304
29     #include "ttxssh.h"
30    
31 doda 7027 // SSH_MSG_KEY_DH_GEX_REQUEST ���� min, n, max ��������������������/���� (RFC 4419)
32     #define GEX_GRP_LIMIT_MIN 1024
33     #define GEX_GRP_LIMIT_MAX 8192
34 doda 5900
35 maya 4304 DH *dh_new_group1(void);
36     DH *dh_new_group14(void);
37 doda 6263 DH *dh_new_group15(void);
38     DH *dh_new_group16(void);
39 doda 6310 DH *dh_new_group17(void);
40     DH *dh_new_group18(void);
41 maya 4304 void dh_gen_key(PTInstVar pvar, DH *dh, int we_need /* bytes */ );
42     int dh_estimate(int bits);
43    
44 doda 6263 unsigned char *kex_dh_hash(const EVP_MD *evp_md,
45     char *client_version_string,
46 maya 4304 char *server_version_string,
47     char *ckexinit, int ckexinitlen,
48     char *skexinit, int skexinitlen,
49     u_char *serverhostkeyblob, int sbloblen,
50     BIGNUM *client_dh_pub,
51     BIGNUM *server_dh_pub,
52 maya 4305 BIGNUM *shared_secret,
53     unsigned int *hashlen);
54     unsigned char *kex_dh_gex_hash(const EVP_MD *evp_md,
55     char *client_version_string,
56 maya 4304 char *server_version_string,
57     char *ckexinit, int ckexinitlen,
58     char *skexinit, int skexinitlen,
59     u_char *serverhostkeyblob, int sbloblen,
60     int kexgex_min,
61     int kexgex_bits,
62     int kexgex_max,
63     BIGNUM *kexgex_p,
64     BIGNUM *kexgex_g,
65     BIGNUM *client_dh_pub,
66     BIGNUM *server_dh_pub,
67 maya 4305 BIGNUM *shared_secret,
68     unsigned int *hashlen);
69 maya 4314 unsigned char *kex_ecdh_hash(const EVP_MD *evp_md,
70     const EC_GROUP *ec_group,
71     char *client_version_string,
72     char *server_version_string,
73     char *ckexinit, int ckexinitlen,
74     char *skexinit, int skexinitlen,
75     u_char *serverhostkeyblob, int sbloblen,
76     const EC_POINT *client_dh_pub,
77     const EC_POINT *server_dh_pub,
78     BIGNUM *shared_secret,
79     unsigned int *hashlen);
80 maya 4304
81     int dh_pub_is_valid(DH *dh, BIGNUM *dh_pub);
82     void kex_derive_keys(PTInstVar pvar, int need, u_char *hash, BIGNUM *shared_secret,
83     char *session_id, int session_id_len);

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26