Abstract
We tackle the problem of secure and private feature selection by homomorphically evaluating features’ information gains over the encrypted data of horizontally partitioned private datasets owned by edge IoT (Internet of Things) devices. In the process, we use a powerful cloud server to do the bulk of the costly homomorphic encryption aggregations. We proceeded with secure and private federated learning (training) and Machine Learning (ML) classification over the selected features in the same environmental settings (context). In the process, the participants interact with each other under strict security, privacy, and efficiency requirements. To this end, to each participant’s interaction we provide confidentiality, integrity, and authenticity (CIA) by signing its hashed contents with the corresponding participant’s private key. We assure consistency among interactions by introducing timestamps and linking them with the hashed content(s) of the preceding interaction(s). Those linked blocks of hashed content(s) from each interaction of participants while running the protocols produce the so-called chain-of-blocks (COB) structure, which will be utilized to detect malicious edge IoT dataset owners, unauthorized participants, and network errors. The security of the proposed protocols is proven through rigorous mathematical modeling. Extensive experimental evaluations over benchmark datasets give an advantage to our secure protocols ranging from several times to orders of magnitudes w.r.t to the state of the art in terms of computation and communication costs, as well as security and privacy characteristics. Moreover, since the utilized underlying cryptographic techniques are resilient to quantum computer attacks, the proposed algorithms are applicable to the post-quantum world.
Keywords:
chain-of-blocks (COB); machine learning; secure IoT; privacy preserving; feature selection; federated learning; training; classification; homomorphic encryption; information gain; text classification; fault tolerance; collusion attacks; distributed environments; post-quantum cryptography; cloud computing; edge computing 1. Introduction and Problem Statement
Acknowledging the privacy concern while dealing with Machine Learning (ML) and Data Mining (DM) algorithms, the works in [1,2] appeared almost simultaneously and they were among the first to address the privacy of the datasets over which ML models are trained. Soon, other works followed, some of which are presented in the surveys in [3,4]. Those are known as privacy-preserving (PP) training schemes. Common for them was that they solely concentrated on the privacy of the datasets, with little or no concern for the privacy of the classification stage. They also paid no attention to the privacy of the trained model [3,4]. Similar privacy-protection techniques were also observed in [5,6,7,8,9,10].
Realizing these shortcomings, dozens of schemes followed afterwards, which exclusively deal with the classification (inference) stage for different ML classifiers such as Naïve Bayes (NB), Deep Neural Networks, Support Vector Machines, Logistic Regression, Random Forests, Decision Trees, etc. These schemes fall into the privacy-preserving classification category, such as those in [11,12,13,14,15,16,17,18,19,20,21,22,23,24,25], to name a few. There are also a few schemes that, for consistency and continuity reasons, address both privacy-preserving training and classification problems under the same system architecture and environmental settings, such as those proposed in [26,27,28,29,30,31,32].
However, before training an ML model, it is usually common practice to do some pre-processing and feature selection for the dataset(s), over which the training is being done. Especially, this is common for the highly dimensional datasets (i.e., have a huge number of features), a typical occurrence for textual datasets such as SMS spam, e-mail spam, document classification, etc., which are known to harbor tens, hundreds of thousands, or even millions of unique features (words, tokens, bigrams, etc.). By applying some feature selection over such datasets, not only do we save valuable amounts of computation and communication costs during the training and classification stages later, but rather trained models also obtained over datasets on which a certain feature selection has been applied are shown to be more accurate during the classification stage [33,34,35,36,37,38,39,40].
Despite this, surprisingly, there is little work done on the area of secure and private feature selection, especially on edge Internet of Things (IoT) environments. The few existing schemes have one or several setbacks and disadvantages, which are elaborated on in Section 2. Among others, they are not designed to provide a mechanism for ensuring the end-to-end integrity, authenticity, and consistency (continuity, order of sequence) by which the interactions are done among different participants in the system while executing the protocols, nor are they designed to address malicious users that deviate from the protocols. Due to several definitions in the literature, to avoid eventual confusions, we give what we feel are the proper definitions over which we built our secure and private protocols.
Definition 1.
A chain-of-blocks (COB) is a data log structure consisting of a list of blocks (log records), where each block consists of a timestamp and its transaction data (usually in form of a Merkle tree [41]) and is linked with the previous block(s) by including its (their) hash(es) in itself, thus forming a chain-of-blocks. Chain-of-blocks (COB) data structure is inspired by blockchain cryptocurrency technologies [33,42]. Details are provided in Section 3.4.
Definition 2.
Internet of Things (IoT) is a set of cooperating devices (sensors, mobile devices, etc.) that can collect and transfer data over a wireless network without explicit human intervention with the aim of implementing a certain functionality [43].
Definition 3.
Edge computing refers to the technologies that enable computations to be performed at the edge (end) of the network. It is usually done to improve response times and use less network resources, as well as resources of other devices around, by doing local processing at the edge node (device). For example, smartphones, laptops, or tablet PCs are edge devices [44].
Paper contributions: To overcome the afore-mentioned shortcomings (elaborated in more details in Section 2), this paper introduces the following six contributions:
- 1.
- Secure feature selection (secFS) protocol—novel secure feature selection (filtering) protocol based on information theoretic metrics such as entropy. Concretely, homomorphically, we evaluate features’ information gains over horizontally partitioned private datasets owned by edge IoT devices and select the top ones with the highest information gain. To the best of the author’s knowledge, this is the first scheme in the literature to apply secure feature selection on information gains over distributed datasets. Its privacy requirements are as follows (details in Section 5):
- Privacy of the input features (words, tokens, attributes, bigrams), which are not public (e.g., words in a private email dataset), by permuting the hash bits of each feature.
- Privacy of the input feature values (counts, frequencies).
- Privacy of intermediate results since they might be used as a trapdoor for a total or partial leakage of the input or the output of the corresponding protocol.
- Privacy for the output, which are the top selected features with the highest information gain. They are kept private for the secure feature selection (secFS) and secure federated learning (training) (sect) protocols but are revealed only for the secure classification protocol (secC) since users prepare their queries according to selected features.
- 2.
- Secure Federated Learning (Training) (sect) protocol—on top of the selected (filtered) features, we provide a secure and private federated learning (training) over the same context (system architecture, participants, and security settings). Security requirements of the federated learning protocol are as follows Section 6):
- Privacy of the input features, which are the selected features, i.e., the output from secFS protocol;
- Privacy of the input features’ values;
- Security and privacy of intermediate results;
- Privacy of the output, i.e., the trained ML model. This is one of the rare protocols in the literature to keep private the final trained ML model at any stage.
- 3.
- Secure ML classifications (secC) protocol: to classify unclassified client queries using the obtained ML trained model while having in mind the following (Section 7):
- Privacy of the trained ML model, which will be used to classify user queries;
- Privacy of the user (client) query, both query features and their values;
- Security and privacy of the intermediate results;
- Privacy of the output, i.e., the final ML classification result;
- 4.
- Introduction of the chain-of-blocks log record structure—For each participant’s interaction, we ensure confidentiality, integrity, and authenticity (CIA) by digitally signing the hashed input content using the participant’s corresponding private key. Consistency across interactions is maintained through the incorporation of timestamps and by cryptographically linking each interaction to the hashed content of the preceding interaction(s), thus building the structure that we call chain-of-blocks (COB). Details are in Section 3.4.
- 5.
- Dealing with malicious edge IoT dataset owners and system errors by utilizing the chain-of-blocks: After obtaining the trained ML model, ML prediction accuracy is tested. A low accuracy indicates contributions from malicious edge IoT devices, which are flagged as such. Hashes of COB are used to check network transmission errors, signatures on blocks of COB check the authorization of participants and timestamps on blocks of COB make sure that order of execution is correct. The details are given in Section 3.4 and Section 8.
- 6.
- Extensive experimental evaluations show that the proposed protocols outperform the related ones in literature in terms of computation and communication costs as well as on security and privacy characteristics. More details are provided in Section 2, Section 9, and Section 10.
2. Related Research and State-of-the-Art
Early secure feature selection schemes rely mostly on the secure sum protocol [34,35,36,37,38] as their building block. In secure sum, participants, denoted as , securely compute the sum of their corresponding private integer inputs, , assuming an existence of a ring network topology between them. Without the loss of generality, the first participant adds a random number to his input and passes it to the second one, which in turn adds his private input to the received sum and passes the result to the third participants, and so on, until the first participant receives the randomized sum , subtracts the random R from it, and broadcasts the result to all the other participants. In this sense, while executing the protocol, receives from and after adding its private input transmits to , where . This makes the communication cost of secure sum to be transmissions and broadcasts, where is the total number of feature values for which we have to find the sum over participants. If and collude, they can retrieve ’s private input by subtracting ’s output and input, thus . An eavesdropper that can listen to all communicating channels can retrieve the private input of all the participants. Another drawback of secure sum is that it suffers from high communication overhead when f is large, which is the case with the highly dimensional text classification datasets, thus making secure sum highly impractical. Furthermore, secure sum does not work in the secure two-party computation (2PC) scenarios.
Among the first schemes to address the problem of secure feature selection is [34]. It calculates the features’ misclassification gain [34] by proposing a probabilistic protocol based on secure sum, which does not always guarantee avoidance of the collusion attack, despite increasing the communication cost. In [35], they use the Harsanyi–Farrand–Chang [35] metric for feature selection, which, for each feature value, needs a few invocations of secure sum to find intermediate metrics such as correlation or covariance, without addressing any of the drawbacks of secure sum. In [36], they test several metrics for feature selection and, in the process, provide a trade-off between privacy and the accuracy of the trained model. In [37], each participant splits his private input into shares such that their sum is equal to the participant’s private input and sends one share to each of the other participants. Afterwards, all the participants locally sum up the shares received from others and invoke secure sum to find the final result. While this solves the collusion attack, it introduces an overhead of transmissions into the high communication cost of a single secure sum invocation. After giving a brief literature review on the topic, ref. [38] proposes ideas for a few secure feature selection schemes without engaging in implementation details. Among others, ref. [38] inherits all the drawbacks of secure sum since it is supposed to use it as its main building block.
None of [34,35,36,37,38] solved the secure sum’s shortcomings of an eavesdropper that can intercept all the communications, of the inability to deal with 2PC, and of the high communication overhead, especially knowing that the metrics that they propose need several invocations of secure sum for a single feature value. In this context, [34,35,36,37,38] use a total of several hundreds of thousands of rounds (interactions) compared to only a few that our protocol uses to reach the same goal with textual datasets.
Avoiding secure sum, ref. [39] uses Paillier’s additive homomorphic encryption scheme [45] to introduce a four-round 2PC (relatively high for a 2PC in secure ML classification scenarios) and does not address the scenario with multiple datasets. The secure feature-selection scheme in [40] uses secret sharing for multiple dataset owners to share their data among three non-colluding servers (3PC), a scenario that is not easily feasible in reality, especially knowing that even if two of them collude, it can reveal the private dataset input values. Furthermore, ref. [40] has a high interaction rate, and knowing that each feature value is processed independently makes it have a high communication overhead. Depending on to whom the trained model is shown, ref. [40] can also deal with two dataset owners when the owner of the trained model is not one of the dataset owners, which rarely happens in practice.
Even if they do not engage in secure feature selection, we consider the schemes that deal with privacy preserving training and/or classifications of textual datasets, such as SMS, e-mail, tweets, documents, etc., as being related to our research. Among several drawbacks, refs. [14,32] use an expensive approach of homomorphically comparing each query word with each word of the trained model’s dictionary (bag-of-words) to check for matches, resulting in high latency and computation cost. Those drawbacks were addressed by [30,31], which use secret sharing, and ref. [15] which uses a combination of homomorphic encryption and garble circuits to deal with private text classification. None of the above addressed the issue of private training. The scheme in [28] was among the rare ones to address the issue of private training over textual datasets. Although they train an ML model over a single encrypted dataset (rather than over multiple ones), the fact that they do not do any prior feature selection or pre-processing over plain (un-encrypted) data on edge makes it have high computation and communication costs. This is somehow addressed in [29], which trains an ML model over multiple datasets by offloading as much as possible of the computation on edge, in the process introducing a simple but effective feature selection by introducing bigrams of consonants for SMS-like datasets. Refs [26,29] provide relatively solid secure and private classification schemes of textual data in terms of computation and communication efficiency, as well as security and privacy characteristics.
None of the above schemes address the issues of authenticity, integrity, or protocol flow consistency, which are enabled by our proposed chain-of-blocks (COB) technology (Section 3.4). Table 1 summarizes privacy properties among several PP ML schemes.
3. Participants and Adversary Models, Protocol Flows, Chain-of-Blocks
This section introduces the participants’ (constituents) of the system architecture and their attack (adversary) models, provides a brief overview of the protocol flows given in this paper, and introduces the concept of chain-of-blocks.
3.1. Participants (Constituents)
The proposed system architecture has the following participants (constituents):
- (1)
- EDO (Edge Dataset Owner)—We have n such EDOs in our system, denoted as , each owns a dataset , where , that they are willing to use for training ML models in a secure and private fashion.
- (2)
- TACS (The Aggregating Cloud Server): a cloud server used to do the bulk of the proposed protocols’ Somewhat Homomorphic Encryption (SWHE) computation (Section 4.3).
- (3)
- EDS (The Encryption Decryption Cloud Server): It’s the only participant in the system that has a pair of public keys (whose public/private keys are with SWHE properties (Section 4.3). All the data that are homomorphically evaluated in our protocols are encrypted using EDS’ public key , thus it is the only one that can decrypt them with its private key .
- (4)
- EC (Edge Client): has an unclassified query that he/she wishes to classify in secure and private manner by utilizing the trained ML model obtained from EDOs private datasets.
The participants together with protocol flows are illustrated in Figure 1 and Figure 2. Protocol flows are briefly explained in Section 3.3. Their details are given in Section 5, Section 6, Section 7 and Section 8.
Table 1.
Security, and efficiency properties among different secure and private ML schemes.
Figure 1.
Protocol flows for secure feature selection (secFS-S1 and secF-S2).
Figure 2.
Protocol flows for secure training (sect) and secure classification (secC).
Each participant has a pair of public cryptosystem keys (say RSA). For EDO the pair of public/private keys is (); for TACS it is (), for EDO it is (), where ; and for EC it is (). They form the set of keys .
3.2. Adversary (Attack) Model of the Participants
TACS, EDS and EC are assumed to be in the passive semi-honest (honest but curious) model, which means that they follow the protocol but, in the background, they try to infer some private data which they are not supposed to. A formal definition of the semi-honest model is given in Section 10. We assume that TACS and EDS do not collude.
Some EDOs are assumed to be malicious, which means that they do not follow the protocols, thus, they input false data while participating in the protocols. The aim of malicious EDOs is to disrupt the correct usage of the whole system, which eventually is reflected in incorrect classification of unclassified client (EC) queries. Out of EDOs, our environment setting allows for up to EDO failures, i.e., EDOs not being able to input their data while executing the protocols or simply refusing to participate in them. Moreover, the proposed protocols allow of up to collusions (cooperations) between EDOs without jeopardizing the private content of the datasets of the remaining and non-colluding EDOs (Section 10, Figure 1 and Figure 2). Also, during the secure classification stage, we assume a more active EC that performs the malicious STC-attack proposed in [13]. The motivations for participants to behave in the manner described above are given in [11,12,13,14,15,16,17,18,19,20,21].
3.3. Protocol Flows At-a-Glance
- (1)
- GRPV (Generate Random Permutation Vector): it is a Secure Multi-Party Computation (SMPC) protocol through which EDOs agree on a random permutation of their hash bits of their private words, needed for the secure feature selection protocol.
- (2)
- secFS: (secure feature selection—stage 1 and 2): illustrated in Figure 1. Simultaneously, all the EDOs find , which is the set of permuted bit hashes of the local unique words (features) of their local textual datasets, where , ❶ and send them to TACS ①. TACS finds their union (the global set of hashes of unique words) ❷ and broadcasts it to all EDOs ②. Using each word of as an index entry, EDOs simultaneously construct the corresponding ciphertexts of the word counts (appearances) in ham and spam documents in the local dataset, i.e., , then they construct the replicated ciphertexts of the number of ham and spam documents in the local datasets, , ❸ and send them to TACS ③. TACS finds the global number of ham and spam documents, as well as the global ham and spam counts for each word of by homomorphically summing up the locally constructed EDO ciphertexts, thus , , and , then proceeds to find the terms needed to calculate the information gains of each word, randomizes those terms ❹ and sends them to EDS ④. EDS decrypts those randomized terms, uses them to compute the vector of the randomized terms of the information gains for each word, encrypts the randomized logarithmic terms ❺ and sends them back to TACS ⑤. TACS homomorphically removes the randomizations of the previously randomized terms and finds the information gain for each word in its corresponding index inside , adds some randomizations to get ❻ and sends it to EDS while broadcasts the randomizing numbers to each EDO ⑥. EDS decrypts to get the randomized vector of information gains ❼ and broadcasts it to the EDOs ⑦. Each of the EDOs removes the randomization from to get vector, which at the corresponding indexes, contains the information gain data for each of the words. EDOs then choose the top words with the highest information gain as the selected features’ set , thus ❽. It should be noted that we choose the information gain to do the feature selection since it is shown to be among the most effective feature selecting metrics for text classification [20,34], and due to the lack of secure and private schemes that use it in literature [23,24,25,26,27,28,29].
- (3)
- sect (secure federated learning—training): Illustrated in Figure 2. Using the selected words of as index entries, EDOs simultaneously construct the ciphertext of the training vector which containing the local frequencies of each word, , ❽ and send them to TACS ⑧. TACS sums them up to get the global frequencies, randomizes this result to get ❾ and sends it to EDS ⑨. After decrypting it, EDS finds the randomized class and conditional word-class logarithms of probabilities, integerizes and encrypts them to get the randomized trained model ❿ and sends it back to TACS ⑩, which homomorphically removes the randomization to get the final trained model which represents NB or the MNB classifier ⓫.
- (4)
- secC (secure ML classification): Shown in Figure 2. EC multiplies its unclassified query with the trained model ⓬ and sends the result to TACS ⑫ for homomorphic processing and randomization ⓭. The randomized query result is sent to EDS while the randomizing data to EC ⑬. EDS decrypts the randomized query result ⓮ and sends it back to the EC ⑭, which in de-randomizes query result to get the final classification ⓯.
3.4. Chain-of-Blocks (COB)
All the participants have a pair of public/secret keys used for signatures and secure communications (Section 3.1). Additionally, EDS has a pair of public/secret keys with SWHE properties (Section 4.3). All these key pairs form the KeySet set (Section 5 and Section 6).
While executing and , each participant interacts (sends and receives data) with other participants several times! For each such interaction, each participant constructs its log block with the following content (Figure 3):
1. Hashes of blocks of data received from other participant(s). If data are received from multiple participants, then a Merkle Hash Tree over all input data is constructed.
2. Hashed data sent to other participants. If multiple data are sent to other participants, then a Merkle Hash Tree of all output data is constructed.
3. Timestamps.
Afterwards, each participant signs the hash of its log block by encrypting it with his private key, and this signature is added to what we call the chain-of-blocks (COB) (not to be confused with blockchain technology [33,42])! Chain-of-blocks (COB) is illustrated in Figure 3 for (Section 5) and (Section 6).
Data that participants send/receive from each other, as well as the chain-of-blocks, are kept at TACS and, together, they offer the following security and privacy properties:
1. Confidentiality—since all the data that participants send to each other are encrypted either by receiver’s corresponding public key or the EDS’s public SWHE key.
2. Integrity—by comparing the received and calculated hashes for each block separately. In this fashion, eventual network errors (transmission, propagation) are detected.
3. Authenticity—by verifying each of the signed log blocks in chain-of-blocks by using participant’s corresponding public key. In this fashion, unauthorized participants are prevented from participating in the protocols.
4. Order (flow, sequence) of execution—by checking the timestamps in each block of the chain-of-blocks.
It should be noted that when one or more new EDOs want to contribute with their own private datasets to obtain a more accurate trained ML model, then secure feature selection () and secure federated learning–training () protocols are executed from the beginning. In the process, the EDOs that participated in the previous executions are also invited to participate. For each execution of and , their corresponding chain-of-blocks and data that participants send/receive from each other while executing the protocol are stored at TACS. After each execution of protocols, the system checks the classification accuracy of the obtained trained ML model by testing it with already correctly classified queries. If a classification accuracy lower than a certain threshold is observed, then it is assumed that it is due to malicious EDOs. In such a case, these malicious EDOs are flagged as malicious, their obtained trained ML model, chain-of-blocks, and other data are deleted from TACS, whereas ECs (clients) are instructed to use the last trained ML model to classify their unclassified queries.
More details about dealing with malicious EDOs and system errors (such as network transmission and propagation errors, unauthorized EDOs) are provided in Section 8.
4. Preliminaries and Notations
Integer vectors are denoted by having “” at the end of their names, e.g., . By , we denote the component (index) wise addition, subtraction, multiplication, and division of two integer vectors, respectively. denotes applying the modular operation with modulus to each element of . , denotes the ceiling and floor functions, respectively. is a cryptographic hash function, and denotes the cardinality of a certain set .
, denote encryption/decryption, using public/secret keys belonging to a participant , where (Section 3.1).
4.1. Naïve Bayes (NB) and Multinomial Naïve Bayes (MNB)
Let the transactions (documents) of a certain dataset DS have a selected feature set consisting of words (features); thus, . For simplicity and without loss of generality, let the set of classes of DS consist of two classes, ham and spam; thus, . Let denote the frequency of word in documents classified (labeled) as belonging to class , while denotes the count (number) of documents where appears at least once in documents classified as belonging to , where and or . If appears several times in a document belonging to , then its frequency will be incremented as many times as it appears in that particular document, while its document count will be incremented by one. Let and denote the total number of transactions and the number of records belonging to class , respectively. Thus, . Let denote the class probabilities. Let and denote the conditional word-class probabilities for the Multinomial Naïve Bayes (MNB) and Naïve Bayes (NB) cases, respectively. Actually, and , where and or , represent the trained model for the MNB and NB classifier, respectively. To give a chance to words whose conditional probability is zero, due to their counts or frequencies being zero, we add one to each count (frequency) accompanied by adding the vocabulary size (number of unique words) to the denominator of the corresponding conditional probabilities. This process is called Laplace Smoothing. For the MNB case, un-classified queries have the form of , where is the frequency of the appearance of word in the query , while, for the NB case, it has the form of the binary vector , where if appears at least once in the query and if does not appear in the query, for and . Using the Bayes’ Theorem [29,46,47], we classify as follows:
Having in mind that is always the same, that logarithm is a monotonically increasing function and naively assuming that appearances of words in a query are independent of each other, i.e., , then, for the NB and MNB, case (1) can be written as follows:
if , i.e., , then is classified as (ham), otherwise as (spam). K is a constant used to integerize terms of for encryption purposes (Section 4.3).
If the dataset DS is obtained by merging other datasets denoted as for , then , and , where , , and denote the number of transactions (records), number of records labeled as , frequency of word in documents labeled as , and the count (number) of at least one appearance of in documents labeled as at dataset k, respectively, for or .
4.2. Information Gain
For the binary classification case, let denote the count (number) of documents in the dataset labeled as belonging to class where word does not appear, and or . Let be the number of documents where word appears at least once and be the count (number) of documents where does not appears at all. Let denote the probability of to appear in a document, denote the probability of not appearing in a document, denote the probability of word to appear in a document classified as , and denote the probability of word not appearing in a document classified as , where or Then, the information gain (IG) of a word is defined as follows [46,47,48]:
The information gain is a quantitative metric, which measures the reduction of entropy (uncertainty) of a query to belong to a class after word has been observed in the query. The higher the entropy reduction, the more information gain the word offers. This is the reason that makes information gain one of the most metrics in dimension reduction (feature selection), especially when choosing the top words with the highest information gain in what is known as “bag-of-words” [46,47,48]. Substituting the probabilities with their counts and having in mind that we want to find the top words with the highest IG, but not their exact IG, then (3) is rewritten as follows:
which makes the homomorphic evaluations and selection of the top words with the highest IG easier (Section 4.3).
4.3. SWHE Public Key Cryptosystems
Homomorphic encryption (HE) schemes allow for certain arithmetic or Boolean operations to be evaluated (done) over the ciphertexts without decrypting them (while the ciphertexts are still encrypted) [45,49,50,51,52]. So far, the strongest form of HE is Fully HE (FHE) schemes, which allow unlimited numbers of homomorphic additions and multiplications over the ciphertexts. This is due to the computationally expensive technique known as bootstrapping (homomorphic evaluation of the decryption circuit), which as an output gives a re-encrypted ciphertext over which new homomorphic operations can be done. The first FHE scheme was proposed in 2009 [49], and over the years, several others would follow [50]. All the recent FHE schemes are based on the assumption of the hardness of Decision-RLWE (Ring Learning with Errors, Section 10), known to be resistant to quantum computer attacks [26,27,28,29,49,50,51,52]. While the security of Somewhat HE (SWHE) schemes is also based on Decision-RLWE, they are a weaker variant of FHE in terms that they allow only a limited number of homomorphic multiplications (known as the circuit depth), but in the process, they avoid the costly bootstrapping operation [49,50,51,52]. However, in most of the real-case scenarios, the circuit depth is known in advance, which allows for the encryption parameters to be set in a way that no bootstrapping will be needed. This makes SWHE an ideal choice over FHE [14,15,16,17,18,19,20,21]. The plaintexts and the ciphertexts in FHE and SWHE schemes are polynomial rings with modulus and their coefficients are integers modulo and , respectively, s.t. q . Thus, plaintexts belong to the ring and ciphertexts to the ring . In [51], it has been shown that if the polynomial modulus of degree can be expressed as a multiplication of irreducible polynomials of degree one, which in turn are automorphic to each other; then, according to the Chinese Remainder Theorem (CRT), we can encode integers in a single plaintext or ciphertext, one integer for each polynomial coefficient. A single homomorphic operation (addition or multiplication) over two ciphertexts encoded in such a way would result in a simultaneous (parallel) component (index, slot) wise execution of the same operation over the encoded integers (Figure 4a,b). This allows for an SIMD (Single Instruction Multiple Data) fashion of homomorphically evaluating the ciphertexts, enabling massive efficiency improvements without extra cost. Furthermore, the automorphism of the irreducible polynomials of degree one allows for the encoded integers to change their places, mainly by rotating (shifting) them to the right or left (Figure 4c). SWHE schemes allow SIMD operations between a ciphertext and a plaintext as well, where the result is always a ciphertext. Throughout the paper, we assume that all SWHE encodings–encryptions of the plaintexts are done to support SIMD operations. For encoding/encryption purposes, plaintexts and ciphertexts are denoted by having “_p” and “_c” at the end of their names, respectively. Common functions of a typical public SWHE scheme are as follows [49,50,51,52]:
- . Generates a pair of public key cryptosystems (i.e., a public and corresponding secret key) according to the security parameter , polynomial modulus , and coefficient moduluses and for the plaintext and ciphertext, respectively.
- . SIMD encoding of an integer vector into a plaintext.
- . SIMD Encoding and encryption of an integer vector into a ciphertext.
- . SIMD addition of a ciphertext with another ciphertext or plaintext (Figure 4a). The result is always a ciphertext.
- . SIMD multiplication of a ciphertext with another ciphertext or plaintext (Figure 4b). The result is always a ciphertext.
- . Rotating a ciphertext for slots (indexes). If rotations are done to the right, otherwise to the left (Figure 4c).
- m_v = Decode(m_p). Decoding a plaintext into an integer vector.
- m_v = DecrDec(m_c). Decrypting then decoding a ciphertext into an integer vector.
Let be integer vectors and their corresponding SIMD encoded&encrypted ciphertexts and , respectively. Let and be random integer vectors s.t. for , and let be their respective SIMD encoding into plaintexts. Then is the SIMD secure comparison of the index-wise elements of and , firstly proposed in [29]. Namely, let , if then , otherwise for .
Figure 4.
Illustration of SWHE SIMD (a) addition, (b) multiplication, and (c) Rotation.
5. Novel Secure Feature Selection Algorithm
Definition 4.
Feature selection is the process of reducing the dimensions of a feature set
of a labeled dataset DS into according to an algorithm ; thus, .
GRPV (Generate Random Permutation Vector): Due to our strict security and privacy requirements (elaborated in Section 1) of keeping private both the words and their counts (frequencies), simple hashing of the words will not help. Since the EDO records (emails, documents) are in a natural spoken language (say English), by hashing all of dictionary words of that language, we can relatively easily apply the dictionary attack to find matches with the word hashes of the EDO’s records. Especially, this is problematic for EDOs that wish to use a single record (mail) for training purposes (a scenario that we do not exclude), since the dictionary attack would reveal much of the record’s (mail’s) content. To guard against the dictionary attack, EDOs permute the hash bits of each word according to a random permutation upon which all EDOs agree. To obtain this random permutation, all the EDOs engage in a secure multi-party computation (SMPC) protocol given in Protocol 1.
GRPV: given in Protocol 1. each of the EDOs locally constructs a random integer vector of elements, encodes and encrypts it, and sends it to TACS (lines 1–4). TACS homomorphically adds them up, adds its own random terms, send its random terms to each EDO by encrypting them with EDOs’ corresponding public keys, and sends the sums of the random terms to be decrypted at EDS (lines 5–10). EDS decrypts the randomized sums and sends them to each EDO using their corresponding public keys (lines 11–13). EDOs decrypt and subtract the data obtained by EDS and TACS and apply the modulo operator with a modulus ofin a component (index)-wise manner to each of them to get the random numbers placed in the , which are solely generated by EDOs (lines 15–16). is than used by the function to generate the by which the EDOs do the permutations of the hash bits of their words in the proceeding protocols, e.g., if in slot (index) 0 of , we have the value of 179, which means that the 0th bit of the original hash will be the 179th in the permuted hash bits. If in slot, say 7, of we have again the value of 179, which obviously is already used in the permuted hash bits; then, we try the next slot to the right up until we find an empty place.
secFS—Secure Feature selection (Protocol 2-Stage I and II) is done in two stages. At the first stage, the union of all the words among datasets are found and those that globally appear in less than documents from all the datasets are filtered out, while at the second stage, the top words with the highest IG are selected. All of this is done under strict security and privacy requirements by (1) adding the corresponding block into the chain-of-blocks, and after each interaction (Figure 2 and Figure 3), participants securely communicate with each other either by encrypting their data with the EDS public key with SIMD SWHE properties or by using the recipients public key generated for secure communication purposes.
secFS—S1: Given in Protocol 2-Stage I. In Phase I, all the EDOs do some pre-processing on their local datasets, locally find all the unique words and permute their binary hashes according , and send them to TACS (lines 1–4). In Phase II, TACS finds the global union of the permuted hashes of the words, , and sends them to all EDOs (lines 5–8). In Phase IIA, each of the EDOs, using the permuted hashes of the words in as vector entries (indexes), locally construct , corresponding to ’s counts of words in the documents of the local dataset , where , and send this ciphertext to TACS (lines 9–12). In Phase IIB, TACS encodes the replicated vector of integers whose value is (line 13) and then, for the needs of secure comparisons, generates and encodes random vectors and s.t. for (see Section 4.3) and generates for randomizing the secure comparison (line1 3). Afterwards, it sums up all of the to get , which is an encryption of the vector of global counts of words appearing in documents, and performs the secure comparison proceeded with randomizations to get (line 14). TACS sends to EDS for decryption, while sending the randomization vector to each EDO (lines 16–18). In Phase IIC, EDS decrypts , which looks like (line 19), and sends it to each EDO (lines 19–22).
Finally, in Phase IID, each EDO removes the randomization by doing the subtraction to get the secure comparison results (line 24). The words for which the corresponding term is negative (i.e., they appear in less than global documents) are filtered out and are not part of the set, which has words (line 25).
| PROTOCOL 1: GRPV (Generate Random Permut.Vector) |
: the set of all the participants’ public key pairs used for signing blocks in the chain-of-blocks and for secure communications. : key pairs of EDS with SWHE properties (Section 4.3) : the size of the hash digest in bits |
| OUTPUT: : a vector to permuted bit hashes at EDOs |
![]() |
| PROTOCOL 2: secFS-S1 (secure Feat. Selection—Stage I) |
: the number of EDOs : minimum allowed global document appearance for each word : a vector to permute bit hashes at EDOs, obtained by Protocol 1 (GRPV) |
| OUTPUT: : set of words with at least global document appearances |
![]() |
| PROTOCOL 2: secFS-S2 (secure Feature Selection-Stage II) |
: the number of features (words) to be selected at the end global document appearances |
selected words with the highest IG sorted by their hashes |
![]() |
![]() |
secFS-S2: Given in Protocol 2-Stage II. It is a continuation of secFS-S1. In Phase III, using each of the words in as index entries, each EDO locally constructs vectors and , as well as the replicated and , containing the number of local ham and spam mails (documents), respectively, replicated for times. After encoding and encrypting all of them, they are sent to TACS (lines 1–4). In Phase IV, TACS homomorphically aggregates (sums up) those vectors to get the global counts for each word to appear in ham and spam documents, as well as the global number of ham and spam mails (lines 7–10). Then, it finds and (lines 12–15, Figure 5), which in turn are used to find all of the randomized nominator and denominator terms inside the logarithms in (4) for each word (lines 16–23), denoted as , and all of them are sent to EDS (line 25), e.g., in Figure 6a), we illustrate the SIMD evaluations and randomizations of the nominator and denominator of the term in (4) done in lines 16 and 20. The nominators and denominators of the other terms in (4) are found in a similar way. In Phase V, EDS decrypts all of the sent by TACS (lines 27) and finds the encryption of all of the logarithmic terms of (4) in randomized form, denoted as , e.g., (upper vector in Figure 6b), where is a constant used for integerization purposes and are random numbers (lines 28–31). Afterwards, EDS sends the to TACS (line 34). In Phase VI, TACS removes the randomizations and multiplies each of the with the corresponding term of (4) (lines 35–42), e.g., in line 39 is illustrated in Figure 6b, corresponds to term of (4). The other logarithmic terms multiplied with the corresponding counts of (4) are found in a similar way. After homomorphically finding and randomizing the information gains to get (lines 43–46), it is sent to EDS for decryption, while a partial portion of the randomization is sent to each EDO (lines 48–50). In Phase VII, EDS decrypts and sends it to each EDO. Finally, in Phase VIII, each of the EDOs partially removes the randomization to get (line 58). Since all the terms are multiplied and added to the same random and , respectively, it is easy for each of the EDOs to find the top words with the highest IG. Afterwards, EDOs apply the inverse permutation to word hashes using proceeded with sorting w.r.t. to hash values, thus getting the selected features set, SF (line 59). Sorting is done for performance reasons when users prepare their queries according to the selected words during secC.
Figure 5.
Illustration of SIMD evaluation of values in lines 13–16 of secFS-S2.
Figure 6.
Illustration of SWHE SIMD evaluations of terms in (4) in secFS-S2.
6. Secure ML Federated Learning (Training)
Definition 5.
ML model training is the process of acquiring parameters of the trained model TM from a labeled dataset(s) DS consisted of a selected feature set SF according to an algorithm ; thus, .
secT—secure (Federated Learning) Training. Given in Protocol 3. In Phase VIII, each of the EDOs locally constructs the training vector, , s.t. the first and the -th index have the local ham and spam counts, respectively, while the indexes from 1 to contain the local ham frequencies , and indexes from until have the local spam frequencies corresponding to the words of the selected features’ set , respectively, where and (the upper vectors of Figure 7, lines 2–3, 5). For the needs of Laplace Smoothing (Section 4.1), an arbitrarily chosen EDO adds an extra 1 to the indexes corresponding to word frequencies and adds the dictionary size (in our case ) to the first and -th index corresponding to ham and spam counts. After encoding and encrypting to get , they are sent to TACS, which, in Phase IX, homomorphically sums them up and randomizes this sum to get (line 8, Figure 7) and sends it to EDS (line 12). In Phase X, EDS finds the randomized logarithmic terms of the MNB trained model (Section 4.1), encrypts them to get (Figure 8, lines 14–16), and sends it to TACS (line 18). Finally, in Phase XI, TACS removes the randomizations and subtracts the rotated result (Figure 8, lines 20–21) to get the final MNB trained model according to (2). In secT we continue the chain-of-blocks started in the previous protocol. Note: if instead of the frequencies and we put and at s in Phase I, the final trained model will be the one based on NB (Section 4.1).
Figure 7.
Obtaining and randomizing the global frequencies in SIMD fashion.
Figure 8.
De-randomizing and rotating to get the final trained model .
| PROTOCOL 3: secT (secure Training) |
| INPUT: : selected features with the highest IG |
| OUTPUT: : the (packed) trained model ciphertext |
![]() |
Improvement 1: after obtaining it, the trained model is rarely changed in practice. We can utilize this fact to send it only once to the EC and amortize the communication cost among all the secure classification instances, which will be initiated by the EC.
7. Secure ML Classifications
Definition 6.
Classification is the process of assigning a label to an unlabeled query
according to a trained model TM using an algorithm ; thus, .
secC—secure classification. Given in Protocol 4. In Phase XII, EC encodes its query , which has 1 in the first slot (index), proceeded by the query frequencies of each word in the query ordered according to the word arrangement in the selected features sets (line 1, Figure 9). After multiplying the encoded query with the trained model it sends the result to TACS (lines 2–3, Figure 9). In Phase XIII, in accordance with (2), TACS homomorphically finds the sums of each of the ( slots in rotations and additions with the result residing in the first slot (lines 5–6). To do this, should be a power of two. If it is not the case, then we can pad extra slots with dummy values (usually zeros). Then, for secure comparison purposes (Section 4.3), it multiplies this result with a random followed by adding s.t. , and are constructed having in mind the secure comparison requirements for them in Section 4.3. To protect the result from the STC (substitute-then-compare) attack from [13], TACS adds an extra random to the result and sends the randomized result to EDS and the to EC (lines 4–11). In Phase XIV, EDS decrypts the randomized classification result and sends it to EC (lines 12–13). Finally, in Phase XV, EC subtracts from the randomized classification result and, according to (2), gets the final classification based on the sign of the result (lines 14–18). If the query instead of the frequencies contains the counts () of words appearing in the query, then instead of MNB, we are dealing with the NB.
| PROTOCOL 4: secC (secure Classification) |
: key pairs of EDS with SWHE properties selected features with the highest IG, selected (filtered) during the protocols : the trained model ciphertext residing at EC : the EC’s (packed) query vector(s) |
’s final classification |
![]() |
Improvement 2: We can convert from a 3PC to 2PC by executing Phases XII and XIII at EC (will denote them as Phase XVI), and we can proceed with Phase IV at EDS and Phase XV at EC as usual (the EC on the left side in Figure 2).
Improvement 3: For high throughput, we can simultaneously process up to queries by obtaining a replicated during (which can be done without extra costs, Figure 8) and encoding (packing) queries to during .
Figure 9.
SWHE SIMD multiplication of the trained model with query .
| PROTOCOL 5: (Dealing with Malicious EDOs (Edge Dataset Owners) and System Errors) |
| INPUT: |
| : the chain-of-Blocks (COB) (Section 3.4) obtained during and protocols (Section 5 and Section 6) (Figure 3) : all data that participants send to each other while running and , needed to construct COB (Figure 3) : the set of all the participants’ public key pairs used for signing blocks in the chain-of-block and for secure communications. : the trained model ciphertext (which is the output of ) residing at TACS : selected features with the highest IG, selected (filtered) during the protocols an array of correctly labeled (classified) queries used to test the accuracy of the correct corresponding labels (classes) of the queries of the array the minimum accepted ML classification accuracy threshold value by the system |
| OUTPUT: if no system errors and ML classification accuracy is above threshold , otherwise |
![]() |
8. Dealing with Malicious EDOs and System Errors
The algorithm is given in Protocol 5. It deals with system errors, such as detecting network (transmission or propagation) errors and unauthorized participants, as well as dealing with malicious EDOs, which deviate from the protocol by providing false data.
In line 1, function uses to reconstruct Chain-of-Blocks (COB) (Section 3.4) and compares its calculated hashes with the hash values at the original COB. It returns true if hashes match, i.e., the integrity check holds; otherwise, it returns false, which is probably due to network transmission or propagation errors.
In line 2, function uses the set of public keys of participants to check and verify the signatures for each block of each participant at COB (Figure 3). It returns true if all signature verifications hold. Otherwise, it returns false, which signals that one or more unauthorized participants participated in protocols 1–3.
In line 3, function uses timestamps at each COB block to check the order (sequence, consistency) of participants participating and interacting with each other in protocols. It returns true if the orders holds; otherwise, it returns false.
In lines 4–8, using the trained ML model , the protocol classifies an array of already correctly classified queries and compares the obtained classification labels with the correct ones (lines 7–8). Afterwards, it uses this information to calculate the classification accuracy of (line 9). If the calculated accuracy is smaller than a threshold (line 10), then it is assumed that it is due to the presence of malicious EDOs. In such a case, EDOs that participated in Protocols 1–3, to obtain the current , are added to a list of potentially malicious EDOs (line 11).
If any of the integrity (line 1), or authorization (line 2) or consistency (line 3) or malicious EDO checks (line 12) fails, then the current and COB are deleted from the system, and the old ones (from the previous run of Protocols 1–3) are rolled (brought) back to be used to classify unclassified client (EC) queries.
9. Experimental Evaluations and Comparisons
We run our codes in a machine with an Intel Core i3-4000M processor with two physical cores, each of 2.4 GHz (we utilize one core only in our implementations) with 4 GB of DDR3 RAM and 64-bit Windows 10 Pro as an OS. For SWHE purposes, we use the C++-based Microsoft’s SEAL 3.2 library [53], which implements the SWHE scheme in [52].
For benchmark and comparison purposes with the state-of-the-art schemes, we used two textual datasets, the SMS spam corpus [54] and the Enron e-mail dataset [47,55]. Their implementations can be found in [55,56], respectively, for a total of around 15 000 lines of original C++ code. The Enron e-mail dataset is a collection of e-mails from 150 user profiles, with a total of 16,555 ham and 17,148 spam e-mails. For the dataset pre-processing in line 2 of the (Protocol 2), we applied stop-words removal, partial punctuation removal, stemming by using the library in [57] and converting all the letters to lowercase. For our protocols, the input parameter values for the Enron dataset are and . For the SMS spam corpus, which has 4591 ham and 983 spam SMSes, instead of and (Protocols 2 and 3), we use the SMS consonant bigram approach proposed in [29] accompanied by several improvements in training and classification. This gives us a total of features for the SMSes vs. thousands for the classical “bag-of-words” approach. Furthermore, in the trained model , instead of allocating separate slots for each ham- and spam-related probability as it is done in [29], we allocate a single slot, which has the subtractions of the corresponding ham and spam probabilities (Section 6 and Section 7, Figure 8 and Figure 9). This alone gives an improvement of 50% in terms of computation and communication costs with respect to the private SMS algorithms in [29]. For both the datasets, unlike the related schemes, we also applied Laplace smoothing to boost our classification accuracy (Section 4.1 and Section 6). Compared with the reported accuracy results in related research, such as [15,28,47], our results are shown to be among the most accurate ones in the literature in both private and non-private ML classifications. Also, due to choosing to be between 8 and 10 bits, there was no loss of accuracy due to private classifications, which is consistent with the findings in [29].
For the SWHE parameters (Section 4.3) for we use the corresponding values of bits and bits, respectively, and security of bits.
Table 2 gives the cumulative (total) computation and communication costs for each participant while running Protocol 2 (both stage I and II) for the Enron email dataset, while Table 3 gives the costs for Protocol 3. Both tables report results for different polynomial sizes and numbers of EDOs . The size of a single ciphertext is bits. In Protocol 3, each participant transfers one ciphertext each, for a total (cumulative) communication cost of ciphertext transmissions ( EDOs, TACS and EDS), which are reported in the corresponding columns in Table 2 in MB. Table 4 gives the amortized (per query) costs of the improved 2PC version of Protocol 4 (Improvement 2 and 3 in Section 7) for each different . In this sense, for the Enron dataset, the number of packed queries in a single ciphertext is 4 and 8 queries for and , respectively, while for the SMS spam corpus dataset, it is 8 and 16 queries, respectively.
Table 2.
Protocol 3 costs for different polynomial modulus and EDO numbers .
Table 3.
Protocol 3 costs for different N and numbers of EDOs.
Table 4.
Amortized (per query) costs of Protocol 4.
In Table 5, we compare the best results of our secure feature-selection protocol (Protocol 2, both secFS-S1 and secFS-S2) with the secure feature protocol in [40], which is the closest to ours from the related literature. In [40], they use a light version of the information gain—the Gini index—for secure feature selection. Also, in [40], they use the non-textual Speed Dating binary dataset of [58], which has records, 122 initial features, from which they select features and finish the task in 60.57 min. Since [58] is a non-textual dataset and the features are known publicly, they do not engage in a protocol similar to our GRPV and secFS-S1, which makes their task easier.
In Table 6 and Table 7, we report and compare the costs and characteristics of several related schemes (mainly related to binary textual datasets) dealing with PP training and classification, respectively. Since they report several costs and properties, we present the best of each one of each scheme. For the Enron dataset, in Table 6, in training costs of our scheme, we include both secure feature selection and training, compensating for the fact that the other schemes directly proceed with training without prior feature selection. For PP training and classification benchmark purposes with [29], for the SMS spam dataset [54,56] of our protocols, we report the results for , bits and bits and bits.
Table 5, Table 6 and Table 7 show that our schemes outperform the others from several times to orders of magnitudes in terms of computation and communication, despite the others running their protocols on machines with much better hardware resources than ours. Our protocols are also better in classification accuracies.
Table 5.
Secure feature selection comparisons among schemes.
Table 6.
Training comparisons among similar PP schemes.
Table 7.
Classification comparisons among similar PP schemes.
10. Security Analysis and Proofs
Definition 7.
Decision-RLWE: for a security parameter
, let be a cyclotomic irreducible polynomial of degree which depends on . Let be a polynomial ring with integer coefficients modulo , s.t. . Let , and be uniform randomly chosen from , i.e., and . Let be randomly chosen noise from a normal distribution , i.e., . Decision RLWE is the problem to distinguish between and [51,52].
Assumption 1.
Hardness of Decision-RLWE: Decision-RLWE is assumed to be a hard and resilient problem even for an adversary with a quantum computer [51,52].
- Semantic security of the RLWE schemes: Due to its probabilistic encryption, RLWE-based schemes offer semantic security, i.e., for ciphertexts, and that encrypt plaintexts and , respectively; an adversary cannot distinguish which ciphertext belongs to which plaintext [61]. All the known SWHE schemes are based on RLWE.
Definition 8.
Secure Multi-Party Computation (SMPC) under the semi-honest model for deterministic functions: Let us have
parties, , with the corresponding private inputs and let . With a certain security parameter, , let them execute protocol at the end of which each gets the corresponding output for ; thus, the global output is . Let the view of be , where are the messages that receives while executing . We say that is a secure MPC protocol under the semi-honest model if there exists a simulator (function) s.t. , where stands for computational indistinguishability against a probabilistic polynomial time adversary [12,61].
Theorem 1.
Modular Sequential Composition Theorem: Let
sequentially call protocols . If are SMPC protocols under the semi-honest model, then is also secure.
Proof.
Given in [12,61]. □
Theorem 2.
GRPV is secure under the semi-honest model.
Proof.
For , is the view and is the output of .
Let be a random vector and let . For the simulator of each eDo, we have .
For the view of TACS, we have and it has no output. For the simulator, we construct random SWHE ciphertexts; thus, due to the semantic security of the RLWE SWHE schemes.
For EDS, the view is and it has no output. For its simulator, we have since RLWE-based SWHE ciphertexts and are indistinguishable from each other due to their semantic security. None of the participants has a private input in GRPV. □
Theorem 3.
secFS-S1 is secure under the semi-honest model.
Proof.
For , is the view (where the set of private input of all participants), is the private input, and is the output of . From and we construct the set of the union of words , where is obtained as in lines 2–4 of secFS-S1 and are permuted hashes of random words. and are randomly chosen such that in the resulting the indexes that correspond to the words of in are positive, thus greater than . For the simulator of we have ; thus, . For TACS, is the view, is the input, and is the output it receives at the end of the protocol, where is the empty set. Let us construct sets of permuted word hashes so that TACS cannot tell apart them and and random ciphertexts , which cannot be distinguished from due to the semantic security of the RLWE schemes. For the TACS’ simulator, then .
EDS’ view is , and its input and output is the empty set. We construct a random ciphertext which cannot be distinguished from to the semantic security of the RLWE-based schemes. For the simulator, then we have .□
Corollary 1.
secFS-S1 is secure under the semi-honest model when out of , EDOs fail or EDOs collude.
Proof.
Without a loss of generality, let the 3 left (not failed) EDOs be ED, for , and let us treat the n-2 colluding EDOs as a single entity ; thus, we again have 3 participating EDOs denoted as ED, for . We go through the similar lines as Theorem 2 to prove Corollary 1. If there are only 2 non-failed or non-colluding EDOs left, then, for the words in (line 8 and 14), which do not appear in one EDO, not only this EDO will know that they exist in the other EDO, he will also know whether the counts of those words is greater or smaller than based on the final words’ set, which constitutes a partial leakage that goes against the strict security and privacy requirements set in Section 1. □
Theorem 4.
secFS-S2 is secure under the semi-honest model.
Proof.
For , is the view, is the private input, and is the output of . We construct random and s.t. after , the resulting vector, that in its corresponding indexes is supposed to store the relative IG of the words in , which have its top highest values for the indexes that correspond to the words of the selected features’ set . For the corresponding simulator of each of the EDOs, we have ; thus, .
For TACS, is the view, is the input, and is the output. For the simulator, we construct the corresponding ciphertexts randomly, which cannot be differentiated from their counterparts due to the semantic security of the RLWE schemes; thus, EDS’ view is and its input and output are the empty set. For the simulator, we construct random ciphertexts, so . □
Corollary 2.
secFS-S2 is secure under the semi-honest model when out of
EDOs fail or
EDOs collude.
Theorem 5.
secT is secure under the semi-honest model.
Proof.
For , is the view, is the private input, and is the output of . The simulator is .
For TACS, is the view, is the input, and is the output. For the simulator, we construct random RLWE ciphertexts; thus, . For EDS, . □
Corollary 3.
secT is secure under the semi-honest model when out of
, EDOs fail or EDOs collude.
Theorem 6.
Our end-to-end protocol (unprocessed datasets until the final trained model) is secure under the semi-honest model.
Proof.
The end-to-end protocol, denoted as , sequentially calls GRPV secFS-S1, secFS-S2, and secT, while their security was proven in Theorems 2–5, respectively. We invoke Theorem 1 to prove the security of E2E. □
Corollary 4.
protocol is secure under the semi-honest model when out of , EDOs fail or EDOs collude.
Proof.
We use Corollaries 1–3 and invoke Theorem 1. □
Theorem 7.
secC is secure under the semi-honest model.
Proof.
EC’s view is its private input and output . For the EC’s simulator, we construct random s.t. their subtraction will give the same output when EC executes lines 14–18; thus, . The views of TACS and EDS are and is , respectively. We construct random ciphertexts and for their corresponding simulators. □
11. Discussions and Future Directions
We provide and prove the security of our end-to-end (secure feature selection proceeded by secure federated learning—training, i.e., from raw dataset to the final trained ML model), as well as secure classification protocol under the semi-honest model. In the process, we satisfy strict privacy and efficiency goals utilizing the properties offered by the proposed chain-of-blocks (COB) technology. Our secure protocols are robust and allow a high rate of fault tolerance or collusions among datasets, are independent of each other (can be used in combination with other schemes), are designed to have in mind distributed heterogeneous edge IoT environments and are resistant to adversaries with quantum computers. Furthermore, utilizing COB, the proposed protocols deal with networks errors, as well as unauthorized and malicious edge dataset owners, which deviate from the protocol with the aim of disrupting it by eventually providing low classification accuracy. Experimental evaluations show that our protocols outperform state-of-the-art ones from several times to orders of magnitude in terms of computation and communication cost, while retaining the strict security and privacy requirements.
We plan to extend these security, privacy, and efficiency characteristics of our schemes to deal with secure multi-label multi-output ML algorithms in distributed environments, the first to do so in the literature, e.g., knowing that decision trees use the features’ information gains to choose the nodes for each tree level, one such ML algorithm can be federated (distributed) tree learning, for which we can adjust our proposed protocol of securely evaluating the information gains in distributed environments (secFS-S2). Furthermore, they will deal with horizontally, vertically, and hybrid partitioned datasets.
Funding
This research (including APC) was funded by İstanbul Sabahattin Zaim University grant number BAP-400-014.
Data Availability Statement
Codes, datasets, and experimental evaluations of the proposed protocols can be found in refs [55,56].
Acknowledgments
The author acknowledges the contributions of TÜBİTAK (The Scientific and Technological Research Institution of Turkey). The author would also like to thank Albert Levi and Erkay Savaş for their beneficial suggestions and remarks in improving the quality of this paper.
Conflicts of Interest
The author declares no conflict of interest.
References
- Yehuda, L.; Pinkas, B. Privacy preserving data mining. In Annual International Cryptology Conference; Springer: Berlin/Heidelberg, Germany, 2000. [Google Scholar]
- Agrawal, R.; Srikant, R. Privacy-Preserving Data Mining; ACM: New York, NY, USA, 2000; Volume 29. [Google Scholar]
- Verykios, V.S.; Bertino, E.; Fovino, I.N.; Provenza, L.P.; Saygin, Y.; Theodoridis, Y. State-of-the-art in privacy preserving data mining. ACM Sigmod Rec. 2004, 33, 50–57. [Google Scholar]
- Aggarwal, C.C.; Yu, P.S. A general survey of privacy-preserving data mining models and algorithms. In Privacy-Preserving Data Mining; Springer: Boston, MA, USA, 2008; pp. 11–52. [Google Scholar]
- Gilad-Bachrach, R.; Dowlin, N.; Laine, K.; Lauter, K.; Naehrig, M.; Wernsing, J. Cryptonets: Applying neural networks to encrypted data with high throughput and accuracy. In International Conference on Machine Learning; PMLR: Cambridge, MA, USA, 2016. [Google Scholar]
- Bost, R.; Popa, R.A.; Tu, S.; Goldwasser, S. Machine Learning Classification over Encrypted Data; NDSS; Internet Society: Reston, VA, USA, 2015; Volume 4324. [Google Scholar]
- Gao, C.-Z.; Cheng, Q.; He, P.; Susilo, W.; Li, J. Privacy-preserving Naive Bayes classifiers secure against the substitution-then-comparison attack. Inf. Sci. 2018, 444, 72–88. [Google Scholar]
- Khedr, A.; Gulak, G.; Vaikuntanathan, V. SHIELD: Scalable homomorphic implementation of encrypted data-classifiers. IEEE Trans. Comput. 2015, 65, 2848–2858. [Google Scholar] [CrossRef] [Scilit]
- Gupta, T.; Fingler, H.; Alvisi, L.; Walfish, M. Pretzel: Email encryption and provider-supplied functions are compatible. In Proceedings of the Conference of the ACM Special Interest Group on Data Communication, Los Angeles, CA, USA, 21–25 August 2017. [Google Scholar]
- Kjamilji, A.; Idrizi, A.; Luma-Osmani, S.; Zenuni-Kjamilji, F. Secure Naïve Bayes classification without loss of accuracy with application to breast cancer prediction. In Proceeding International Conference on Science and Engineering; Sunan Kalijaga Press: Yogyakarta, Indonesia, 2020; Volume 3. [Google Scholar]
- Wu, D.J.; Feng, T.; Naehrig, M.; Lauter, K. Privately evaluating decision trees and random forests. Proc. Priv. Enhancing Technol. 2016, 2016, 335–355. [Google Scholar] [CrossRef] [Scilit]
- Liu, X.; Lu, R.; Ma, J.; Chen, L.; Qin, B. Privacy-preserving patient-centric clinical decision support system on naive Bayesian classification. IEEE J. Biomed. Health Inform. 2015, 2012, 655–668. [Google Scholar]
- Liu, X.; Deng, R.; Choo, K.-K.R.; Yang, Y. Privacy-preserving outsourced clinical decision support system in the cloud. IEEE Transac. Serv. Comput. 2017, 14, 222–234. [Google Scholar]
- Al Badawi, A.; Hoang, L.; Mun, C.F.; Laine, K.; Aung, K.M.M. Privft: Private and fast text classification with homomorphic encryption. IEEE Access 2020, 8, 226544–226556. [Google Scholar] [CrossRef] [Scilit]
- Kjamilji, A.; Savas, E.; Levi, A. Efficient Secure Building Blocks with Application to Privacy Preserving Machine Learning Algorithms. IEEE Access 2021, 9, 8324–8353. [Google Scholar] [CrossRef] [Scilit]
- Merkle, C.R. A digital signature based on a conventional encryption function. In Conference on the Theory and Application of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 1987. [Google Scholar]
- Narayanan, A.; Bonneau, J.; Felten, E.; Miller, A.; Goldfeder, S. Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction; Princeton University Press: Princeton, NY, USA, 2016. [Google Scholar]
- Li, S.; Xu, L.D.; Zhao, S. The internet of things: A survey. Inf. Syst. Front. 2015, 17, 243–259. [Google Scholar] [CrossRef] [Scilit]
- Shi, W.; Cao, J.; Zhang, Q.; Li, Y.; Xu, L. Edge computing: Vision and challenges. IEEE Internet Things J. 2016, 3, 637–646. [Google Scholar] [CrossRef] [Scilit]
- Androutsopoulos, I.; Paliouras, G.; Michelakis, E. Learning to Filter Unsolicited Commercial E-Mail; “ DEMOKRITOS”; National Center for Scientific Research: Athens, Greece, 2004. [Google Scholar]
- Ranaweera, P.; Jurcut, A.D.; Liyanage, M. Survey on Multi-Access Edge Computing Security and Privacy. EEE Commun. Surv. Tutor. 2021, 23, 1078–1124. [Google Scholar] [CrossRef] [Scilit]
- Zhao, W.; Jiang, C.; Gao, H.; Yang, S.; Luo, X. Blockchain-Enabled Cyber–Physical Systems: A Review. IEEE Internet Things J. 2020, 8, 4023–4034. [Google Scholar]
- Das, K.; Bhaduri, K.; Kargupta, H. A local asynchronous distributed privacy preserving feature selection algorithm for large peer-to-peer networks. Knowl. Inf. Syst. 2010, 24, 341–367. [Google Scholar]
- Banerjee, M.; Chakravarty, S. Privacy preserving feature selection for distributed data using virtual dimension. In Proceedings of the 20th ACM International Conference on Information and Knowledge Management; ACM: New York, NY, USA, 2011. [Google Scholar]
- Jafer, Y.; Matwin, S.; Sokolova, M. Privacy-aware filter-based feature selection. In 2014 IEEE International Conference on Big Data (Big Data); IEEE: New York, NY, USA, 2014. [Google Scholar]
- Sheikhalishahi, M.; Martinelli, F. Privacy-utility feature selection as a privacy mechanism in collaborative data classification. In 2017 IEEE 26th International Conference on Enabling Technologies: Infrastructure for Collaborative Enterprises (WETICE); IEEE: New York, NY, USA, 2017. [Google Scholar]
- Rahimipour Anaraki, J.; Samet, S. Privacy-preserving feature selection: A survey and proposing a new set of protocols. arXiv 2020, arXiv:2008.07664. [Google Scholar]
- Rao, V.; Long, Y.; Eldardiry, H.; Rane, S.; Rossi, R.; Torres, F. Secure Two-Party Feature Selection. arXiv 2019, arXiv:1901.00832. [Google Scholar]
- Li, X.; Dowsley, R.; De Cock, M. Privacy-preserving feature selection with secure multiparty computation. arXiv 2021, arXiv:2102.03517. [Google Scholar]
- Reich, D.; Todoki, A.; Dowsley, R.; De Cock, M.; Nascimento, A.C.A. Privacy-preserving classification of personal text messages with secure multi-party computation: An application to hate-speech detection. arXiv 2019, arXiv:1906.02325. [Google Scholar]
- Resende, A.; Railsback, D.; Dowsley, R.; Nascimento, A.C.A.; Aranha, D.F. Fast privacy-preserving text classification based on secure multiparty computation. arXiv 2021, arXiv:2101.07365. [Google Scholar]
- Costantino, G.; La Marra, A.; Martinelli, F.; Saracino, A.; Sheikhalishahi, M. Privacy-preserving text mining as a service. In 2017 IEEE Symposium on Computers and Communic (ISCC); IEEE: New York, NY, USA, 2017. [Google Scholar]
- Paillier, P. Public-key cryptosystems based on composite degree residuosity classes. In International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 1999. [Google Scholar]
- Tang, B.; Kay, S.; He, H. Toward optimal feature selection in naive Bayes for text categorization. IEEE Trans. Knowl. Data Eng. 2016, 28, 2508–2521. [Google Scholar] [CrossRef] [Scilit]
- Gentry, C. Fully homomorphic encryption using ideal lattices. In Proceedings of the Forty-First Annual ACM Symposium on Theory of Computing; ACM: New York, NY, USA, 2009. [Google Scholar]
- Martins, P.; Sousa, L.; Mariano, A. A survey on fully homomorphic encryption: An engineering perspective. ACM Comput. Surv. (CSUR) 2017, 50, 83. [Google Scholar]
- Smart, N.P.; Vercauteren, F. Fully homomorphic SIMD operations. Des. Codes Cryptogr. 2014, 71, 57–81. [Google Scholar]
- Fan, J.; Frederik, V. Somewhat practical fully homomorphic encryption. IACR Cryptol. ePrint Arch. 2012, 2012, 144. [Google Scholar]
- Metsis, V.; Androutsopoulos, I.; Paliouras, G. Spam Filtering with Naive Bayes-Which Naive Bayes? CEAS: Mountain View, CA, USA, 2006; Volume 17. [Google Scholar]
- Available online: https://github.com/Microsoft/SEAL (accessed on 20 May 2026).
- Goldreich, O. Foundations of cryptography. In Basic Applications; Cambridge University Press: Cambridge, UK, 2009; Volume 2. [Google Scholar]
- SMS Spam Collection v.1 Data Set. Available online: http://www.dt.fee.unicamp.br/~tiago/smsspamcollection (accessed on 22 May 2021).
- Available online: https://github.com/artrimk/secNB_SMS_Bigrams (accessed on 20 May 2026).
- Available online: https://github.com/artrimk/secMNB_Email (accessed on 20 May 2026).
- Available online: https://github.com/OleanderSoftware/OleanderStemmingLibrary (accessed on 20 May 2026).
- Nandakumar, K.; Ratha, N.; Pankanti, S.; Halevi, S. Towards deep neural network training on encrypted data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops; IEEE: New York, NY, USA, 2019. [Google Scholar]
- Available online: https://www.openml.org/d/40536 (accessed on 20 May 2026).
- Kjamilji, A.; Levi, A.; Savas, E.; Guney, O.B. Secure Matrix Operations for Machine Learning Classifications over Encrypted Data in Post Quantum Industrial IoT. In 2021 International Symposium on Networks, Computers and Communications (ISNCC); IEEE: New York, NY, USA, 2021. [Google Scholar]
- Artrim, K. Privacy-Preserving Zero-Sum-Path Evaluation of Decision Tress in Postquantum Industrial IoT. IEEE Trans. Ind. Inform. 2024, 20, 10178–10191. [Google Scholar]
- Kjamilji, A.; Güney, O.B. Highly efficient secure linear algebra for private machine learning classifications over malicious clients in the post-quantum world. J. King Saud Univ.-Comput. Inf. Sci. 2023, 35, 101718. [Google Scholar] [CrossRef] [Scilit]
- Kjamilji, A. A Constant Time Secure and Private Evaluation of Decision Trees in Smart Cities Enabled by Mobile IoT. In 2023 IEEE International Conference on Smart Mobility (SM); IEEE: New York, NY, USA, 2023. [Google Scholar]
- Li, Q.; Ma, B.; Wang, X.; Wang, C.; Gao, S. Image steganography in color conversion. IEEE Trans. Circuits Syst. II Express Briefs 2023, 71, 106–110. [Google Scholar] [CrossRef] [Scilit]
- Li, Q.; Wang, X.; Ma, B.; Wang, X.; Wang, C.; Gao, S.; Shi, Y. Concealed attack for robust watermarking based on generative model and perceptual loss. IEEE Trans. Circuits Syst. Video Technol. 2021, 32, 5695–5706. [Google Scholar] [CrossRef] [Scilit]
- Kjamilji, A. Secure, Private and Fast Memory Allocation of Processes in Post-Quantum Clouds. In 2026 International Seminar on Intelligent Business and Edge-Computing Research (ISIBER); IEEE: New York, NY, USA, 2026. [Google Scholar]
- Abla, P.; Huang, R. PriFidCE: An Efficient Privacy-Preserving Face Identification Protocol from a More Compact Coefficient Embedding. IEEE Internet Things J. 2025, 13, 8601–8614. [Google Scholar]
- Kjamilji, A. Privacy Preserving Tax Evasion Detection for Post-Quantum Centralized Banking Systems. In 2025 1st International Conference on Emerging Trends in Information Systems and Informatics (ICETISI); IEEE: New York, NY, USA, 2025. [Google Scholar]
- Kjamilji, A. Covert, Secure and Private Communications in Software Defined Networking. In 2023 International Conference on Computational Science and Computational Intelligence (CSCI); IEEE: New York, NY, USA, 2023. [Google Scholar]
- Li, D.; He, K.; Liu, J.-N.; Yang, A.; Liu, X.; Weng, J. PDTE: Outsourced Private Decision Tree Evaluation for Large Trees with Sublinear Communication. IEEE Trans. Serv. Comput. 2026. [Google Scholar] [CrossRef] [Scilit]
- Li, D.; Chattopadhyay, A.; Li, Q.; Lü, Q.; Wu, J.; Xiang, T.; Liao, X. CryptDNN: A Fast Privacy-Preserving Deep Neural Network Inference Architecture Based on Cloud-Edge-Client Collaboration. IEEE Trans. Netw. Sci. Eng. 2025, 13, 2726–2740. [Google Scholar]
- He, G.; Yuan, Z. Verifiable Privacy-Preserving Neural Network Inference via Multi-Key Homomorphic Encryption. IEEE Internet Things J. 2026, 13, 22072–22081. [Google Scholar]
- Zeng, B.; Wu, T.; Peng, S.; Pang, Z.; Yu, R.; Wang, L. Efficient privacy-preserving convolutional neural network inference with skip-perm. Adv. Eng. Inform. 2026, 69, 104081. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.















