|
Last change
on this file was
9598517,
checked in by Brian Warner <warner@…>, at 2012-02-12T15:05:37Z
|
|
Add Ed25519 signatures, in pycryptopp.publickey.ed25519 . Closes #75.
This copies in version 1.0 of python-ed25519, from
https://github.com/warner/python-ed25519 (or pypi), with minor source-code
rearrangement to match pycryptopp's build process. It includes unit tests,
power-on self-tests, and full known-answer tests. The standard 'setup.py
test' target only exercises 10% of the test vectors, to let the suite run in
about 1.0s on my laptop. The API documentation is in README.ed25519 .
Tests have been run successfully on Linux, OS-X and windows.
|
-
Property mode set to
100644
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | #ifndef GE25519_H |
|---|
| 2 | #define GE25519_H |
|---|
| 3 | |
|---|
| 4 | #include "fe25519.h" |
|---|
| 5 | #include "sc25519.h" |
|---|
| 6 | |
|---|
| 7 | #define ge25519 crypto_sign_ed25519_ref_ge25519 |
|---|
| 8 | #define ge25519_base crypto_sign_ed25519_ref_ge25519_base |
|---|
| 9 | #define ge25519_unpackneg_vartime crypto_sign_ed25519_ref_unpackneg_vartime |
|---|
| 10 | #define ge25519_pack crypto_sign_ed25519_ref_pack |
|---|
| 11 | #define ge25519_isneutral_vartime crypto_sign_ed25519_ref_isneutral_vartime |
|---|
| 12 | #define ge25519_double_scalarmult_vartime crypto_sign_ed25519_ref_double_scalarmult_vartime |
|---|
| 13 | #define ge25519_scalarmult_base crypto_sign_ed25519_ref_scalarmult_base |
|---|
| 14 | |
|---|
| 15 | typedef struct |
|---|
| 16 | { |
|---|
| 17 | fe25519 x; |
|---|
| 18 | fe25519 y; |
|---|
| 19 | fe25519 z; |
|---|
| 20 | fe25519 t; |
|---|
| 21 | } ge25519; |
|---|
| 22 | |
|---|
| 23 | extern const ge25519 ge25519_base; |
|---|
| 24 | |
|---|
| 25 | int ge25519_unpackneg_vartime(ge25519 *r, const unsigned char p[32]); |
|---|
| 26 | |
|---|
| 27 | void ge25519_pack(unsigned char r[32], const ge25519 *p); |
|---|
| 28 | |
|---|
| 29 | int ge25519_isneutral_vartime(const ge25519 *p); |
|---|
| 30 | |
|---|
| 31 | void ge25519_double_scalarmult_vartime(ge25519 *r, const ge25519 *p1, const sc25519 *s1, const ge25519 *p2, const sc25519 *s2); |
|---|
| 32 | |
|---|
| 33 | void ge25519_scalarmult_base(ge25519 *r, const sc25519 *s); |
|---|
| 34 | |
|---|
| 35 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.