fix incompatibility issues with LLP64 data models
This is also a fixup of a921112fe32fce1d5cce386ab09d3edcaa004c51 Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
parent
791e5e7098
commit
3c05f2b65a
@ -345,13 +345,13 @@ int tweetnacl_crypto_sign_open(
|
||||
int *stat,
|
||||
unsigned char *m,unsigned long long *mlen,
|
||||
const unsigned char *sm,unsigned long long smlen,
|
||||
const unsigned char *ctx, unsigned long cs,
|
||||
const unsigned char *ctx, unsigned long long cs,
|
||||
const unsigned char *pk);
|
||||
int tweetnacl_crypto_sign_keypair(prng_state *prng, int wprng, unsigned char *pk,unsigned char *sk);
|
||||
int tweetnacl_crypto_sk_to_pk(unsigned char *pk, const unsigned char *sk);
|
||||
int tweetnacl_crypto_scalarmult(unsigned char *q, const unsigned char *n, const unsigned char *p);
|
||||
int tweetnacl_crypto_scalarmult_base(unsigned char *q,const unsigned char *n);
|
||||
int tweetnacl_crypto_ph(unsigned char *out, const unsigned char *msg, unsigned long msglen);
|
||||
int tweetnacl_crypto_ph(unsigned char *out, const unsigned char *msg, unsigned long long msglen);
|
||||
|
||||
typedef int (*sk_to_pk)(unsigned char *pk ,const unsigned char *sk);
|
||||
int ec25519_import_pkcs8(const unsigned char *in, unsigned long inlen,
|
||||
|
@ -448,7 +448,7 @@ static int unpackneg(gf r[4],const u8 p[32])
|
||||
return 0;
|
||||
}
|
||||
|
||||
int tweetnacl_crypto_sign_open(int *stat, u8 *m,u64 *mlen,const u8 *sm,u64 smlen,const u8 *ctx,size_t cs,const u8 *pk)
|
||||
int tweetnacl_crypto_sign_open(int *stat, u8 *m,u64 *mlen,const u8 *sm,u64 smlen,const u8 *ctx,u64 cs,const u8 *pk)
|
||||
{
|
||||
u64 i;
|
||||
u8 s[32],t[32],h[64];
|
||||
@ -485,7 +485,7 @@ int tweetnacl_crypto_sign_open(int *stat, u8 *m,u64 *mlen,const u8 *sm,u64 smlen
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
int tweetnacl_crypto_ph(u8 *out,const u8 *msg,size_t msglen)
|
||||
int tweetnacl_crypto_ph(u8 *out,const u8 *msg,u64 msglen)
|
||||
{
|
||||
return tweetnacl_crypto_hash(out, msg, msglen);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ int multi_test(void)
|
||||
|
||||
/* HASH testing */
|
||||
len = sizeof(buf[0]);
|
||||
#if defined(ENDIAN_32BITWORD) || defined(_MSC_VER)
|
||||
#if defined(ENDIAN_32BITWORD) || defined(_WIN32)
|
||||
len2 = 0x80000000UL;
|
||||
#else
|
||||
/* Check against the max. input limit of SHA-1 as of RFC8017 */
|
||||
|
Loading…
Reference in New Issue
Block a user