CWE-1279: Cryptographic Operations are run Before Supporting Units are Ready

Export to Word

Description

Performing cryptographic operations without ensuring that the supporting inputs are ready to supply valid data may compromise the cryptographic result.

Extended Description

Many cryptographic hardware units depend upon other hardware units to supply information to them to produce a securely encrypted result. For example, a cryptographic unit that depends on an external random-number-generator (RNG) unit for entropy must wait until the RNG unit is producing random numbers. If a cryptographic unit retrieves a private encryption key from a fuse unit, the fuse unit must be up and running before a key may be supplied.


ThreatScore

Threat Mapped score: 0.0

Industry: Finiancial

Threat priority: Unclassified


Observed Examples (CVEs)

Related Attack Patterns (CAPEC)


Attack TTPs

N/A

Modes of Introduction

Phase Note
Architecture and Design N/A
Implementation The decision to continue using a cryptographic unit even though the input units to it are not producing valid data will compromise the encrypted result.

Common Consequences

Potential Mitigations

Applicable Platforms


Demonstrative Examples

Intro: The following pseudocode illustrates the weak encryption resulting from the use of a pseudo-random-number generator output.

Body: In the example above, first a check of RNG ready is performed. If the check fails, the RNG is ignored and a hard coded value is used instead. The hard coded value severely weakens the encrypted output.

If random_number_generator_self_test_passed() == TRUE then Seed = get_random_number_from_RNG() else Seed = hardcoded_number

Notes

← Back to CWE list