CWE-1279 is about performing cryptographic operations without making sure the supporting inputs are ready to supply valid data. It is a hardware sequencing weakness, relevant to teams designing crypto blocks.
How it happens
Many cryptographic hardware units depend on other units for information. MITRE gives two examples.
- A crypto unit that depends on an external random number generator (RNG) for entropy must wait until the RNG is producing random numbers.
- A crypto unit that fetches a private key from a fuse unit must wait until the fuse unit is up and running before a key can be supplied.
If the crypto unit starts early, it may consume low entropy, a default value or nothing at all. The output still looks like ciphertext, which is why this is easy to miss.
What an attacker gains
Consequences span access control, confidentiality, integrity, availability, authentication and more, varying by context. Predictable randomness or a missing key can make encrypted data guessable or forgeable.
How to find it
The record lists no detection methods. Trace the dependencies of each crypto unit and check, in simulation and on hardware, what happens if it is triggered during start up or immediately after a reset. Look for a ready signal and confirm it is actually used.
How to fix it
- Document every input each crypto unit needs.
- Gate the operation on a ready indication from each supporting unit.
- Fail closed when an input is not ready, rather than proceeding with a default.
- Test early boot and reset recovery timing explicitly.
Quick check
What goes wrong if the RNG is not ready?
The crypto unit lacks real entropy, which can compromise the cryptographic result.