nasa / CryptoLib

Provide a software-only solution using the CCSDS Space Data Link Security Protocol - Extended Procedures (SDLS-EP) to secure communications between a spacecraft running the core Flight System (cFS) and a ground station.
Other
66 stars 25 forks source link

KMC Key Mapping - SA Updates - Configurations - Unit Tests #256

Open rjbrown2 opened 2 days ago

rjbrown2 commented 2 days ago

198

255

Continue update on KMC Interface side. Should just require a new query to return all of the associations by SPI, ekid, and akid. The same logic (plus sql code) should be all that is needed.

Will require automated containers for testing.

This should be handled at the same time as an SA and unit test rework, as this update will break all tests, and require the SA work to be fully implemented - As per #171, we should have an SA for each algorithm and combination of encryption methods. These new SA descriptions should also have unique keys associated with them per the standard (currently 130 is used for all).

Following SA updates, Unit tests can be reconfigured with more coverage, and made more generic and used with every module. This will require some unit test config genericism, and we should also consider updating some interfaces, and adding others as mentioned by Cutright:

Reviewing this and had a thought looking over lines like the following:

extern int32_t Crypto_Config_CryptoLib(uint8_t key_type, uint8_t sadb_type, uint8_t cryptography_type, uint8_t crypto_create_fecf, uint8_t process_sdls_pdus, uint8_t has_pus_hdr, uint8_t ignore_sa_state, uint8_t ignore_anti_replay, uint8_t unique_sa_per_mapid, uint8_t crypto_check_fecf, uint8_t vcid_bitmask, uint8_t crypto_increment_nontransmitted_iv);

Should we split this config into two configuration functions? One for configuring interfaces, and one for configuring behavior?

e.g. : Crypto_Config_Interfaces(key_type, sadb_type, cryptography_type) Crypto_Config_Behavior(crypto_create_fecf, process_sdls_pdus, has_pus_hdr, ignore_sa_state, ignore_anti_replay, unique_sa_per_mapid, crypto_check_fecf, vcid_bitmask, crypto_increment_nontransmitted_iv);

171

149

185