mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-24 19:02:06 +00:00
51b082ccbe
Declare ge25519_base as extern, to prevent it from becoming a common. Gets us rid of ``lignment 4 of symbol `crypto_sign_ed25519_ref_ge25519_base' in mod_ge25519.o is smaller than 16 in mod_ed25519.o'' warnings at link time.
44 lines
1.4 KiB
C
44 lines
1.4 KiB
C
/* $OpenBSD: ge25519.h,v 1.4 2015/02/16 18:26:26 miod Exp $ */
|
|
|
|
/*
|
|
* Public Domain, Authors: Daniel J. Bernstein, Niels Duif, Tanja Lange,
|
|
* Peter Schwabe, Bo-Yin Yang.
|
|
* Copied from supercop-20130419/crypto_sign/ed25519/ref/ge25519.h
|
|
*/
|
|
|
|
#ifndef GE25519_H
|
|
#define GE25519_H
|
|
|
|
#include "fe25519.h"
|
|
#include "sc25519.h"
|
|
|
|
#define ge25519 crypto_sign_ed25519_ref_ge25519
|
|
#define ge25519_base crypto_sign_ed25519_ref_ge25519_base
|
|
#define ge25519_unpackneg_vartime crypto_sign_ed25519_ref_unpackneg_vartime
|
|
#define ge25519_pack crypto_sign_ed25519_ref_pack
|
|
#define ge25519_isneutral_vartime crypto_sign_ed25519_ref_isneutral_vartime
|
|
#define ge25519_double_scalarmult_vartime crypto_sign_ed25519_ref_double_scalarmult_vartime
|
|
#define ge25519_scalarmult_base crypto_sign_ed25519_ref_scalarmult_base
|
|
|
|
typedef struct
|
|
{
|
|
fe25519 x;
|
|
fe25519 y;
|
|
fe25519 z;
|
|
fe25519 t;
|
|
} ge25519;
|
|
|
|
extern const ge25519 ge25519_base;
|
|
|
|
int ge25519_unpackneg_vartime(ge25519 *r, const unsigned char p[32]);
|
|
|
|
void ge25519_pack(unsigned char r[32], const ge25519 *p);
|
|
|
|
int ge25519_isneutral_vartime(const ge25519 *p);
|
|
|
|
void ge25519_double_scalarmult_vartime(ge25519 *r, const ge25519 *p1, const sc25519 *s1, const ge25519 *p2, const sc25519 *s2);
|
|
|
|
void ge25519_scalarmult_base(ge25519 *r, const sc25519 *s);
|
|
|
|
#endif
|