|
BSL v1.0.0 - 16.g9d98179
AMMOS Bundle Protocol Security Library (BSL)
|
Header for the implementation of an example default security context (RFC 9173). More...
Include dependency graph for DefaultSecContext.h:
This graph shows which files directly or indirectly include this file:Macros | |
| #define | BSLX_MAX_AES_PAD (64) |
Functions | |
| int | BSLX_BCB_Execute (BSL_LibCtx_t *lib, BSL_BundleRef_t *bundle, const BSL_SecOper_t *sec_oper, BSL_SecOutcome_t *sec_outcome) |
| int | BSLX_BIB_Execute (BSL_LibCtx_t *lib, BSL_BundleRef_t *bundle, const BSL_SecOper_t *sec_oper, BSL_SecOutcome_t *sec_outcome) |
| bool | BSLX_BIB_Validate (BSL_LibCtx_t *lib, const BSL_BundleRef_t *bundle, const BSL_SecOper_t *sec_oper) |
| bool | BSLX_BCB_Validate (BSL_LibCtx_t *lib, const BSL_BundleRef_t *bundle, const BSL_SecOper_t *sec_oper) |
Header for the implementation of an example default security context (RFC 9173).
| #define BSLX_MAX_AES_PAD (64) |
| int BSLX_BCB_Execute | ( | BSL_LibCtx_t * | lib, |
| BSL_BundleRef_t * | bundle, | ||
| const BSL_SecOper_t * | sec_oper, | ||
| BSL_SecOutcome_t * | sec_outcome | ||
| ) |
References BSLX_BCB_t::aad_scope, BSLX_BCB_t::aes_variant, BSLX_BCB_t::authtag, BSL_BundleCtx_GetBlockMetadata(), BSL_calloc(), BSL_ERR_HOST_CALLBACK_FAILED, BSL_ERR_SECURITY_CONTEXT_FAILED, BSL_free(), BSL_LOG_ERR, BSL_LOG_INFO, BSL_SecOper_GetSecurityBlockNum(), BSL_SecOper_GetTargetBlockNum(), BSL_SecOper_IsRoleSource(), BSL_SecOutcome_AppendParam(), BSL_SecOutcome_AppendResult(), BSL_SecParam_Deinit(), BSL_SecParam_InitBytestr(), BSL_SecParam_InitInt64(), BSL_SecParam_Sizeof(), BSL_SecResult_Deinit(), BSL_SecResult_InitFull(), BSL_SecResult_Sizeof(), BSL_SUCCESS, BSLX_BCB_ComputeAAD(), BSLX_BCB_Decrypt(), BSLX_BCB_Deinit(), BSLX_BCB_Encrypt(), BSLX_BCB_GetParams(), BSLX_BCB_Init(), CHK_ARG_NONNULL, CHK_PRECONDITION, BSLX_BCB_t::iv, BSL_Data_t::len, RFC9173_BCB_RESULTID_AUTHTAG, RFC9173_BCB_SECPARAM_AADSCOPE, RFC9173_BCB_SECPARAM_AESVARIANT, RFC9173_BCB_SECPARAM_IV, RFC9173_BCB_SECPARAM_WRAPPEDKEY, RFC9173_CONTEXTID_BCB_AES_GCM, and BSLX_BCB_t::wrapped_key.
Referenced by BSL_TestUtils_SetupDefaultSecurityContext(), MockBPA_Agent_Init(), test_RFC9173_AppendixA_Example2_BCB_Acceptor(), test_RFC9173_AppendixA_Example2_BCB_Source(), test_sec_accept_keyunwrap(), and test_sec_source_keywrap().
| bool BSLX_BCB_Validate | ( | BSL_LibCtx_t * | lib, |
| const BSL_BundleRef_t * | bundle, | ||
| const BSL_SecOper_t * | sec_oper | ||
| ) |
Referenced by BSL_TestUtils_SetupDefaultSecurityContext(), and MockBPA_Agent_Init().
| int BSLX_BIB_Execute | ( | BSL_LibCtx_t * | lib, |
| BSL_BundleRef_t * | bundle, | ||
| const BSL_SecOper_t * | sec_oper, | ||
| BSL_SecOutcome_t * | sec_outcome | ||
| ) |
References BSL_BundleCtx_GetBlockMetadata(), BSL_BundleCtx_GetBundleMetadata(), BSL_calloc(), BSL_Data_Deinit(), BSL_DATA_INIT_NULL, BSL_Data_InitBuffer(), BSL_ERR_SECURITY_CONTEXT_FAILED, BSL_free(), BSL_LOG_ERR, BSL_LOG_INFO, BSL_LOG_WARNING, BSL_SecOper_CountParams(), BSL_SecOper_GetParamAt(), BSL_SecOper_GetSecurityBlockNum(), BSL_SecOper_GetTargetBlockNum(), BSL_SecOper_IsConsistent(), BSL_SecOutcome_AppendParam(), BSL_SecOutcome_AppendResult(), BSL_SecParam_Deinit(), BSL_SecParam_GetId(), BSL_SecParam_InitBytestr(), BSL_SecParam_IsParamIDOutput(), BSL_SecParam_Sizeof(), BSL_SecResult_Deinit(), BSL_SecResult_InitFull(), BSL_SecResult_Sizeof(), BSL_SUCCESS, BSLX_BIB_Deinit(), BSLX_BIB_GenHMAC(), BSLX_BIB_GenIPPT(), BSLX_BIB_InitFromSecOper(), CHK_ARG_NONNULL, CHK_PRECONDITION, BSLX_BIB_t::hmac_result_val, BSL_Data_t::len, BSLX_BIB_t::primary_block, RFC9173_BIB_PARAMID_WRAPPED_KEY, RFC9173_BIB_RESULTID_HMAC, RFC9173_CONTEXTID_BIB_HMAC_SHA2, BSLX_BIB_t::sec_block, BSLX_BIB_t::target_block, and BSLX_BIB_t::wrapped_key.
Referenced by BSL_TestUtils_SetupDefaultSecurityContext(), MockBPA_Agent_Init(), test_RFC9173_AppendixA_Example1_BIB_Source(), test_sec_accept_keyunwrap(), and test_sec_source_keywrap().
| bool BSLX_BIB_Validate | ( | BSL_LibCtx_t * | lib, |
| const BSL_BundleRef_t * | bundle, | ||
| const BSL_SecOper_t * | sec_oper | ||
| ) |
Referenced by BSL_TestUtils_SetupDefaultSecurityContext(), and MockBPA_Agent_Init().