diff options
author | Damien Miller <djm@mindrot.org> | 2013-12-07 11:24:01 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-12-07 11:24:01 +1100 |
commit | 5be9d9e3cbd9c66f24745d25bf2e809c1d158ee0 (patch) | |
tree | d2086d37436014ea44f0f024396a1a8638640b00 /ge25519.h | |
parent | bcd00abd8451f36142ae2ee10cc657202149201e (diff) |
- markus@cvs.openbsd.org 2013/12/06 13:39:49
[authfd.c authfile.c key.c key.h myproposal.h pathnames.h readconf.c]
[servconf.c ssh-agent.c ssh-keygen.c ssh-keyscan.1 ssh-keyscan.c]
[ssh-keysign.c ssh.c ssh_config.5 sshd.8 sshd.c verify.c ssh-ed25519.c]
[sc25519.h sc25519.c hash.c ge25519_base.data ge25519.h ge25519.c]
[fe25519.h fe25519.c ed25519.c crypto_api.h blocks.c]
support ed25519 keys (hostkeys and user identities) using the public
domain ed25519 reference code from SUPERCOP, see
http://ed25519.cr.yp.to/software.html
feedback, help & ok djm@
Diffstat (limited to 'ge25519.h')
-rw-r--r-- | ge25519.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ge25519.h b/ge25519.h new file mode 100644 index 000000000..2a7b893bc --- /dev/null +++ b/ge25519.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* $OpenBSD: */ | ||
2 | |||
3 | /* Public Domain, from supercop-20130419/crypto_sign/ed25519/ref/ge25519.h */ | ||
4 | |||
5 | #ifndef GE25519_H | ||
6 | #define GE25519_H | ||
7 | |||
8 | #include "fe25519.h" | ||
9 | #include "sc25519.h" | ||
10 | |||
11 | #define ge25519 crypto_sign_ed25519_ref_ge25519 | ||
12 | #define ge25519_base crypto_sign_ed25519_ref_ge25519_base | ||
13 | #define ge25519_unpackneg_vartime crypto_sign_ed25519_ref_unpackneg_vartime | ||
14 | #define ge25519_pack crypto_sign_ed25519_ref_pack | ||
15 | #define ge25519_isneutral_vartime crypto_sign_ed25519_ref_isneutral_vartime | ||
16 | #define ge25519_double_scalarmult_vartime crypto_sign_ed25519_ref_double_scalarmult_vartime | ||
17 | #define ge25519_scalarmult_base crypto_sign_ed25519_ref_scalarmult_base | ||
18 | |||
19 | typedef struct | ||
20 | { | ||
21 | fe25519 x; | ||
22 | fe25519 y; | ||
23 | fe25519 z; | ||
24 | fe25519 t; | ||
25 | } ge25519; | ||
26 | |||
27 | const ge25519 ge25519_base; | ||
28 | |||
29 | int ge25519_unpackneg_vartime(ge25519 *r, const unsigned char p[32]); | ||
30 | |||
31 | void ge25519_pack(unsigned char r[32], const ge25519 *p); | ||
32 | |||
33 | int ge25519_isneutral_vartime(const ge25519 *p); | ||
34 | |||
35 | void ge25519_double_scalarmult_vartime(ge25519 *r, const ge25519 *p1, const sc25519 *s1, const ge25519 *p2, const sc25519 *s2); | ||
36 | |||
37 | void ge25519_scalarmult_base(ge25519 *r, const sc25519 *s); | ||
38 | |||
39 | #endif | ||