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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-1255 — Vulnerability Class 1

1 vulnerabilities classified as CWE-1255. AI Chinese analysis included.

CWE-1255 represents a side-channel weakness where an attacker monitors a device’s real-time power consumption during security token evaluation. This vulnerability arises when the comparison logic for validating tokens is not constant-time, causing power usage to fluctuate based on the specific bits being compared. Attackers exploit this by analyzing these power variations to deduce the correct reference token value, effectively bypassing authentication mechanisms without needing direct access to the internal logic. To mitigate this risk, developers must implement constant-time comparison algorithms that ensure execution time and power draw remain uniform regardless of input data. Additionally, employing hardware-level countermeasures, such as power masking or randomizing processing delays, can obscure the correlation between power fluctuations and secret values, thereby neutralizing the side-channel attack vector.

MITRE CWE Description
A device's real time power consumption may be monitored during security token evaluation and the information gleaned may be used to determine the value of the reference token. The power consumed by a device may be instrumented and monitored in real time. If the algorithm for evaluating security tokens is not sufficiently robust, the power consumption may vary by token entry comparison against the reference value. Further, if retries are unlimited, the power difference between a "good" entry and a "bad" entry may be observed and used to determine whether each entry itself is correct thereby allowing unauthorized parties to calculate the reference value.
Common Consequences (1)
Confidentiality, Integrity, Availability, Access Control, Accountability, Authentication, Authorization, Non-RepudiationModify Memory, Read Memory, Read Files or Directories, Modify Files or Directories, Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity, Bypass Protection Mechanism, Read Application Data, Modify Application Data, Hide Activities
As compromising a security token may result in complete system control, the impacts are relatively universal.
Mitigations (5)
Architecture and DesignThe design phase must consider each check of a security token against a standard and the amount of power consumed during the check of a good token versus a bad token. The alternative is an all at once check where a retry counter is incremented PRIOR to the check.
Architecture and DesignAnother potential mitigation is to parallelize shifting of secret data (see example 2 below). Note that the wider the bus the more effective the result.
Architecture and DesignAn additional potential mitigation is to add random data to each crypto operation then subtract it out afterwards. This is highly effective but costly in performance, area, and power consumption. It also requires a random number generator.
ImplementationIf the architecture is unable to prevent the attack, using filtering components may reduce the ability to implement an attack, however, consideration must be given to the physical removal of the filter elements.
IntegrationDuring integration, avoid use of a single secret for an extended period (e.g. frequent key updates). This limits the amount of data compromised but at the cost of complexity of use.
Examples (2)
Consider an example hardware module that checks a user-provided password (or PIN) to grant access to a user. The user-provided password is compared against a stored value byte-by-byte.
static nonvolatile password_tries = NUM_RETRIES; do while (password_tries == 0) ; // Hang here if no more password tries password_ok = 0; for (i = 0; i < NUM_PW_DIGITS; i++) if (GetPasswordByte() == stored_password([i]) password_ok |= 1; // Power consumption is different here else password_ok |= 0; // than from here end if (password_ok > 0) password_tries = NUM_RETRIES; break_to_Ok_to_proceed password_tries--; while (true) // Password OK
Bad · C
static nonvolatile password_tries = NUM_RETRIES; do while (password_tries == 0) ; // Hang here if no more password tries password_tries--;  // Put retry code here to catch partial retries password_ok = 0; for (i = 0; i < NUM_PW_DIGITS; i++) if (GetPasswordByte() == stored_password([i]) password_ok |= 0x10; // Power consumption here else password_ok |= 0x01; // is now the same here end if ((password_ok & 1) == 0) password_tries = NUM_RETRIES; break_to_Ok_to_proceed while (true) // Password OK
Good · C
This code demonstrates the transfer of a secret key using Serial-In/Serial-Out shift. It's easy to extract the secret using simple power analysis as each shift gives data on a single bit of the key.
module siso(clk,rst,a,q); input a; input clk,rst; output q; reg q; always@(posedge clk,posedge rst) begin if(rst==1'b1) q<1'b0; else q<a; end endmodule
Bad · Verilog
module pipo(clk,rst,a,q); input clk,rst; input[3:0]a; output[3:0]q; reg[3:0]q; always@(posedge clk,posedge rst) begin if (rst==1'b1) q<4'b0000; else q<a; end endmodule
Good · Verilog
CVE IDTitleCVSSSeverityPublished
CVE-2025-3301 DPA Countermeasures Unavailable for Certain Cryptographic Operations on Series 2 Devices — Series 2 SoCs and associated modules 7.5AIHighAI2025-04-29

Vulnerabilities classified as CWE-1255 represent 1 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.