Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/ttssh2/ttxssh/mac.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9255 - (show annotations) (download) (as text)
Wed May 19 14:11:26 2021 UTC (3 years ago) by nmaya
File MIME type: text/x-chdr
File size: 2451 byte(s)
SSH2 暗号化方式 chacha20-poly1305@openssh.com をサポート

merge from branches/ssh_chacha20poly1305
r9209, r9210, r9211, r9212, r9217, r9229, r9248, r9249, r9250, r9251, r9252, r9253
1 /*
2 * (C) 2021- 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
29 #ifndef SSHMAC_H
30 #define SSHMAC_H
31
32 #include "ttxssh.h"
33
34 struct SSH2Mac;
35
36 typedef enum {
37 HMAC_NONE, /* disabled line */
38 HMAC_SHA1,
39 HMAC_MD5,
40 HMAC_SHA1_96,
41 HMAC_MD5_96,
42 HMAC_RIPEMD160,
43 HMAC_SHA2_256,
44 HMAC_SHA2_256_96,
45 HMAC_SHA2_512,
46 HMAC_SHA2_512_96,
47 HMAC_SHA1_EtM,
48 HMAC_MD5_EtM,
49 HMAC_SHA1_96_EtM,
50 HMAC_MD5_96_EtM,
51 HMAC_RIPEMD160_EtM,
52 HMAC_SHA2_256_EtM,
53 HMAC_SHA2_512_EtM,
54 HMAC_IMPLICIT,
55 HMAC_UNKNOWN,
56 HMAC_MAX = HMAC_UNKNOWN,
57 } SSH2MacId;
58
59 char* get_ssh2_mac_name(const struct SSH2Mac *mac);
60 char* get_ssh2_mac_name_by_id(SSH2MacId id);
61 const EVP_MD* get_ssh2_mac_EVP_MD(const struct SSH2Mac *mac);
62 const struct SSH2Mac *get_ssh2_mac(SSH2MacId id);
63 int get_ssh2_mac_truncatebits(const struct SSH2Mac *mac);
64 int get_ssh2_mac_etm(const struct SSH2Mac *mac);
65 void normalize_mac_order(char *buf);
66 const struct SSH2Mac *choose_SSH2_mac_algorithm(char *server_proposal, char *my_proposal);
67 void SSH2_update_hmac_myproposal(PTInstVar pvar);
68
69 #endif /* SSHCMAC_H */

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