Skip to content

Commit 9e406b5

Browse files
authored
Add files via upload
1 parent 9f838e9 commit 9e406b5

File tree

68 files changed

+5020
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5020
-0
lines changed

libsodium/libsodium.lib

2.46 MB
Binary file not shown.

libsodium/sodium.h

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
2+
#ifndef sodium_H
3+
#define sodium_H
4+
5+
#include "sodium/version.h"
6+
7+
#include "sodium/core.h"
8+
#include "sodium/crypto_aead_aegis128l.h"
9+
#include "sodium/crypto_aead_aegis256.h"
10+
#include "sodium/crypto_aead_aes256gcm.h"
11+
#include "sodium/crypto_aead_chacha20poly1305.h"
12+
#include "sodium/crypto_aead_xchacha20poly1305.h"
13+
#include "sodium/crypto_auth.h"
14+
#include "sodium/crypto_auth_hmacsha256.h"
15+
#include "sodium/crypto_auth_hmacsha512.h"
16+
#include "sodium/crypto_auth_hmacsha512256.h"
17+
#include "sodium/crypto_box.h"
18+
#include "sodium/crypto_box_curve25519xsalsa20poly1305.h"
19+
#include "sodium/crypto_core_hchacha20.h"
20+
#include "sodium/crypto_core_hsalsa20.h"
21+
#include "sodium/crypto_core_salsa20.h"
22+
#include "sodium/crypto_core_salsa2012.h"
23+
#include "sodium/crypto_core_salsa208.h"
24+
#include "sodium/crypto_generichash.h"
25+
#include "sodium/crypto_generichash_blake2b.h"
26+
#include "sodium/crypto_hash.h"
27+
#include "sodium/crypto_hash_sha256.h"
28+
#include "sodium/crypto_hash_sha512.h"
29+
#include "sodium/crypto_kdf.h"
30+
#include "sodium/crypto_kdf_hkdf_sha256.h"
31+
#include "sodium/crypto_kdf_hkdf_sha512.h"
32+
#include "sodium/crypto_kdf_blake2b.h"
33+
#include "sodium/crypto_kdf_hkdf_sha256.h"
34+
#include "sodium/crypto_kdf_hkdf_sha512.h"
35+
#include "sodium/crypto_kx.h"
36+
#include "sodium/crypto_onetimeauth.h"
37+
#include "sodium/crypto_onetimeauth_poly1305.h"
38+
#include "sodium/crypto_pwhash.h"
39+
#include "sodium/crypto_pwhash_argon2i.h"
40+
#include "sodium/crypto_scalarmult.h"
41+
#include "sodium/crypto_scalarmult_curve25519.h"
42+
#include "sodium/crypto_secretbox.h"
43+
#include "sodium/crypto_secretbox_xsalsa20poly1305.h"
44+
#include "sodium/crypto_secretstream_xchacha20poly1305.h"
45+
#include "sodium/crypto_shorthash.h"
46+
#include "sodium/crypto_shorthash_siphash24.h"
47+
#include "sodium/crypto_sign.h"
48+
#include "sodium/crypto_sign_ed25519.h"
49+
#include "sodium/crypto_stream.h"
50+
#include "sodium/crypto_stream_chacha20.h"
51+
#include "sodium/crypto_stream_salsa20.h"
52+
#include "sodium/crypto_stream_xsalsa20.h"
53+
#include "sodium/crypto_verify_16.h"
54+
#include "sodium/crypto_verify_32.h"
55+
#include "sodium/crypto_verify_64.h"
56+
#include "sodium/randombytes.h"
57+
#include "sodium/randombytes_internal_random.h"
58+
#include "sodium/randombytes_sysrandom.h"
59+
#include "sodium/runtime.h"
60+
#include "sodium/utils.h"
61+
62+
#ifndef SODIUM_LIBRARY_MINIMAL
63+
#include "sodium/crypto_box_curve25519xchacha20poly1305.h"
64+
#include "sodium/crypto_core_ed25519.h"
65+
#include "sodium/crypto_core_ristretto255.h"
66+
#include "sodium/crypto_pwhash_scryptsalsa208sha256.h"
67+
#include "sodium/crypto_scalarmult_ed25519.h"
68+
#include "sodium/crypto_scalarmult_ristretto255.h"
69+
#include "sodium/crypto_secretbox_xchacha20poly1305.h"
70+
#include "sodium/crypto_stream_salsa2012.h"
71+
#include "sodium/crypto_stream_salsa208.h"
72+
#include "sodium/crypto_stream_xchacha20.h"
73+
#endif
74+
75+
#endif

libsodium/sodium/core.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
#ifndef sodium_core_H
3+
#define sodium_core_H
4+
5+
#include "export.h"
6+
7+
#ifdef __cplusplus
8+
extern "C" {
9+
#endif
10+
11+
SODIUM_EXPORT
12+
int sodium_init(void)
13+
__attribute__ ((warn_unused_result));
14+
15+
/* ---- */
16+
17+
SODIUM_EXPORT
18+
int sodium_set_misuse_handler(void (*handler)(void));
19+
20+
SODIUM_EXPORT
21+
void sodium_misuse(void)
22+
__attribute__ ((noreturn));
23+
24+
#ifdef __cplusplus
25+
}
26+
#endif
27+
28+
#endif
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#ifndef crypto_aead_aegis128l_H
2+
#define crypto_aead_aegis128l_H
3+
4+
#include <stddef.h>
5+
6+
#include "export.h"
7+
8+
#ifdef __cplusplus
9+
#ifdef __GNUC__
10+
#pragma GCC diagnostic ignored "-Wlong-long"
11+
#endif
12+
extern "C" {
13+
#endif
14+
15+
#define crypto_aead_aegis128l_KEYBYTES 16U
16+
SODIUM_EXPORT
17+
size_t crypto_aead_aegis128l_keybytes(void);
18+
19+
#define crypto_aead_aegis128l_NSECBYTES 0U
20+
SODIUM_EXPORT
21+
size_t crypto_aead_aegis128l_nsecbytes(void);
22+
23+
#define crypto_aead_aegis128l_NPUBBYTES 16U
24+
SODIUM_EXPORT
25+
size_t crypto_aead_aegis128l_npubbytes(void);
26+
27+
#define crypto_aead_aegis128l_ABYTES 32U
28+
SODIUM_EXPORT
29+
size_t crypto_aead_aegis128l_abytes(void);
30+
31+
#define crypto_aead_aegis128l_MESSAGEBYTES_MAX \
32+
SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_aegis128l_ABYTES, (1ULL << 61) - 1)
33+
SODIUM_EXPORT
34+
size_t crypto_aead_aegis128l_messagebytes_max(void);
35+
36+
SODIUM_EXPORT
37+
int crypto_aead_aegis128l_encrypt(unsigned char *c,
38+
unsigned long long *clen_p,
39+
const unsigned char *m,
40+
unsigned long long mlen,
41+
const unsigned char *ad,
42+
unsigned long long adlen,
43+
const unsigned char *nsec,
44+
const unsigned char *npub,
45+
const unsigned char *k) __attribute__((nonnull(1, 8, 9)));
46+
47+
SODIUM_EXPORT
48+
int crypto_aead_aegis128l_decrypt(unsigned char *m,
49+
unsigned long long *mlen_p,
50+
unsigned char *nsec,
51+
const unsigned char *c,
52+
unsigned long long clen,
53+
const unsigned char *ad,
54+
unsigned long long adlen,
55+
const unsigned char *npub,
56+
const unsigned char *k) __attribute__((warn_unused_result))
57+
__attribute__((nonnull(4, 8, 9)));
58+
59+
SODIUM_EXPORT
60+
int crypto_aead_aegis128l_encrypt_detached(unsigned char *c,
61+
unsigned char *mac,
62+
unsigned long long *maclen_p,
63+
const unsigned char *m,
64+
unsigned long long mlen,
65+
const unsigned char *ad,
66+
unsigned long long adlen,
67+
const unsigned char *nsec,
68+
const unsigned char *npub,
69+
const unsigned char *k)
70+
__attribute__((nonnull(1, 2, 9, 10)));
71+
72+
SODIUM_EXPORT
73+
int crypto_aead_aegis128l_decrypt_detached(unsigned char *m,
74+
unsigned char *nsec,
75+
const unsigned char *c,
76+
unsigned long long clen,
77+
const unsigned char *mac,
78+
const unsigned char *ad,
79+
unsigned long long adlen,
80+
const unsigned char *npub,
81+
const unsigned char *k)
82+
__attribute__((warn_unused_result)) __attribute__((nonnull(3, 5, 8, 9)));
83+
84+
SODIUM_EXPORT
85+
void crypto_aead_aegis128l_keygen(unsigned char k[crypto_aead_aegis128l_KEYBYTES])
86+
__attribute__((nonnull));
87+
88+
#ifdef __cplusplus
89+
}
90+
#endif
91+
92+
#endif
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#ifndef crypto_aead_aegis256_H
2+
#define crypto_aead_aegis256_H
3+
4+
#include <stddef.h>
5+
6+
#include "export.h"
7+
8+
#ifdef __cplusplus
9+
#ifdef __GNUC__
10+
#pragma GCC diagnostic ignored "-Wlong-long"
11+
#endif
12+
extern "C" {
13+
#endif
14+
15+
#define crypto_aead_aegis256_KEYBYTES 32U
16+
SODIUM_EXPORT
17+
size_t crypto_aead_aegis256_keybytes(void);
18+
19+
#define crypto_aead_aegis256_NSECBYTES 0U
20+
SODIUM_EXPORT
21+
size_t crypto_aead_aegis256_nsecbytes(void);
22+
23+
#define crypto_aead_aegis256_NPUBBYTES 32U
24+
SODIUM_EXPORT
25+
size_t crypto_aead_aegis256_npubbytes(void);
26+
27+
#define crypto_aead_aegis256_ABYTES 32U
28+
SODIUM_EXPORT
29+
size_t crypto_aead_aegis256_abytes(void);
30+
31+
#define crypto_aead_aegis256_MESSAGEBYTES_MAX \
32+
SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_aegis256_ABYTES, (1ULL << 61) - 1)
33+
SODIUM_EXPORT
34+
size_t crypto_aead_aegis256_messagebytes_max(void);
35+
36+
SODIUM_EXPORT
37+
int crypto_aead_aegis256_encrypt(unsigned char *c,
38+
unsigned long long *clen_p,
39+
const unsigned char *m,
40+
unsigned long long mlen,
41+
const unsigned char *ad,
42+
unsigned long long adlen,
43+
const unsigned char *nsec,
44+
const unsigned char *npub,
45+
const unsigned char *k) __attribute__((nonnull(1, 8, 9)));
46+
47+
SODIUM_EXPORT
48+
int crypto_aead_aegis256_decrypt(unsigned char *m,
49+
unsigned long long *mlen_p,
50+
unsigned char *nsec,
51+
const unsigned char *c,
52+
unsigned long long clen,
53+
const unsigned char *ad,
54+
unsigned long long adlen,
55+
const unsigned char *npub,
56+
const unsigned char *k) __attribute__((warn_unused_result))
57+
__attribute__((nonnull(4, 8, 9)));
58+
59+
SODIUM_EXPORT
60+
int crypto_aead_aegis256_encrypt_detached(unsigned char *c,
61+
unsigned char *mac,
62+
unsigned long long *maclen_p,
63+
const unsigned char *m,
64+
unsigned long long mlen,
65+
const unsigned char *ad,
66+
unsigned long long adlen,
67+
const unsigned char *nsec,
68+
const unsigned char *npub,
69+
const unsigned char *k)
70+
__attribute__((nonnull(1, 2, 9, 10)));
71+
72+
SODIUM_EXPORT
73+
int crypto_aead_aegis256_decrypt_detached(unsigned char *m,
74+
unsigned char *nsec,
75+
const unsigned char *c,
76+
unsigned long long clen,
77+
const unsigned char *mac,
78+
const unsigned char *ad,
79+
unsigned long long adlen,
80+
const unsigned char *npub,
81+
const unsigned char *k)
82+
__attribute__((warn_unused_result)) __attribute__((nonnull(3, 5, 8, 9)));
83+
84+
SODIUM_EXPORT
85+
void crypto_aead_aegis256_keygen(unsigned char k[crypto_aead_aegis256_KEYBYTES])
86+
__attribute__((nonnull));
87+
88+
#ifdef __cplusplus
89+
}
90+
#endif
91+
92+
#endif

0 commit comments

Comments
 (0)