coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
vboot_crypto.c File Reference
#include <2crypto.h>
#include <2return_codes.h>
#include <bl_uapp/bl_syscall_public.h>
#include <commonlib/bsd/helpers.h>
#include <console/console.h>
#include "psp_verstage.h"
#include <stddef.h>
#include <string.h>
#include <swab.h>
#include <vb2_api.h>
Include dependency graph for vboot_crypto.c:

Go to the source code of this file.

Functions

vb2_error_t vb2ex_hwcrypto_digest_init (enum vb2_hash_algorithm hash_alg, uint32_t data_size)
 
vb2_error_t vb2ex_hwcrypto_digest_extend (const uint8_t *buf, uint32_t size)
 
vb2_error_t vb2ex_hwcrypto_digest_finalize (uint8_t *digest, uint32_t digest_size)
 
vb2_error_t vb2ex_hwcrypto_modexp (const struct vb2_public_key *key, uint8_t *inout, uint32_t *workbuf32, int exp)
 

Variables

static struct sha_generic_data sha_op
 
static uint32_t sha_op_size_remaining
 
static uint8_t sha_hash [64]
 

Function Documentation

◆ vb2ex_hwcrypto_digest_extend()

vb2_error_t vb2ex_hwcrypto_digest_extend ( const uint8_t buf,
uint32_t  size 
)

Definition at line 47 of file vboot_crypto.c.

References BIOS_ERR, buf, printk, sha_op, sha_op_size_remaining, and svc_crypto_sha().

Here is the call graph for this function:

◆ vb2ex_hwcrypto_digest_finalize()

vb2_error_t vb2ex_hwcrypto_digest_finalize ( uint8_t digest,
uint32_t  digest_size 
)

Definition at line 84 of file vboot_crypto.c.

References BIOS_ERR, memcpy(), printk, sha_hash, and sha_op.

Here is the call graph for this function:

◆ vb2ex_hwcrypto_digest_init()

vb2_error_t vb2ex_hwcrypto_digest_init ( enum vb2_hash_algorithm  hash_alg,
uint32_t  data_size 
)

Definition at line 18 of file vboot_crypto.c.

References BIOS_DEBUG, BIOS_INFO, NULL, platform_set_sha_op(), printk, sha_hash, sha_op, and sha_op_size_remaining.

Here is the call graph for this function:

◆ vb2ex_hwcrypto_modexp()

vb2_error_t vb2ex_hwcrypto_modexp ( const struct vb2_public_key *  key,
uint8_t inout,
uint32_t workbuf32,
int  exp 
)

Definition at line 101 of file vboot_crypto.c.

References BIOS_ERR, printk, svc_modexp(), and swab32.

Here is the call graph for this function:

Variable Documentation

◆ sha_hash

uint8_t sha_hash[64]
static

Definition at line 16 of file vboot_crypto.c.

Referenced by vb2ex_hwcrypto_digest_finalize(), and vb2ex_hwcrypto_digest_init().

◆ sha_op

struct sha_generic_data sha_op
static

◆ sha_op_size_remaining

uint32_t sha_op_size_remaining
static

Definition at line 15 of file vboot_crypto.c.

Referenced by vb2ex_hwcrypto_digest_extend(), and vb2ex_hwcrypto_digest_init().