Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-325 (缺少必要的密码学步骤) — Vulnerability Class 35

35 vulnerabilities classified as CWE-325 (缺少必要的密码学步骤). AI Chinese analysis included.

CWE-325 represents a critical implementation flaw where software fails to execute a mandatory step within a cryptographic algorithm, thereby undermining the security guarantees promised by the underlying protocol. This weakness typically manifests when developers omit essential operations such as proper padding, key derivation, or initialization vector handling, resulting in ciphertext that is significantly easier to break than intended. Attackers exploit this gap by leveraging the reduced entropy or structural predictability to perform statistical analysis, brute-force attacks, or known-plaintext attacks that would otherwise be computationally infeasible against a correctly implemented cipher. To prevent this vulnerability, developers must rigorously adhere to standardized cryptographic libraries and specifications, ensuring every algorithmic step is explicitly coded and verified. Comprehensive code reviews and automated static analysis tools can further detect missing steps, ensuring that the final implementation matches the theoretical security model of the chosen cryptographic primitive.

MITRE CWE Description
The product does not implement a required step in a cryptographic algorithm, resulting in weaker encryption than advertised by the algorithm.
Common Consequences (3)
Access ControlBypass Protection Mechanism
Confidentiality, IntegrityRead Application Data, Modify Application Data
Accountability, Non-RepudiationHide Activities
Examples (1)
The example code is taken from the HMAC engine inside the buggy OpenPiton SoC of HACK@DAC'21 [REF-1358]. HAMC is a message authentication code (MAC) that uses both a hash and a secret crypto key. The HMAC engine in HACK@DAC SoC uses the SHA-256 module for the calculation of the HMAC for 512 bits messages.
logic [511:0] bigData; ... hmac hmac( .clk_i(clk_i), .rst_ni(rst_ni && ~rst_4), .init_i(startHash && ~startHash_r), .key_i(key), .ikey_hash_i(ikey_hash), .okey_hash_i(okey_hash), .key_hash_bypass_i(key_hash_bypass), .message_i(bigData), .hash_o(hash), .ready_o(ready), .hash_valid_o(hashValid)
Bad · Verilog

Vulnerabilities classified as CWE-325 (缺少必要的密码学步骤) represent 35 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.