Skip to content

[nasa/cryptolib#401] Readded UT and MAC debug comments #473

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
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
21 changes: 21 additions & 0 deletions src/crypto/libgcrypt/cryptography_interface_libgcrypt.template.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,27 @@ static int32_t cryptography_aead_decrypt(uint8_t *data_out, size_t len_data_out,

if (authenticate_bool == CRYPTO_TRUE)
{
// ********** USED FOR TAG DEBUGGING ***********
// ********* DO NOT USE IN PRODUCTION **********

// printf("Received MAC is: \n\t0x");
// for (uint32_t i = 0; i < mac_size; i++)
// {
// printf("%02X", mac[i]);
// }
// printf("\n");

// gcry_error = gcry_cipher_gettag(tmp_hd,
// mac,
// mac_size);

// printf("Calculated MAC is: \n\t0x");
// for (uint32_t i = 0; i < mac_size; i++)
// {
// printf("%02X", mac[i]);
// }
// printf("\n");

gcry_error = gcry_cipher_checktag(tmp_hd,
mac, // tag input
mac_size // tag size
Expand Down
Loading