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 5498 - (hide annotations) (download) (as text)
Mon Mar 3 10:43:32 2014 UTC (10 years, 1 month ago) by yutakapon
Original Path: branches/ssh_ed25519/ttssh2/ttxssh/ed25519_crypto_api.h
File MIME type: text/x-chdr
File size: 2983 byte(s)
コンパイル通し。

1 maya 3227 /*
2 yutakapon 5496 Copyright (c) 2004-2014 TeraTerm Project
3 maya 3227 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 yutakapon 4926 1. Redistributions of source code must retain the above copyright notice,
9     this list of conditions and the following disclaimer.
10     2. Redistributions in binary form must reproduce the above copyright notice,
11     this list of conditions and the following disclaimer in the documentation
12     and/or other materials provided with the distribution.
13     3. The name of the author may not be used to endorse or promote products derived
14     from this software without specific prior written permission.
15 maya 3227
16 yutakapon 4926 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
17     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19     DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20     BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
21     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
24     OF SUCH DAMAGE.
25 maya 3227 */
26    
27 yutakapon 5496 #ifndef __ED25519_CRYPTO_API_H
28     #define __ED25519_CRYPTO_API_H
29 maya 3227
30 yutakapon 5498 #include <stdio.h>
31     #include <stdlib.h>
32    
33     typedef unsigned char u_int8_t;
34     typedef unsigned short int u_int16_t;
35     typedef unsigned int u_int32_t;
36     typedef long long int int64_t;
37     typedef unsigned long long int u_int64_t;
38    
39     typedef u_int8_t uint8_t;
40     typedef u_int16_t uint16_t;
41     typedef u_int32_t uint32_t;
42     typedef u_int64_t uint64_t;
43    
44 yutakapon 5496 typedef int crypto_int32;
45     typedef unsigned int crypto_uint32;
46 maya 3227
47 yutakapon 5496 #define randombytes(buf, buf_len) arc4random_buf((buf), (buf_len))
48 maya 3227
49 yutakapon 5496 #define crypto_hashblocks_sha512_STATEBYTES 64U
50     #define crypto_hashblocks_sha512_BLOCKBYTES 128U
51 yutakapon 4926
52 yutakapon 5496 int crypto_hashblocks_sha512(unsigned char *, const unsigned char *,
53     unsigned long long);
54 yutakapon 4926
55 yutakapon 5496 #define crypto_hash_sha512_BYTES 64U
56 yutakapon 4926
57 yutakapon 5496 int crypto_hash_sha512(unsigned char *, const unsigned char *,
58     unsigned long long);
59 yutakapon 4926
60 yutakapon 5496 int crypto_verify_32(const unsigned char *, const unsigned char *);
61 yutakapon 4926
62 yutakapon 5496 #define crypto_sign_ed25519_SECRETKEYBYTES 64U
63     #define crypto_sign_ed25519_PUBLICKEYBYTES 32U
64     #define crypto_sign_ed25519_BYTES 64U
65 yutakapon 4926
66 yutakapon 5496 int crypto_sign_ed25519(unsigned char *, unsigned long long *,
67     const unsigned char *, unsigned long long, const unsigned char *);
68     int crypto_sign_ed25519_open(unsigned char *, unsigned long long *,
69     const unsigned char *, unsigned long long, const unsigned char *);
70     int crypto_sign_ed25519_keypair(unsigned char *, unsigned char *);
71 yutakapon 4926
72 yutakapon 5498 int bcrypt_pbkdf(const char *, size_t, const u_int8_t *, size_t,
73     u_int8_t *, size_t, unsigned int);
74    
75 maya 3227 #endif

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