Develop and Download Open Source Software

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5545 - (hide annotations) (download) (as text)
Mon Mar 17 16:06:58 2014 UTC (10 years ago) by yutakapon
Original Path: trunk/ttssh2/ttxssh/key.h
File MIME type: text/x-chdr
File size: 2924 byte(s)
チケット #33263
Curve25519楕円曲線DH(Diffe Hellman)アルゴリズムを使った鍵交換をサポートした。

svn+ssh://svn.sourceforge.jp/svnroot/ttssh2/branches/ssh_ed25519
ブランチからマージ。

現時点でサポートしている機能は下記の通り。

 ・Key Generatorで ED25519 鍵の作成
 ・Key Generatorで RSA/DSA/ECDSA 秘密鍵ファイルに bcrypt KDF を選択可能。
 ・ED25519 による公開鍵認証ログイン
 ・RSA(bcrypt KDF) による公開鍵認証ログイン
 ・DSA(bcrypt KDF) による公開鍵認証ログイン
 ・ECDSA(bcrypt KDF) による公開鍵認証ログイン
 ・Host Keyに ssh-ed25519 のサポート

1 maya 4304 /*
2     Copyright (c) 2011, TeraTerm Project
3     All rights reserved.
4    
5     Redistribution and use in source and binary forms, with or without modification,
6     are permitted provided that the following conditions are met:
7    
8     Redistributions of source code must retain the above copyright notice, this list of
9     conditions and the following disclaimer.
10    
11     Redistributions in binary form must reproduce the above copyright notice, this list
12     of conditions and the following disclaimer in the documentation and/or other materials
13     provided with the distribution.
14    
15     The name of Robert O'Callahan may not be used to endorse or promote products derived from
16     this software without specific prior written permission.
17    
18     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
19     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21     THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22     EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24     HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27     */
28    
29 yutakapon 5545 #ifndef __KEY_H_
30     #define __KEY_H_
31    
32 maya 4304 #include "ttxssh.h"
33 yutakapon 5545 #include "ed25519_crypto_api.h"
34 maya 4304
35 yutakapon 5545 #define ED25519_SK_SZ crypto_sign_ed25519_SECRETKEYBYTES
36     #define ED25519_PK_SZ crypto_sign_ed25519_PUBLICKEYBYTES
37    
38 maya 4307 int key_verify(Key *key,
39 maya 4304 unsigned char *signature, unsigned int signaturelen,
40     unsigned char *data, unsigned int datalen);
41     RSA *duplicate_RSA(RSA *src);
42     DSA *duplicate_DSA(DSA *src);
43 yutakapon 5545 unsigned char *duplicate_ED25519_PK(unsigned char *src);
44 maya 4307
45 doda 4531 char *key_fingerprint_raw(Key *k, enum fp_type dgst_type, int *dgst_raw_length);
46 maya 4307 char *key_fingerprint(Key *key, enum fp_rep dgst_rep);
47 maya 4304
48 yutakapon 5042 const char *ssh_key_type(const Key *k);
49 maya 4304 char *get_sshname_from_key(Key *key);
50     enum hostkey_type get_keytype_from_name(char *name);
51 maya 4378 char *curve_keytype_to_name(ssh_keytype type);
52 maya 4307
53 yutakapon 5545 Key *key_new_private(int type);
54     Key *key_new(int type);
55 maya 4307 void key_free(Key *key);
56 maya 4304 int key_to_blob(Key *key, char **blobp, int *lenp);
57     Key *key_from_blob(char *data, int blen);
58     BOOL get_SSH2_publickey_blob(PTInstVar pvar, buffer_t **blobptr, int *bloblen);
59 maya 4307 BOOL generate_SSH2_keysign(Key *keypair, char **sigptr, int *siglen, char *data, int datalen);
60 maya 4327
61 maya 4378 int kextype_to_cipher_nid(kex_algorithm type);
62     int keytype_to_hash_nid(ssh_keytype type);
63     int keytype_to_cipher_nid(ssh_keytype type);
64     ssh_keytype nid_to_keytype(int nid);
65 yutakapon 5545
66     void key_private_serialize(Key *key, buffer_t *b);
67     Key *key_private_deserialize(buffer_t *blob);
68    
69     #endif

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