nasa / nasa/CryptoLib

CryptoLib ApplySecurity with Libgcrypt Fails on FIPS Mode Enabled Environment

Open
#72 2 comments 0 reactions 1 assignee View on GitHub

@jlucas9 is already working on this.

Since Mar 29, 2023.

kmc
Dominant language
C
Stars
169
Forks
67
PR merge metrics
No merged PRs in 30d

Description

The CryptoLib Crypto_TC_ApplySecurity function fails when using the libgcrypt cryptography interface on FIPS mode enabled environments with the following error:
ERROR: gcry_cipher_encrypt error code 156
Failure: gcrypt/Invalid state

It turns out this is because AES-GCM is not FIPS certified when manually setting the IV, like we do since the IV & Sequence Number are the same.

To get around this, we need to manually modify CryptoLib to not fail due to invalid state when FIPS mode is enabled. How exactly this should be implemented is TBD, but CryptoLib with libgcrypt should function in FIPS mode hosts.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.