Develop and Download Open Source Software

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6841 - (show annotations) (download) (as text)
Tue Jul 4 15:02:28 2017 UTC (6 years, 9 months ago) by doda
File MIME type: text/x-chdr
File size: 3072 byte(s)
TeraTerm Project としてのライセンス表記を追加

・Tera Term 本体分を横 80 桁に収まるように改行位置を調整
・ttssh 関連の分を追加
1 /*
2 * (C) 2004-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
29 #ifndef __ED25519_CRYPTO_API_H
30 #define __ED25519_CRYPTO_API_H
31
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include "arc4random.h"
35
36 typedef unsigned char u_int8_t;
37 typedef unsigned short int u_int16_t;
38 typedef unsigned int u_int32_t;
39 typedef long long int int64_t;
40 typedef unsigned long long int u_int64_t;
41
42 typedef u_int8_t uint8_t;
43 typedef u_int16_t uint16_t;
44 typedef u_int32_t uint32_t;
45 typedef u_int64_t uint64_t;
46
47 typedef int crypto_int32;
48 typedef unsigned int crypto_uint32;
49
50 #define randombytes(buf, buf_len) arc4random_buf((buf), (buf_len))
51
52 #define crypto_hashblocks_sha512_STATEBYTES 64U
53 #define crypto_hashblocks_sha512_BLOCKBYTES 128U
54
55 int crypto_hashblocks_sha512(unsigned char *, const unsigned char *,
56 unsigned long long);
57
58 #define crypto_hash_sha512_BYTES 64U
59
60 int crypto_hash_sha512(unsigned char *, const unsigned char *,
61 unsigned long long);
62
63 int crypto_verify_32(const unsigned char *, const unsigned char *);
64
65 #define crypto_sign_ed25519_SECRETKEYBYTES 64U
66 #define crypto_sign_ed25519_PUBLICKEYBYTES 32U
67 #define crypto_sign_ed25519_BYTES 64U
68
69 int crypto_sign_ed25519(unsigned char *, unsigned long long *,
70 const unsigned char *, unsigned long long, const unsigned char *);
71 int crypto_sign_ed25519_open(unsigned char *, unsigned long long *,
72 const unsigned char *, unsigned long long, const unsigned char *);
73 int crypto_sign_ed25519_keypair(unsigned char *, unsigned char *);
74
75 int bcrypt_pbkdf(const char *, size_t, const u_int8_t *, size_t,
76 u_int8_t *, size_t, unsigned int);
77
78 #endif

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