Browse Subversion Repository
Diff of /trunk/ttssh2/ttxssh/ed25519_ge25519.c
Parent Directory
| Revision Log
| Patch
| 6 |
* Copied from supercop-20130419/crypto_sign/ed25519/ref/ge25519.c |
* Copied from supercop-20130419/crypto_sign/ed25519/ref/ge25519.c |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
#include "includes.h" |
//#include "includes.h" |
| 10 |
|
|
| 11 |
#include "fe25519.h" |
#include "ed25519_fe25519.h" |
| 12 |
#include "sc25519.h" |
#include "ed25519_sc25519.h" |
| 13 |
#include "ge25519.h" |
#include "ed25519_ge25519.h" |
| 14 |
|
|
| 15 |
/* |
/* |
| 16 |
* Arithmetic on the twisted Edwards curve -x^2 + y^2 = 1 + dx^2y^2 |
* Arithmetic on the twisted Edwards curve -x^2 + y^2 = 1 + dx^2y^2 |
| 164 |
{ |
{ |
| 165 |
unsigned long long x = b; /* 18446744073709551361..18446744073709551615: yes; 0..255: no */ |
unsigned long long x = b; /* 18446744073709551361..18446744073709551615: yes; 0..255: no */ |
| 166 |
x >>= 63; /* 1: yes; 0: no */ |
x >>= 63; /* 1: yes; 0: no */ |
| 167 |
return x; |
return (unsigned char)x; |
| 168 |
} |
} |
| 169 |
|
|
| 170 |
static void choose_t(ge25519_aff *t, unsigned long long pos, signed char b) |
static void choose_t(ge25519_aff *t, unsigned long long pos, signed char b) |
|
|
Legend:
| Removed from v.5496 |
|
| changed lines |
| |
Added in v.5497 |
|
|
|