Develop and Download Open Source Software

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9048 - (hide annotations) (download) (as text)
Wed Dec 16 12:24:13 2020 UTC (3 years, 3 months ago) by nmaya
File MIME type: text/x-chdr
File size: 3068 byte(s)
ソースファイルの著作権表記の "最後の発行の年" を削除

ticket #40996
1 maya 3227 /*
2 nmaya 9048 * (C) 2004- TeraTerm Project
3 doda 6841 * 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 3227
29 yutakapon 5496 #ifndef __ED25519_CRYPTO_API_H
30     #define __ED25519_CRYPTO_API_H
31 maya 3227
32 yutakapon 5498 #include <stdio.h>
33     #include <stdlib.h>
34 doda 6250 #include "arc4random.h"
35 yutakapon 5498
36 yutakapon 5516 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 yutakapon 5498
42 yutakapon 5516 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 yutakapon 5498
47 yutakapon 5496 typedef int crypto_int32;
48     typedef unsigned int crypto_uint32;
49 maya 3227
50 yutakapon 5496 #define randombytes(buf, buf_len) arc4random_buf((buf), (buf_len))
51 maya 3227
52 yutakapon 5496 #define crypto_hashblocks_sha512_STATEBYTES 64U
53     #define crypto_hashblocks_sha512_BLOCKBYTES 128U
54 yutakapon 4926
55 yutakapon 5496 int crypto_hashblocks_sha512(unsigned char *, const unsigned char *,
56     unsigned long long);
57 yutakapon 4926
58 yutakapon 5496 #define crypto_hash_sha512_BYTES 64U
59 yutakapon 4926
60 yutakapon 5496 int crypto_hash_sha512(unsigned char *, const unsigned char *,
61     unsigned long long);
62 yutakapon 4926
63 yutakapon 5496 int crypto_verify_32(const unsigned char *, const unsigned char *);
64 yutakapon 4926
65 yutakapon 5496 #define crypto_sign_ed25519_SECRETKEYBYTES 64U
66     #define crypto_sign_ed25519_PUBLICKEYBYTES 32U
67     #define crypto_sign_ed25519_BYTES 64U
68 yutakapon 4926
69 yutakapon 5496 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 yutakapon 4926
75 yutakapon 5516 int bcrypt_pbkdf(const char *, size_t, const u_int8_t *, size_t,
76     u_int8_t *, size_t, unsigned int);
77 yutakapon 5498
78 maya 3227 #endif

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