The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
eap_fast_crypto.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or (at
6  * your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16  */
17 
18 /**
19  * $Id: 8dfc67a4f052481f91b5ef79bf0e167fc2a24ddb $
20  * @file eap_fast_crypto.h
21  * @brief Crypto function declarations.
22  *
23  * @author Alexander Clouter (alex@digriz.org.uk)
24  *
25  * @copyright 2016 Alan DeKok (aland@freeradius.org)
26  * @copyright 2016 The FreeRADIUS server project
27  */
28 RCSIDH(eap_fast_crypto_h, "$Id: 8dfc67a4f052481f91b5ef79bf0e167fc2a24ddb $")
29 
30 void T_PRF(unsigned char const *secret, unsigned int secret_len, char const *prf_label, unsigned char const *seed, unsigned int seed_len, unsigned char *out, unsigned int out_len) CC_HINT(nonnull(1,3,6));
31 
32 int eap_fast_encrypt(uint8_t const *plaintext, size_t plaintext_len,
33  uint8_t const *aad, size_t aad_len,
34  uint8_t const *key, uint8_t *iv, unsigned char *ciphertext,
35  uint8_t *tag);
36 
37 int eap_fast_decrypt(uint8_t const *ciphertext, size_t ciphertext_len,
38  uint8_t const *aad, size_t aad_len,
39  uint8_t const *tag, uint8_t const *key, uint8_t const *iv, uint8_t *plaintext);
40 
41 void eap_fast_tls_gen_challenge(SSL *ssl, uint8_t *buffer, uint8_t *scratch, size_t size, char const *prf_label) CC_HINT(nonnull);
static int const char char buffer[256]
Definition: acutest.h:574
#define RCSIDH(h, id)
Definition: build.h:445
int eap_fast_decrypt(uint8_t const *ciphertext, size_t ciphertext_len, uint8_t const *aad, size_t aad_len, uint8_t const *tag, uint8_t const *key, uint8_t const *iv, uint8_t *plaintext)
void T_PRF(unsigned char const *secret, unsigned int secret_len, char const *prf_label, unsigned char const *seed, unsigned int seed_len, unsigned char *out, unsigned int out_len))
int eap_fast_encrypt(uint8_t const *plaintext, size_t plaintext_len, uint8_t const *aad, size_t aad_len, uint8_t const *key, uint8_t *iv, unsigned char *ciphertext, uint8_t *tag)
void eap_fast_tls_gen_challenge(SSL *ssl, uint8_t *buffer, uint8_t *scratch, size_t size, char const *prf_label)
unsigned char uint8_t
Definition: merged_model.c:30
static char * secret
Definition: radclient-ng.c:69
int nonnull(2, 5))
static size_t char ** out
Definition: value.h:984