Skip to content

[nasa/nos3#688] Updates from Donnie-Ice for NOS3 vcid 3 fix; #479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ https://github.com/nasa/CryptoLib/wiki

Please open an issue or discussion if you find any problems or have questions. We are a small team, but will try to respond in a timely fashion.

If you would like to contribute to the repository, please complete the [CryptoLib_Indv_CLA](./doc/CryptoLib_Indv_CLA.pdf) form and submit it to gsfc-softwarerequest@mail.nasa.gov with John.P.Lucas@nasa.gov copied. Next please create an issue capturing work to be done noting you intend to work it, a related branch, and submit a pull request when ready and we'll work to get it integrated.
If you would like to contribute to the repository, please complete the [CryptoLib_Indv_CLA](./doc/CryptoLib_Indv_CLA.pdf) form and submit it to gsfc-softwarerequest@mail.nasa.gov with Justin.R.Morris@nasa.gov copied. Next please create an issue capturing work to be done noting you intend to work it, a related branch, and submit a pull request when ready and we'll work to get it integrated.
15 changes: 15 additions & 0 deletions src/core/crypto_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,34 @@ int32_t Crypto_SC_Init(void)
sa_if->sa_get_from_spi(3, &sa_ptr);
sa_ptr->sa_state = SA_OPERATIONAL;
sa_ptr->gvcid_blk.vcid = 3;
sa_ptr->acs = CRYPTO_MAC_HMAC_SHA256;
sa_ptr->abm_len = ABM_SIZE;
sa_ptr->shivf_len = 0;
sa_ptr->iv_len = 0;
sa_if->sa_get_from_spi(5, &sa_ptr);
sa_ptr->sa_state = SA_OPERATIONAL;
sa_ptr->shsnf_len = 0;
sa_ptr->arsn_len = 0;
sa_ptr->gvcid_blk.vcid = 1;
sa_if->sa_get_from_spi(6, &sa_ptr);
sa_ptr->sa_state = SA_OPERATIONAL;
sa_ptr->ecs = CRYPTO_CIPHER_AES256_GCM;
sa_ptr->gvcid_blk.vcid = 4;
sa_ptr->ekid = 9;
sa_ptr->akid = 9;
sa_ptr->shplf_len = 0;
sa_ptr->shivf_len = 12;
sa_ptr->iv_len = 12;
sa_ptr->abm_len = ABM_SIZE;
sa_if->sa_get_from_spi(7, &sa_ptr);
sa_ptr->sa_state = SA_OPERATIONAL;
sa_ptr->abm_len = ABM_SIZE;
sa_ptr->acs = CRYPTO_MAC_HMAC_SHA256;
sa_ptr->ekid = 130;
sa_ptr->akid = 130;
sa_ptr->gvcid_blk.vcid = 5;
sa_ptr->shivf_len = 0;
sa_ptr->iv_len = 0;

return status;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/crypto_tm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ int32_t Crypto_TM_ProcessSecurity(uint8_t *p_ingest, uint16_t len_ingest, uint8_
}
// Increment byte_idx past Security Header Fields based on SA values
byte_idx += sa_ptr->shivf_len;
byte_idx += (sa_ptr->arsn_len - sa_ptr->shsnf_len);
byte_idx += sa_ptr->shsnf_len;
byte_idx += sa_ptr->shplf_len;

#ifdef SA_DEBUG
Expand Down