Mathematical Problems in Engineering

Volume 2018, Article ID 7104764, 14 pages

https://doi.org/10.1155/2018/7104764

## Shared Variable Extraction and Hardware Implementation for Nonlinear Boolean Functions Based on Swarm Intelligence

^{1}ASIC & System State Key Laboratory of Fudan University, Shanghai 201203, China^{2}Institute of Information Science and Technology, Zhengzhou 450001, China

Correspondence should be addressed to Longmei Nan; nc.ude.naduf@31nanl

Received 25 December 2017; Accepted 30 July 2018; Published 9 August 2018

Academic Editor: Ricardo Soto

Copyright © 2018 Longmei Nan et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

To solve the problem of complex relationships among variables and the difficulty of extracting shared variables from nonlinear Boolean functions (NLBFs), an association logic model of variables is established using the classical Apriori rule mining algorithm and the association analysis launched during shared variable extraction (SVE). This work transforms the SVE problem into a traveling salesman problem (TSP) and proposes an SVE based on particle swarm optimization (SVE-PSO) method that combines the association rule mining method with swarm intelligence to improve the efficiency of SVE. Then, according to the shared variables extracted from various NLBFs, the distribution of the shared variables is created, and two corresponding hardware circuits, Element A and Element B, based on cascade lookup table (LUT) structures are proposed to process the various NLBFs. Experimental results show that the performance of SVE via SVE-PSO method is significantly more efficient than the classical association rule mining algorithms. The ratio of the rules is 80.41%, but the operation time is only 21.47% when compared to the Apriori method, which uses 200 iterations. In addition, the area utilizations of Element A and Element B expended by the NLBFs via different parallelisms are measured and compared with other methods. The results show that the integrative performances of Element A and Element B are significantly better than those of other methods. The proposed SVE-PSO method and two cascade LUT-structure circuits can be widely used in coarse-grained reconfigurable cryptogrammic processors, or in application-specific instruction-set cryptogrammic processors, to advance the performance of NLBF processing and mapping.

#### 1. Introduction

##### 1.1. Background

Cryptographic algorithms play a critical role in information security, which has broad applications. Currently, nonlinear Boolean functions (NLBFs) are being used in cryptographic algorithms widely. The performance of NLBFs processing and mapping influences the performance of cryptographic algorithms tremendously, it is indicated that the characteristics of the shared variables extracted from NLBFs must be determined so the efficient hardware circuits and mapping of NLBFs can be implemented.

The distribution of NLBFs with shared variables is difficult to create because the variables possess complicated expression types with unique design principles. The distribution also affects or even determines the organization of the lookup table- (LUT-) based logic elements, further impacting the hardware performance (in terms of area, speed, power, and area utilization) of the whole computing architecture. Although many cascading LUT-based structures for Boolean functions have been proposed, the methods have usually been based on experimental results or engineering experience, which lack a standard and basic conducting theory.

Shared input ports are common in LUT-based structures because they complete more powerful functionalities and achieve a more advanced performance. Adaptive logic modules (ALMs) developed by Mike Hutton [1] can realize multiple Boolean functions and achieve a 15% performance increase and a 12% decrease in the area versus standard basic logical element (BLE) in field-programmable gate arrays (FPGAs). Jason H. Anderson [2] projected function generators that decompose a* k*-variable function into two (*k*-1)-variable expression using the Shannon decomposition theorem. Next, a diverse LUT-based structure was devised according to the decomposition results. Other existing research studies [3–5] have also formed Boolean functions by applying LUT-based structures with shared inputs.

In addition, there is abundant research on the features and extraction methods of shared variables in general computing. Earlier studies were concerned with the relationships between the LUT size (input number of LUT,* K*), cluster size (number of LUTs per cluster,* N*), and cluster inputs (input number of a cluster,* I*) by testing all types of LUT-based structures. The logic utilization of cluster-based modules was analyzed by Jonathan Rose [6] and considered the effect of three parameters: area, delay, and the area-delay product. This group experimentally determined the relationship between and by achieving a peak utilization ratio of 98%. Furthermore, they revisited the issue and determined the relationship between parameters via (1) across all architectures with LUT sizes that range between 2 and 7 input ports and with a cluster size from 1 to 10 LUTs [7].

To reduce to* K,* multiply it by shared inputs (the shared variables of the Boolean expressions); if* N*≠1 is also proved in [8–10], then the number of shared inputs is

The above considerations are directed at general computing, which may provide some inspiration to achieve the distribution for shared variables. There are a few important characteristics of NLBFs. Research initiatives have not considered solving the problem from the expressions themselves, and there is, indeed, no efficient method for obtaining the shared variables of Boolean expressions.

In recent studies, researchers have advanced investigations into variables, expressions, and other related factors. A method [11] for* and-term*s and variables that is statistical in nature was proposed to realize the critical arithmetic unit of NLBFs. However, the results usually depend on a subjective verdict causing unreasonable settings for the shared inputs, which also achieves low efficiency and has limited applicability when there are many terms in the complex relationship between terms, which are ubiquitous in the various design principles of NLBFs. A reconfigurable structure was provided in [12], according to the results. This indicates that an achieved throughput of 7.6 Gbps in a 32-way parallel architecture acquired high utilization but also failed to have a profound deliberation of the shared variables.

Although the parameters (*and-term*s, variables, and others) of NLBFs have been analyzed, the most important elements, the shared variables, have not been studied profoundly. The essence of shared variable extraction is the knowledge of the incidence and relationship of the items. Association rule mining is a significant approach when finding the relationship between items; this approach is also an undirected mining method that discovers the valuable association relationships found in large amounts of data. To obtain the association logic of the variables, the Boolean expressions of NLBFs in cryptographic algorithms are analyzed. In addition, based on the common characteristics between the frequent items and shared variables (the more frequent an item (variable) is, the more probability it has of being a frequent item set (shared variable)), association rule mining is applied to the extraction of shared variables to achieve more reasonable shared inputs.

However, there are many variables and complex expressions in various NLBFs. The classical association rule mining algorithm, Apriori or frequent pattern (FP) growth, provides a low efficiency and bears a heavy computing load. To overcome these disadvantages, this study proposes an efficient extraction algorithm for shared variables that incorporates swarm intelligence while also designing the corresponding hardware elements based on the distribution of the extracted shared variables.

##### 1.2. Motivation and Contribution

Having studied the principle and process of association rule mining, this work suggests that the association rule analysis can be perfectly applied to the extraction of shared variables from NLBFs. Meanwhile, LUT-based logic elements are constructed according to the distribution of shared variables. In this study, the shared variable extraction algorithm for NLBFs in cryptographic algorithms is investigated. The main contributions of our work are listed as follows:

(1) Research on association rule mining is conducted and a logic model based on the association rules is established. This model combines the generation of frequent items with the extraction of shared variables.

(2) To improve the efficiency of the extraction algorithm, this study transforms the shared variable extraction (SVE) into the traveling salesman problem (TSP). Based on the similarity between the shortest path and the maximum* support*, particle swarm optimization (PSO) is applied to the undirected path treating the variables as points.

(3) The distribution of shared variables is achieved in various NLBFs. Based on the distribution of the shared variables, two cascade LUT-structures Element A and Element B are projected to satisfy the computation of NLBFs.

These novel expressions provide a perfect extraction for shared variables and two novel hardware elements for NLBFs. The extraction algorithm devised in our work will be a helpful reference for researchers dealing with LUT-based structures, especially with the hardware structures of NLBFs in cryptographic algorithms. This paper is arranged as follows. Section 2 establishes the association logic for NLBFs by applying the Apriori algorithm. The PSO method is incorporated to improve efficiency. In Section 3, SVE based on PSO (SVE-PSO) is proposed, and the procedure is determined. In Section 4, the hardware elements, based on the distribution of shared variables, are proposed to process NLBFs. The performances of SVE-PSO and the hardware elements based on shared variables are evaluated in Section 5. We conclude the paper in Section 6.

#### 2. Association Logic of NLBFs and PSO

Due to different principles and diverse security requirements, various NLBFs possess different features. To create a distribution of shared variables, the association logic should be obtained first.

##### 2.1. Association Logic Analysis of NLBFs

*Definition 1. *A Boolean function is a function with the domain of and a range of . It can be expressed in regular type as (AND-XOR):Each represents the Boolean variable, respectively, called* and-term* represents the operation of “AND” , and + represents the operation of “XOR”. The value of each coefficient is “1” or “0”, which indicates whether the corresponding term is included in the expression. Each* and-term* consists of “AND” and the variable number is its corresponding order. The maximum order of all* and-term*s is the order of the Boolean function, and the Boolean function is called NLBF when its order is greater than 1.

*Definition 2. **Association *item refers to the combination of the Boolean variables that appear at the same time, that is, the combination of the common variables. The detailed definition is as follows. There are samples in item sets* I*.* D* is the task database related to all tasks and is a subset of the data items; that is,* T**I*. The goal of association mining is to find the correlation of task and task noted as* A*→*B *(*A∈I*,* B∈I,* and* A**B =*).* A* is called the* association antecedent* item and is called the* association succedent* item.

*Definition 3. **Support* refers to the frequency of a Boolean variable or certain Boolean variables combined in all Boolean terms, and it mirrors the frequency and applicability of the association rules. The greater the* support*, the stronger the association of the Boolean terms, and therefore the greater the possibility of the implementation using the same LUT.* Support*(*A*) is the ratio of task and is equal to its probability.* Support*(*A*,* B*) is the joint probability of and* B*, meaning the item includes and simultaneously. In this paper,* Support* is marked as* L.*

*Definition 4. **Confidence* refers to the ratio of item B when item A is included in the data set. It represents the credibility and accuracy of the related items. The* confidence* (A→B) is equal to the conditional probability .

Association rule mining can acquire the relationships among the items in a dataset via mathematical logic. Apriori [13] is the classical association rule mining algorithm. This algorithm searches for the frequent item sets iteratively; there are two steps to accomplish the process:

(1) Achieve the frequent item sets. To do this, find the frequent item sets whose* support*s are larger than* min_sup*.

(a) Set* min_sup* (minimum* support*).

(b) Scan the database and determine the frequent 1-item sets that contain only one variable.

(c) Circle the search process until all frequent item sets are found.

(2) Generate the strong association rules.

(a) Set* min_conf* (minimum* confidence*).

(b) Count the* confidence*s and consider all frequent item sets whose* confidence*s are greater than* min_conf* as the strong association rules.

According to this procedure, the extraction process for shared variables is introduced with an example of the following NLBF, whose expression is , whose six* and-term*s are marked as Term1~Term6 correspondingly. Item sets in this NLBF expression are shown in Table 1. All* and-term*s have their own identification (ID) and there are 6 variables ~ in this NLBF.