Develop and Download Open Source Software

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5496 - (show annotations) (download) (as text)
Mon Mar 3 06:59:21 2014 UTC (10 years, 1 month ago) by yutakapon
Original Path: branches/ssh_ed25519/ttssh2/ttxssh/ed25519_ge25519.h
File MIME type: text/x-chdr
File size: 2653 byte(s)
Key Generator に ED25519 の定義を追加した。
鍵生成に必要となるモジュールの仮追加。

1 /*
2 Copyright (c) 2004-2014 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 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
16 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 */
26
27 #ifndef __ED25519_GE25519_H
28 #define __ED25519_GE25519_H
29
30 #include "ed25519_fe25519.h"
31 #include "ed25519_sc25519.h"
32
33 #define ge25519 crypto_sign_ed25519_ref_ge25519
34 #define ge25519_base crypto_sign_ed25519_ref_ge25519_base
35 #define ge25519_unpackneg_vartime crypto_sign_ed25519_ref_unpackneg_vartime
36 #define ge25519_pack crypto_sign_ed25519_ref_pack
37 #define ge25519_isneutral_vartime crypto_sign_ed25519_ref_isneutral_vartime
38 #define ge25519_double_scalarmult_vartime crypto_sign_ed25519_ref_double_scalarmult_vartime
39 #define ge25519_scalarmult_base crypto_sign_ed25519_ref_scalarmult_base
40
41 typedef struct
42 {
43 fe25519 x;
44 fe25519 y;
45 fe25519 z;
46 fe25519 t;
47 } ge25519;
48
49 const ge25519 ge25519_base;
50
51 int ge25519_unpackneg_vartime(ge25519 *r, const unsigned char p[32]);
52
53 void ge25519_pack(unsigned char r[32], const ge25519 *p);
54
55 int ge25519_isneutral_vartime(const ge25519 *p);
56
57 void ge25519_double_scalarmult_vartime(ge25519 *r, const ge25519 *p1, const sc25519 *s1, const ge25519 *p2, const sc25519 *s2);
58
59 void ge25519_scalarmult_base(ge25519 *r, const sc25519 *s);
60
61 #endif

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