VSF Documented
Data Structures | Typedefs | Functions | Variables
vsf_linux_core_crypto.c File Reference
#include "shell/sys/linux/vsf_linux_cfg.h"
#include <unistd.h>
#include <string.h>
#include <linux/crypto.h>
#include <crypto/internal.h>
#include <crypto/akcipher.h>
#include <crypto/kpp.h>
#include <crypto/hash.h>
#include <crypto/sha2.h>
#include <crypto/ecdh.h>
#include <mbedtls/entropy.h>
#include <mbedtls/ctr_drbg.h>
#include <psa/crypto.h>
#include <mbedtls/ecdh.h>

Data Structures

struct  psa_key_ctx_t
 
struct  psa_ecdh_ctx_t
 
struct  vsf_linux_crypto_t
 

Typedefs

typedef struct psa_key_ctx_t psa_key_ctx_t
 
typedef struct psa_ecdh_ctx_t psa_ecdh_ctx_t
 
typedef struct vsf_linux_crypto_t vsf_linux_crypto_t
 

Functions

int crypto_register_alg (struct crypto_alg *alg)
 
void crypto_unregister_alg (struct crypto_alg *alg)
 
struct crypto_algcrypto_find_alg (const char *alg_name, const struct crypto_type *frontend, u32 type, u32 mask)
 
void * crypto_alloc_tfm (const char *alg_name, const struct crypto_type *frontend, u32 type, u32 mask)
 
void crypto_destroy_tfm (void *mem, struct crypto_tfm *tfm)
 
void crypto_req_done (void *data, int err)
 
int crypto_register_template (struct crypto_template *tmpl)
 
int crypto_register_shash (struct shash_alg *alg)
 
void crypto_unregister_shash (struct shash_alg *alg)
 
int crypto_register_shashes (struct shash_alg *algs, int count)
 
int crypto_shash_setkey (struct crypto_shash *tfm, const u8 *key, unsigned int keylen)
 
int crypto_shash_init (struct shash_desc *desc)
 
int crypto_shash_export (struct shash_desc *desc, void *out)
 
int crypto_shash_import (struct shash_desc *desc, const void *in)
 
int crypto_shash_finup (struct shash_desc *desc, const u8 *data, unsigned int len, u8 *out)
 
int crypto_shash_update (struct shash_desc *desc, const u8 *data, unsigned int len)
 
int crypto_shash_final (struct shash_desc *desc, u8 *out)
 
int crypto_register_akcipher (struct akcipher_alg *alg)
 
void crypto_unregister_akcipher (struct akcipher_alg *alg)
 
int crypto_register_akciphers (struct akcipher_alg *algs, int count)
 
int crypto_akcipher_encrypt (struct akcipher_request *req)
 
int crypto_register_kpp (struct kpp_alg *alg)
 
void crypto_unregister_kpp (struct kpp_alg *alg)
 
int crypto_register_kpps (struct kpp_alg *algs, int count)
 
unsigned int crypto_ecdh_key_len (const struct ecdh *params)
 
int crypto_ecdh_encode_key (char *buf, unsigned int len, const struct ecdh *params)
 
int crypto_ecdh_decode_key (const char *buf, unsigned int len, struct ecdh *params)
 
int vsf_linux_crypto_init (void)
 

Variables

const struct crypto_type crypto_shash_type
 
const struct crypto_type crypto_akcipher_type
 
const struct crypto_type crypto_kpp_type
 

Typedef Documentation

◆ psa_key_ctx_t

typedef struct psa_key_ctx_t psa_key_ctx_t

◆ psa_ecdh_ctx_t

◆ vsf_linux_crypto_t

Function Documentation

◆ crypto_register_alg()

int crypto_register_alg ( struct crypto_alg alg)

◆ crypto_unregister_alg()

void crypto_unregister_alg ( struct crypto_alg alg)

◆ crypto_find_alg()

struct crypto_alg * crypto_find_alg ( const char *  alg_name,
const struct crypto_type frontend,
u32  type,
u32  mask 
)

◆ crypto_alloc_tfm()

void * crypto_alloc_tfm ( const char *  alg_name,
const struct crypto_type frontend,
u32  type,
u32  mask 
)

◆ crypto_destroy_tfm()

void crypto_destroy_tfm ( void *  mem,
struct crypto_tfm tfm 
)

◆ crypto_req_done()

void crypto_req_done ( void *  data,
int  err 
)

◆ crypto_register_template()

int crypto_register_template ( struct crypto_template tmpl)

◆ crypto_register_shash()

int crypto_register_shash ( struct shash_alg alg)

◆ crypto_unregister_shash()

void crypto_unregister_shash ( struct shash_alg alg)

◆ crypto_register_shashes()

int crypto_register_shashes ( struct shash_alg algs,
int  count 
)

◆ crypto_shash_setkey()

int crypto_shash_setkey ( struct crypto_shash tfm,
const u8 key,
unsigned int  keylen 
)

◆ crypto_shash_init()

int crypto_shash_init ( struct shash_desc desc)

◆ crypto_shash_export()

int crypto_shash_export ( struct shash_desc desc,
void *  out 
)

◆ crypto_shash_import()

int crypto_shash_import ( struct shash_desc desc,
const void *  in 
)

◆ crypto_shash_finup()

int crypto_shash_finup ( struct shash_desc desc,
const u8 data,
unsigned int  len,
u8 out 
)

◆ crypto_shash_update()

int crypto_shash_update ( struct shash_desc desc,
const u8 data,
unsigned int  len 
)

◆ crypto_shash_final()

int crypto_shash_final ( struct shash_desc desc,
u8 out 
)

◆ crypto_register_akcipher()

int crypto_register_akcipher ( struct akcipher_alg alg)

◆ crypto_unregister_akcipher()

void crypto_unregister_akcipher ( struct akcipher_alg alg)

◆ crypto_register_akciphers()

int crypto_register_akciphers ( struct akcipher_alg algs,
int  count 
)

◆ crypto_akcipher_encrypt()

int crypto_akcipher_encrypt ( struct akcipher_request req)

◆ crypto_register_kpp()

int crypto_register_kpp ( struct kpp_alg alg)

◆ crypto_unregister_kpp()

void crypto_unregister_kpp ( struct kpp_alg alg)

◆ crypto_register_kpps()

int crypto_register_kpps ( struct kpp_alg algs,
int  count 
)

◆ crypto_ecdh_key_len()

unsigned int crypto_ecdh_key_len ( const struct ecdh params)

◆ crypto_ecdh_encode_key()

int crypto_ecdh_encode_key ( char *  buf,
unsigned int  len,
const struct ecdh params 
)

◆ crypto_ecdh_decode_key()

int crypto_ecdh_decode_key ( const char *  buf,
unsigned int  len,
struct ecdh params 
)

◆ vsf_linux_crypto_init()

int vsf_linux_crypto_init ( void  )

Variable Documentation

◆ crypto_shash_type

const struct crypto_type crypto_shash_type
Initial value:
= {
.tfmsize = offsetof(struct crypto_shash, base),
}
#define CRYPTO_ALG_TYPE_HASH
Definition crypto.h:21
#define offsetof(__type, __member)
Definition stddef.h:84
Definition hash.h:29

◆ crypto_akcipher_type

const struct crypto_type crypto_akcipher_type
Initial value:
= {
.tfmsize = offsetof(struct crypto_akcipher, base),
}
#define CRYPTO_ALG_TYPE_AKCIPHER
Definition crypto.h:15
Definition akcipher.h:15

◆ crypto_kpp_type

const struct crypto_type crypto_kpp_type
Initial value:
= {
.tfmsize = offsetof(struct crypto_kpp, base),
}
#define CRYPTO_ALG_TYPE_KPP
Definition crypto.h:17
Definition kpp.h:14
Generated from commit: vsfteam/vsf@f33b89f