| 1 |
/* Copyright 2017 Donald Stufft and individual contributors |
| 2 |
* |
| 3 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
* you may not use this file except in compliance with the License. |
| 5 |
* You may obtain a copy of the License at |
| 6 |
* |
| 7 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
* |
| 9 |
* Unless required by applicable law or agreed to in writing, software |
| 10 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
* See the License for the specific language governing permissions and |
| 13 |
* limitations under the License. |
| 14 |
*/ |
| 15 |
|
| 16 |
size_t crypto_aead_chacha20poly1305_ietf_keybytes(void); |
| 17 |
size_t crypto_aead_chacha20poly1305_ietf_nsecbytes(void); |
| 18 |
size_t crypto_aead_chacha20poly1305_ietf_npubbytes(void); |
| 19 |
size_t crypto_aead_chacha20poly1305_ietf_abytes(void); |
| 20 |
size_t crypto_aead_chacha20poly1305_ietf_messagebytes_max(void); |
| 21 |
|
| 22 |
size_t crypto_aead_chacha20poly1305_keybytes(void); |
| 23 |
size_t crypto_aead_chacha20poly1305_nsecbytes(void); |
| 24 |
size_t crypto_aead_chacha20poly1305_npubbytes(void); |
| 25 |
size_t crypto_aead_chacha20poly1305_abytes(void); |
| 26 |
size_t crypto_aead_chacha20poly1305_messagebytes_max(void); |
| 27 |
|
| 28 |
size_t crypto_aead_xchacha20poly1305_ietf_keybytes(void); |
| 29 |
size_t crypto_aead_xchacha20poly1305_ietf_nsecbytes(void); |
| 30 |
size_t crypto_aead_xchacha20poly1305_ietf_npubbytes(void); |
| 31 |
size_t crypto_aead_xchacha20poly1305_ietf_abytes(void); |
| 32 |
size_t crypto_aead_xchacha20poly1305_ietf_messagebytes_max(void); |
| 33 |
|
| 34 |
size_t crypto_aead_aegis256_keybytes(void); |
| 35 |
size_t crypto_aead_aegis256_nsecbytes(void); |
| 36 |
size_t crypto_aead_aegis256_npubbytes(void); |
| 37 |
size_t crypto_aead_aegis256_abytes(void); |
| 38 |
size_t crypto_aead_aegis256_messagebytes_max(void); |
| 39 |
|
| 40 |
size_t crypto_aead_aegis128l_keybytes(void); |
| 41 |
size_t crypto_aead_aegis128l_nsecbytes(void); |
| 42 |
size_t crypto_aead_aegis128l_npubbytes(void); |
| 43 |
size_t crypto_aead_aegis128l_abytes(void); |
| 44 |
size_t crypto_aead_aegis128l_messagebytes_max(void); |
| 45 |
|
| 46 |
size_t crypto_aead_aes256gcm_keybytes(void); |
| 47 |
size_t crypto_aead_aes256gcm_nsecbytes(void); |
| 48 |
size_t crypto_aead_aes256gcm_npubbytes(void); |
| 49 |
size_t crypto_aead_aes256gcm_abytes(void); |
| 50 |
size_t crypto_aead_aes256gcm_messagebytes_max(void); |
| 51 |
|
| 52 |
int crypto_aead_chacha20poly1305_ietf_encrypt(unsigned char *c, |
| 53 |
unsigned long long *clen, |
| 54 |
const unsigned char *m, |
| 55 |
unsigned long long mlen, |
| 56 |
const unsigned char *ad, |
| 57 |
unsigned long long adlen, |
| 58 |
const unsigned char *nsec, |
| 59 |
const unsigned char *npub, |
| 60 |
const unsigned char *k); |
| 61 |
|
| 62 |
int crypto_aead_chacha20poly1305_ietf_decrypt(unsigned char *m, |
| 63 |
unsigned long long *mlen, |
| 64 |
unsigned char *nsec, |
| 65 |
const unsigned char *c, |
| 66 |
unsigned long long clen, |
| 67 |
const unsigned char *ad, |
| 68 |
unsigned long long adlen, |
| 69 |
const unsigned char *npub, |
| 70 |
const unsigned char *k); |
| 71 |
|
| 72 |
int crypto_aead_chacha20poly1305_encrypt(unsigned char *c, |
| 73 |
unsigned long long *clen, |
| 74 |
const unsigned char *m, |
| 75 |
unsigned long long mlen, |
| 76 |
const unsigned char *ad, |
| 77 |
unsigned long long adlen, |
| 78 |
const unsigned char *nsec, |
| 79 |
const unsigned char *npub, |
| 80 |
const unsigned char *k); |
| 81 |
|
| 82 |
int crypto_aead_chacha20poly1305_decrypt(unsigned char *m, |
| 83 |
unsigned long long *mlen, |
| 84 |
unsigned char *nsec, |
| 85 |
const unsigned char *c, |
| 86 |
unsigned long long clen, |
| 87 |
const unsigned char *ad, |
| 88 |
unsigned long long adlen, |
| 89 |
const unsigned char *npub, |
| 90 |
const unsigned char *k); |
| 91 |
|
| 92 |
int crypto_aead_xchacha20poly1305_ietf_encrypt(unsigned char *c, |
| 93 |
unsigned long long *clen, |
| 94 |
const unsigned char *m, |
| 95 |
unsigned long long mlen, |
| 96 |
const unsigned char *ad, |
| 97 |
unsigned long long adlen, |
| 98 |
const unsigned char *nsec, |
| 99 |
const unsigned char *npub, |
| 100 |
const unsigned char *k); |
| 101 |
|
| 102 |
int crypto_aead_xchacha20poly1305_ietf_decrypt(unsigned char *m, |
| 103 |
unsigned long long *mlen, |
| 104 |
unsigned char *nsec, |
| 105 |
const unsigned char *c, |
| 106 |
unsigned long long clen, |
| 107 |
const unsigned char *ad, |
| 108 |
unsigned long long adlen, |
| 109 |
const unsigned char *npub, |
| 110 |
const unsigned char *k); |
| 111 |
|
| 112 |
int crypto_aead_aegis256_encrypt(unsigned char *c, |
| 113 |
unsigned long long *clen_p, |
| 114 |
const unsigned char *m, |
| 115 |
unsigned long long mlen, |
| 116 |
const unsigned char *ad, |
| 117 |
unsigned long long adlen, |
| 118 |
const unsigned char *nsec, |
| 119 |
const unsigned char *npub, |
| 120 |
const unsigned char *k); |
| 121 |
|
| 122 |
int crypto_aead_aegis256_decrypt(unsigned char *m, |
| 123 |
unsigned long long *mlen_p, |
| 124 |
unsigned char *nsec, |
| 125 |
const unsigned char *c, |
| 126 |
unsigned long long clen, |
| 127 |
const unsigned char *ad, |
| 128 |
unsigned long long adlen, |
| 129 |
const unsigned char *npub, |
| 130 |
const unsigned char *k); |
| 131 |
|
| 132 |
int crypto_aead_aegis128l_encrypt(unsigned char *c, |
| 133 |
unsigned long long *clen_p, |
| 134 |
const unsigned char *m, |
| 135 |
unsigned long long mlen, |
| 136 |
const unsigned char *ad, |
| 137 |
unsigned long long adlen, |
| 138 |
const unsigned char *nsec, |
| 139 |
const unsigned char *npub, |
| 140 |
const unsigned char *k); |
| 141 |
|
| 142 |
int crypto_aead_aegis128l_decrypt(unsigned char *m, |
| 143 |
unsigned long long *mlen_p, |
| 144 |
unsigned char *nsec, |
| 145 |
const unsigned char *c, |
| 146 |
unsigned long long clen, |
| 147 |
const unsigned char *ad, |
| 148 |
unsigned long long adlen, |
| 149 |
const unsigned char *npub, |
| 150 |
const unsigned char *k); |
| 151 |
|
| 152 |
int crypto_aead_aes256gcm_is_available(void); |
| 153 |
|
| 154 |
int crypto_aead_aes256gcm_encrypt(unsigned char *c, |
| 155 |
unsigned long long *clen_p, |
| 156 |
const unsigned char *m, |
| 157 |
unsigned long long mlen, |
| 158 |
const unsigned char *ad, |
| 159 |
unsigned long long adlen, |
| 160 |
const unsigned char *nsec, |
| 161 |
const unsigned char *npub, |
| 162 |
const unsigned char *k); |
| 163 |
|
| 164 |
int crypto_aead_aes256gcm_decrypt(unsigned char *m, |
| 165 |
unsigned long long *mlen_p, |
| 166 |
unsigned char *nsec, |
| 167 |
const unsigned char *c, |
| 168 |
unsigned long long clen, |
| 169 |
const unsigned char *ad, |
| 170 |
unsigned long long adlen, |
| 171 |
const unsigned char *npub, |
| 172 |
const unsigned char *k); |