BSL v0.0.0 - 0.g33cf081
AMMOS Bundle Protocol Security Library (BSL)
|
Contains functionality and data structures to implement BCB using security context in RFC9173. More...
#include <stdlib.h>
#include <qcbor/qcbor_encode.h>
#include <qcbor/qcbor_spiffy_decode.h>
#include <BPSecLib_Private.h>
#include <CryptoInterface.h>
#include "DefaultSecContext.h"
#include "DefaultSecContext_Private.h"
#include "rfc9173.h"
Functions | |
int | BSLX_BCB_ComputeAAD (BSLX_BCB_t *bcb_context) |
static int | BSLX_BCB_Decrypt (BSLX_BCB_t *bcb_context) |
int | BSLX_BCB_Encrypt (BSLX_BCB_t *bcb_context) |
int | BSLX_BCB_GetParams (const BSL_BundleRef_t *bundle, BSLX_BCB_t *bcb_context, const BSL_SecOper_t *sec_oper) |
int | BSLX_BCB_Init (BSLX_BCB_t *bcb_context, BSL_BundleRef_t *bundle, const BSL_SecOper_t *sec_oper) |
void | BSLX_BCB_Deinit (BSLX_BCB_t *bcb_context) |
int | BSLX_BCB_Execute (BSL_LibCtx_t *lib, BSL_BundleRef_t *bundle, const BSL_SecOper_t *sec_oper, BSL_SecOutcome_t *sec_outcome) |
Contains functionality and data structures to implement BCB using security context in RFC9173.
int BSLX_BCB_Encrypt | ( | BSLX_BCB_t * | bcb_context | ) |
wrapped key always 8 bytes greater than CEK [7] (2.2.1)
References BSL_CanonicalBlock_t::block_num, BSL_Cipher_AddAAD(), BSL_Cipher_AddSeq(), BSL_Cipher_Deinit(), BSL_Cipher_FinalizeSeq(), BSL_Cipher_GetTag(), BSL_Cipher_Init(), BSL_Crypto_ClearKeyHandle(), BSL_CRYPTO_ENCRYPT, BSL_Crypto_GenIV(), BSL_Crypto_GenKey(), BSL_Crypto_WrapKey(), BSL_Data_InitBuffer(), BSL_ERR_HOST_CALLBACK_FAILED, BSL_ERR_SECURITY_CONTEXT_CRYPTO_FAILED, BSL_ERR_SECURITY_CONTEXT_FAILED, BSL_LOG_DEBUG, BSL_LOG_ERR, BSL_LOG_WARNING, BSL_SeqReader_Destroy(), BSL_SeqWriter_Destroy(), BSL_SUCCESS, BSLB_Crypto_GetRegistryKey(), BSL_CanonicalBlock_t::btsd_len, BSLX_BCB_t::bundle, BSLX_BCB_t::key_id, BSL_Data_t::len, and BSL_Data_t::ptr.