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

Update Key Mapping #198 #255

Open rjbrown2 opened 4 days ago

rjbrown2 commented 4 days ago

Handles the internal side for now.

Additional Queries will be needed for MariaDB. (Should hopefully be simple to implement on KMC side once we have automated containers for testing.

Added -DKEY_VALIDATION flags for ease of use later.

These changes will require us to tackle the SA modifications sooner than later, and then rework unit tests.

@jlucas9: Should we create a separate issue for MDB/KMC additions, or leave this issue open for now?

codecov-commenter commented 4 days ago

Codecov Report

Attention: Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.

Project coverage is 82.49%. Comparing base (3c2a3d4) to head (ab6f0ec).

Files Patch % Lines
src/sa/internal/sa_interface_inmemory.template.c 0.00% 23 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #255 +/- ## ========================================== - Coverage 82.68% 82.49% -0.19% ========================================== Files 40 40 Lines 10026 10049 +23 Branches 814 818 +4 ========================================== Hits 8290 8290 - Misses 1437 1460 +23 Partials 299 299 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rjbrown2 commented 4 days ago

@jlucas9 : Should note that I did not include the Zero check for ekid/akid that we discussed. I was incorrect in my assumption of how they are initialized. They are not set to 0, they are set initially to the same as the SPI. So a fresh SA without any internal configuration, for example: SA:1 will have EKID=1, AKID=1, and SA:2, EKID=2, AKID=2. We may want to reconsider this in our init function, or just ignore if they are the same as the SPI (but could have weird edge cases).