red25519 1.1.0-jruby
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/.rspec +4 -0
- data/.travis.yml +14 -0
- data/CHANGES.md +3 -0
- data/Gemfile +6 -0
- data/LICENSE +22 -0
- data/README.md +140 -0
- data/Rakefile +9 -0
- data/ed25519.png +0 -0
- data/ext/red25519/api.h +4 -0
- data/ext/red25519/crypto_int32.h +6 -0
- data/ext/red25519/crypto_sign.h +13 -0
- data/ext/red25519/crypto_uint32.h +6 -0
- data/ext/red25519/crypto_verify_32.h +7 -0
- data/ext/red25519/ed25519.c +136 -0
- data/ext/red25519/extconf.rb +4 -0
- data/ext/red25519/fe25519.c +326 -0
- data/ext/red25519/fe25519.h +63 -0
- data/ext/red25519/ge25519.c +311 -0
- data/ext/red25519/ge25519.h +35 -0
- data/ext/red25519/ge25519_base.data +850 -0
- data/ext/red25519/org/red25519/ed25519.java +228 -0
- data/ext/red25519/red25519_engine.c +82 -0
- data/ext/red25519/sc25519.c +298 -0
- data/ext/red25519/sc25519.h +73 -0
- data/ext/red25519/sha512-blocks.c +239 -0
- data/ext/red25519/sha512-hash.c +72 -0
- data/ext/red25519/sha512.h +4 -0
- data/ext/red25519/verify.c +40 -0
- data/lib/red25519/jruby_engine.rb +27 -0
- data/lib/red25519/keys.rb +73 -0
- data/lib/red25519/version.rb +3 -0
- data/lib/red25519.rb +41 -0
- data/lib/red25519_engine.jar +0 -0
- data/red25519.gemspec +31 -0
- data/spec/red25519/engine_spec.rb +33 -0
- data/spec/red25519/keys_spec.rb +65 -0
- data/spec/spec_helper.rb +3 -0
- data/tasks/extension.rake +12 -0
- data/tasks/rspec.rake +7 -0
- metadata +134 -0
@@ -0,0 +1,35 @@
|
|
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
|