---
title: 'TLGLock: Threshold Logic Locking'
url: https://www.emergentmind.com/topics/tlglock
type: topic
---

# TLGLock: Threshold Logic Locking

TLGLock is a logic-locking methodology that embeds secret keys directly into Threshold Logic Gates (TLGs) rather than attaching external XOR/XNOR key gates, latch blocks, or point-function obfuscation structures. The scheme is presented as a gate-level, stateless, and compact design paradigm that combines threshold-logic synthesis with key-dependent functionality and, in one implementation style, charge recycling. Its stated workflow is to synthesize a Boolean circuit into a TLG-based implementation, select a subset of TLGs to lock, and encode the key into the weighted threshold computation of those gates so that the correct key preserves the intended function while incorrect keys perturb the threshold inequality and corrupt outputs [2508.17809].

## 1. Conceptual basis

TLGLock is defined by the decision to make locking native to the gate structure. Instead of inserting a separate locking primitive around an already synthesized Boolean network, the method first converts the circuit into threshold logic and then embeds key bits into the gate’s weighted decision rule. The paper describes this as leveraging the structural expressiveness of TLGs and the energy efficiency of charge recycling to enforce key-dependent functionality at the gate level [2508.17809].

This positioning distinguishes TLGLock from several major families of prior logic-locking schemes. In conventional XOR/XNOR locking, keys are attached as explicit logic elements in the combinational network. In latch-based logic locking, by contrast, an interconnected subset of existing flip-flops is converted into pairs of programmable latches, and decoy latches and logic are added so that an attacker cannot easily determine which latch paths implement the real function [2005.10649]. TLGLock instead treats the weighted threshold test itself as the locus of obfuscation. The key is not a wrapper around the function; it is part of the function’s arithmetic decision boundary.

The paper situates this design choice as a way to obtain a compact alternative to conventional locking techniques while retaining tunability. A plausible implication is that the threshold-logic representation gives the designer a direct security-performance knob through weight selection and gate selection, rather than only through the number and placement of external key gates.

## 2. Threshold-logic formulation and key embedding

The computational model begins with the standard threshold-gate form

\[
\sum_{j=1}^{m} X_j \times W_j > T \quad \Rightarrow \quad Z=1
\]

\[
\sum_{j=1}^{m} X_j \times W_j \leq T \quad \Rightarrow \quad Z=0
\]

where \(X_j \in \{0,1\}\) are inputs, \(W_j\) are integer weights, \(T\) is the threshold, and \(Z\) is the output. The paper also states an equivalent form,

\[
\text{Output} =
\begin{cases}
1, & \text{if } \sum_{i=1}^{n} w_i \cdot x_i \geq T \\
0, & \text{otherwise}
\end{cases}
\]

which serves as the basis for the locking transformation [2508.17809].

TLGLock extends this rule by adding key bits as extra weighted inputs:

\[
\text{Output} =
\begin{cases}
1, & \text{if } \sum_{i=1}^{n} w_i \cdot x_i + \sum_{j=1}^{m} v_j \cdot k_j \geq T \\
0, & \text{otherwise}
\end{cases}
\]

Here, \(x_i\) are functional inputs, \(w_i\) their weights, \(k_j\) key bits, \(v_j\) key weights, and \(T\) the threshold. With the correct key vector \(\mathbf{K} = [k_1, k_2, \ldots, k_m]\), the key contribution is chosen so that the intended threshold behavior is preserved. For an incorrect key vector \(\mathbf{K}'\), the weighted sum changes by

\[
\Delta = \sum_{j=1}^{m} v_j \cdot (k_j' - k_j)
\]

and this deviation can move the sum across the threshold, thereby corrupting the output [2508.17809].

The paper illustrates the mechanism with a simple threshold gate:

\[
\text{Output} = 1 \quad \text{if} \quad 1 \cdot x_1 + 1 \cdot x_2 + 1 \cdot x_3 \geq 3
\]

After key insertion, the same gate becomes

\[
\text{Output} = 1 \quad \text{if} \quad 1 \cdot x_1 + 1 \cdot x_2 + 1 \cdot x_3 - 2 \cdot k_1 + 3 \cdot k_2 \geq 3
\]

and the correct key \([1,1]\) is stated to neutralize the effect of the key terms, preserving function [2508.17809].

A notable design point is the key-weight assignment strategy. The authors state that key inputs are embedded with weights proportional to the sum of the input weights. This is intended to make the key terms strong enough to influence whether the threshold is met while still preserving correct functionality under the right key. The paper further reports randomized key-weight experiments showing that corruption is highest for intermediate total key weights, whereas power and delay increase as key weights become more skewed or larger. This suggests that the threshold representation is used not only for embedding but also for tuning the security-overhead trade-off.

## 3. Synthesis-to-locking flow

The paper presents a complete synthesis-to-locking flow. The stated steps are:

1. Start from a BLIF or BENCH circuit description.  
2. Analyze Boolean structure and compute threshold cuts.  
3. Synthesize the circuit into TLGs with weights and thresholds.  
4. Optionally merge TLGs using linear-combination methods.  
5. Embed key inputs into selected gates.  
6. Extract and assign weights and thresholds.  
7. Map them to the physical TLG implementation.  
8. Synthesize, place, and route the locked TLG circuit.  
9. Iterate until performance targets are met [2508.17809].

This flow is formalized by two algorithms. In the first stage, the original circuit \(C_{\text{orig}}\) is synthesized into a TLG circuit \(C_{\text{TLG}}\), a subset of gates is selected for locking, and a random key vector is generated. The subset size is given as

\[
|\mathcal{G}_{\text{lock}}| = \left\lceil |C_{\text{TLG}}| \cdot \frac{P}{100} \right\rceil
\]

where \(P\) is the percentage of gates to lock [2508.17809].

In the second stage, each selected gate \(g_j\) is modified by integrating key bits \(\{k_{j1}, \ldots, k_{jm}\}\) and corresponding weights \(\{v_{j1}, \ldots, v_{jm}\}\). The gate sum is updated as

\[
S_j = \sum w_i x_i + \sum v_{jl} k_{jl}
\]

and the gate output is then assigned by

\[
g_j.\text{output} \gets \mathbb{1}[S_j \geq T_j]
\]

so the lock is directly embedded into the gate’s decision rule [2508.17809].

The stated implementation flow therefore couples logic synthesis and locking more tightly than flows that insert locks into an already fixed netlist. A plausible implication is that TLGLock’s efficacy depends materially on the quality of the threshold synthesis and on how selectively the designer chooses gates and weights.

## 4. Physical realization in LCTL and CRTL

The paper discusses two physical realizations of threshold logic: LCTL, described as latch-type low-power threshold logic, and CRTL, described as charge-recycling threshold logic. The CRTL realization is central to the title and framing of the method. It uses dynamic charge sharing or recycling to improve power and speed. Conceptually, inputs contribute weighted charge to a threshold decision element, and internal charge is reused during switching rather than fully dissipated each cycle [2508.17809].

In this framework, charge recycling is not itself the locking mechanism. The locking mechanism remains the insertion of key-dependent weighted terms into the threshold inequality. Charge recycling is instead the physical gate technology that carries the locked threshold function efficiently. The paper explicitly states that CRTL is better than LCTL in power and delay while still supporting key embedding [2508.17809].

The reported quantitative comparisons are benchmark-dependent. The abstract states that TLGLock achieves up to 30% area, 50% delay, and 20% power savings compared to latch-based locking schemes [2508.17809]. The detailed summary also reports that the conclusion gives up to 29% lower power, 58% faster delay, and 26% area reduction on large designs such as b17 [2508.17809]. Example table values in the paper include:

- **c17**: LCTL at 5 \(\mu m^2\), 2.5 \(\mu W\), 1.0 ns; CRTL at 3 \(\mu m^2\), 1.2 \(\mu W\), 0.5 ns.  
- **s386**: LCTL at 75 \(\mu m^2\), 35 \(\mu W\), 12 ns; CRTL at 50 \(\mu m^2\), 25 \(\mu W\), 8 ns.  
- **b17**: LCTL at 7200 \(\mu m^2\), 5000 \(\mu W\), 550 ns; CRTL at 6100 \(\mu m^2\), 4000 \(\mu W\), 250 ns [2508.17809].

These values are presented as evidence that the charge-recycling implementation gives TLGLock its main efficiency advantage over the latch-controlled threshold-logic variant.

## 5. Security model, corruption behavior, and SAT evaluation

The security intuition of TLGLock is arithmetic. The output of a TLG is determined by whether a weighted sum crosses a threshold; the key is injected as additional weighted terms; and an incorrect key shifts the weighted sum. When the shifted sum crosses the threshold incorrectly, the output becomes corrupted. The paper defines corruption rate as the percentage of incorrect primary outputs produced when incorrect keys are applied, and states that it is evaluated by exhaustively simulating incorrect key combinations and measuring output mismatch [2508.17809].

Under this metric, the paper reports that TLGLock can reach up to 100% output corruption under incorrect keys. The same section notes that randomized key-weight experiments show the highest corruption for intermediate total key weights, while larger or more skewed weights increase power and delay [2508.17809]. This suggests that key weighting acts as a tunable mechanism rather than a fixed recipe.

For attack evaluation, the paper reports SAT analysis with Minisat+ under a 1-hour timeout on ISCAS’85, ISCAS’89, ITC’99, and MCNC benchmarks, implemented in Cadence 45nm GPDK045 [2508.17809]. The reported findings include:

- larger circuits such as **c1355, c1908, c7552, i10, b17** timed out;
- smaller circuits such as **c17, s386, s526, s713** were solvable;
- **c2670** and **s5378** were reported as UNSAT in the solver run [2508.17809].

The paper states that TLGLock provides up to 3x higher SAT attack resistance than XOR and SFLL-HD baselines, depending on key weights and benchmark [2508.17809]. It also explicitly notes an important limitation: SAT resistance is measured by solver runtime and timeout behavior rather than by a formal proof of unbreakability. That caveat is central to interpreting the evaluation. The results indicate empirical hardness for the tested attack configuration, not an unconditional guarantee against deobfuscation.

## 6. Position within logic-locking research

TLGLock is positioned in the broader logic-locking landscape as a threshold-logic-native alternative to conventional gate-level locking and to sequential locking schemes. The paper says that it borrows from classical logic locking, SAT-resistant locking, threshold logic synthesis, and low-power charge recycling circuits, but makes its main contribution by re-encoding the circuit into threshold gates and embedding the key into the threshold weights [2508.17809].

The comparison against conventional XOR locking and SFLL-HD is summarized by normalized numbers reported in the paper:

| Scheme | Normalized SAT time | Normalized area / power / delay |
|---|---:|---:|
| XOR locking | 0.1× | baseline |
| SFLL-HD\(^0\) | 1.0× | 2.2× / 1.9× / 1.8× |
| TLG (W=2–3) | 3.0× | 1.5× / 1.2× / 1.3× |

These figures are presented as the basis for the claim that TLGLock offers a more favorable security-overhead trade-off than the listed baselines [2508.17809].

A relevant sequential comparison point is latch-based logic locking. That method replaces selected flip-flops with pairs of programmable latches, adds path-delay and logic decoy latches, and aims to resist oracle-driven sequential attacks by forcing the attacker to solve phase assignment, timing, reset, and state-space constraints. At 256 bits of locking, it reports average overheads of 1.8% delay, 2.5% power, and 24.1% area without DFT, and 5.0%, 8.3%, and 61.7% with DFT [2005.10649]. TLGLock’s abstract comparison to latch-based locking schemes should be read against this background: the two approaches attack different abstraction levels, with latch-based locking manipulating sequential timing and TLGLock modifying threshold-gate decision boundaries [2508.17809].

The paper also implies several limitations. First, the approach depends on the circuit being representable or efficiently transformed into TLG form. Second, the reported results are on standard benchmarks rather than industrial-scale designs. Third, security is empirical rather than formally proved. Fourth, key-weight tuning materially affects both corruption and overhead. Fifth, the claimed implementation benefits depend on the quality of the LCTL or CRTL realization and comparator sizing [2508.17809].

Within those limits, TLGLock is best understood as a logic-locking methodology that moves the secret directly into the weighted threshold computation of the gate. Its distinguishing claim is that threshold logic is not only an implementation substrate but also the mechanism by which the lock is enforced.

Source: https://www.emergentmind.com/topics/tlglock