The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions
eap_fast_crypto.c File Reference

Cryptographic functions for EAP-FAST. More...

#include <stdio.h>
#include <freeradius-devel/tls/base.h>
#include <freeradius-devel/eap/tls.h>
#include <freeradius-devel/tls/openssl_user_macros.h>
#include <openssl/evp.h>
#include <openssl/aes.h>
#include <openssl/err.h>
#include "eap_fast_crypto.h"
+ Include dependency graph for eap_fast_crypto.c:

Go to the source code of this file.

Macros

#define MIN(a, b)   (((a)>(b)) ? (b) : (a))
 

Functions

static void crypto_rfc4346_p_hash (uint8_t *out, size_t out_len, EVP_MD const *evp_md, uint8_t const *secret, size_t secret_len, uint8_t const *seed, size_t seed_len)
 
static void eap_crypto_rfc4346_prf (uint8_t *out, size_t out_len, uint8_t *scratch, uint8_t const *secret, size_t secret_len, uint8_t const *seed, size_t seed_len)
 
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)
 
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 *s, uint8_t *buffer, uint8_t *scratch, size_t size, char const *prf_label)
 
static NEVER_RETURNS void handleErrors (void)
 
USES_APPLE_DEPRECATED_API 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)
 

Detailed Description

Cryptographic functions for EAP-FAST.

Id
3f2145ae9ddcdc921489fa204c8300ebf3cc0624
Author
Alexander Clouter (alex@.nosp@m.digr.nosp@m.iz.or.nosp@m.g.uk)

Definition in file eap_fast_crypto.c.

Macro Definition Documentation

◆ MIN

#define MIN (   a,
 
)    (((a)>(b)) ? (b) : (a))

Function Documentation

◆ crypto_rfc4346_p_hash()

static void crypto_rfc4346_p_hash ( uint8_t out,
size_t  out_len,
EVP_MD const *  evp_md,
uint8_t const *  secret,
size_t  secret_len,
uint8_t const *  seed,
size_t  seed_len 
)
static

Definition at line 221 of file eap_fast_crypto.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_crypto_rfc4346_prf()

static void eap_crypto_rfc4346_prf ( uint8_t out,
size_t  out_len,
uint8_t scratch,
uint8_t const *  secret,
size_t  secret_len,
uint8_t const *  seed,
size_t  seed_len 
)
static

Definition at line 289 of file eap_fast_crypto.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_decrypt()

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 
)

Definition at line 154 of file eap_fast_crypto.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_encrypt()

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 
)

Definition at line 99 of file eap_fast_crypto.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_tls_gen_challenge()

void eap_fast_tls_gen_challenge ( SSL *  s,
uint8_t buffer,
uint8_t scratch,
size_t  size,
char const *  prf_label 
)

Definition at line 308 of file eap_fast_crypto.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleErrors()

static NEVER_RETURNS void handleErrors ( void  )
static

Definition at line 85 of file eap_fast_crypto.c.

+ Here is the caller graph for this function:

◆ T_PRF()

USES_APPLE_DEPRECATED_API 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 
)

Definition at line 42 of file eap_fast_crypto.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: