CryptoLib
CryptoLib copied to clipboard
API Review and Update
High level comments / recommendations to be addressed in review:
- Take a look and use "const" where possible
- Should we stick with double pointers? Maybe also provide a single pointer option? Capture why somewhere
- Should all the currently available extern calls be available or a small subset?
- Is there a case to take SA_PLAINTEXT and other things defined in crypto_config.h and change them to enums vs #defines?
Function APIs:
- Crypto_TC_ApplySecurity
- Should the
p_in_framebe a const pointer? - What assumptions can be made about the
pp_enc_framedouble pointer? Is this assumed pre-allocated to maximum length?
- Should the
- Crypto_TC_ProcessSecurity
- Should
int* len_ingestactually be a uint16_t? - Should
TC_t*be used or simply a uint8_t array?
- Should
- Crypto_TM_ApplySecurity
- Should we be using
SecurityAssociation_t*or simply providing the uint8_t array and assuming use of an internally stored active TM SPI?
- Should we be using
- Crypto_TM_ProcessSecurity
- Should
uint16_t len_ingestbe a pointer or just passing the actual value across the board for the APIs?
- Should
Take a look and use "const" where possible
Should we stick with double pointers? Maybe also provide a single pointer option?