Latest libsodium-1.0.19-stable.tar.gz

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4788 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2024-01-23 02:18:59 +00:00
parent 0db4bb06c9
commit a0df336abe
19 changed files with 2460 additions and 1718 deletions

View File

@ -116,3 +116,8 @@ crypto_kdf_hkdf_sha512_bytes_max(void)
{
return crypto_kdf_hkdf_sha512_BYTES_MAX;
}
size_t crypto_kdf_hkdf_sha512_statebytes(void)
{
return sizeof(crypto_kdf_hkdf_sha512_state);
}

View File

@ -56,6 +56,7 @@ crypto_sign_ed25519_pk_to_curve25519(unsigned char *curve25519_pk,
return -1;
}
fe25519_1(one_minus_y);
/* assumes A.Z=1 */
fe25519_sub(one_minus_y, one_minus_y, A.Y);
fe25519_1(x);
fe25519_add(x, x, A.Y);

View File

@ -1,13 +1,6 @@
#ifndef crypto_onetimeauth_poly1305_H
#define crypto_onetimeauth_poly1305_H
#ifdef __cplusplus
# ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wlong-long"
# endif
extern "C" {
#endif
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@ -16,6 +9,13 @@ extern "C" {
#include "export.h"
#ifdef __cplusplus
# ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wlong-long"
# endif
extern "C" {
#endif
typedef struct CRYPTO_ALIGN(16) crypto_onetimeauth_poly1305_state {
unsigned char opaque[256];
} crypto_onetimeauth_poly1305_state;

View File

@ -135,7 +135,7 @@ int crypto_pwhash_str_needs_rehash(const char *str,
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#define crypto_pwhash_PRIMITIVE "argon2i"
#define crypto_pwhash_PRIMITIVE "argon2id,argon2i"
SODIUM_EXPORT
const char *crypto_pwhash_primitive(void)
__attribute__ ((warn_unused_result));

View File

@ -250,6 +250,9 @@ xor_buf(unsigned char *out, const unsigned char *in, size_t n)
# elif defined(_M_ARM64)
# ifndef __ARM_ARCH
# define __ARM_ARCH 1
# endif
# ifndef __ARM_NEON
# define __ARM_NEON 1
# endif