Next Article in Journal
An Interoperable Blockchain Security Frameworks Based on Microservices and Smart Contract in IoT Environment
Previous Article in Journal
DOA Estimation Based on Convolutional Autoencoder in the Presence of Array Imperfections
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Facial Image Encryption for Secure Face Recognition System

1
Faculty of Computing and Information Technology, Sohar University, Sohar 311, Oman
2
School of Health & Wellbeing, University of Glasgow, Glasgow G20 7SB, UK
*
Author to whom correspondence should be addressed.
Electronics 2023, 12(3), 774; https://doi.org/10.3390/electronics12030774
Submission received: 2 January 2023 / Revised: 31 January 2023 / Accepted: 1 February 2023 / Published: 3 February 2023

Abstract

:
A biometric authentication system is more convenient and secure than graphical or textual passwords when accessing information systems. Unfortunately, biometric authentication systems have the disadvantage of being susceptible to spoofing attacks. Authentication schemes based on biometrics, including face recognition, are susceptible to spoofing. This paper proposes an image encryption scheme to counter spoofing attacks by integrating it into the pipeline of Linear Discriminant Analysis (LDA) based face recognition. The encryption scheme uses XOR pixels substitution and cellular automata for scrambling. A single key is used to encrypt the training and testing datasets in LDA face recognition system. For added security, the encryption step requires input images of faces to be encrypted with the correct key before the system can recognize the images. An LDA face recognition scheme based on random forest classifiers has achieved 96.25% accuracy on ORL dataset in classifying encrypted test face images. In a test where original test face images were not encrypted with keys used for encrypted feature databases, the system achieved 8.75% accuracy only showing it is capable of resisting spoofing attacks.

1. Introduction

A Face Recognition algorithm uses machine learning techniques to detect and identify human faces by analyzing visual patterns in visual data [1]. One of the key advantages of facial recognition systems is that they allow users to be passively authenticated [2] that is, they allow users to prove their authenticity simply by being in the room without having to interact with the system at all. Video surveillance, access control, forensics, and social media are some of the many applications in which facial recognition systems are used.
As explained by [3], facial recognition systems have six stages. Preprocessing is the first stage. An area of interest is aligned when faces are detected in the visual input. Using preprocessed input, face features are extracted at the second stage. During the final stage, extracted face features are compared with features in the database for matching results. An identification is based on facial features stored in memory, or a verification is based on matching results.
The face recognition authentication system has a number of advantages and limitations, as all biometric subsystems. It is more secure to use biometric authentication than to use conventional password authentication [4]. As biometric traits cannot be forged, registration is required, preventing false authentication [5], and each person’s data is unique [6]. An important drawback of biometric authentication systems is that they are susceptible to spoofing attacks, as well as attacks on deep learning and machine learning systems. In spoofing attacks, attackers present false biometric information in order to gain credibility [7]. Synthesis is considered a spoofing attack by [8]. According to [9,10], reply attacks can also be described as spoofing attacks. Machine learning and deep learning models can be attacked in a variety of ways, including adversarial attacks [4] and poisoning attacks [11]. In this paper a method for preventing spoofing attacks on face recognition system is proposed by integrating a model for image encryption on recognition process. Image encryption model is used to encrypt preprocessed face images that are used to train and test a face recognition model based on Linear Discriminant Analysis (LDA) algorithm. Extracted features enrolled on features database are encrypted, meaning that in order to gain authenticity face image needs to be encrypted with correct image encryption key in order for classifier to correctly identify or verify submitted input. With that effectiveness of spoofing attacks are minimized; other than illegitimately obtaining copies of face images of authenticated individuals and submit it to system, an attacker needs to encrypt face image with correct key as well.
In order for image encryption models to provide this extra layer of security, they must offer high encryption performance and be resistant to brute force attacks. The image encryption model used in the recognition process is based on the XOR operation and a special type of Cellular Automata called the Outer Totalistic Cellular Automata (OTCA). XOR is applied to pixels bits for pixel substitution, while CA is used for image scrambling. Pixel substitution involves changing the original values of pixels using mathematical operations, and then applying the reverse operation to recover the original values [12]. By shuffling the original pixel locations on an image, image scrambling breaks the high correlation between pixels that were originally adjacent [13]. In order to generate complex structures from simple structures, CA can utilize simple structures [14], making it an excellent choice for image scrambling applications [15]. Most of studies on facial recognition systems focus on increasing recognition accuracy of model on various datasets however, not enough work is presented in addressing weaknesses of such systems including spoofing issues. This paper proposes a solution to spoofing issue on facial recognition through addition of an image encryption step in recognition process. The main goal is to build a facial recognition system that correctly classifies encrypted facial images for each subject in a selected faces dataset. The face recognition model is based on LDA and is trained using a training set formed of encrypted subjects’ face images. Testing the model is conducted using two testing sets the first of which is formed of the remaining encrypted subjects’ face images whereas the other will consist of the same remaining images however, in this case the images used are the original or decrypted images. Encryption of face images is implemented with new method based on XOR pixels substitution and scrambling based on CA. The contributions of this paper are as follows:
  • The encryption of images consists of two main stages. Pixel substitution is the first stage of the process, during which each pixel value is substituted by a new value generated by performing an XOR operation on each pixel bit. A second stage involves shuffled pixel positions into new positions using CA during the pixels scrambling stage.
  • A Linear Discriminant Analysis (LDA) is used to extract features from encrypted images and a Random Forest classifier is used to classify them. LDA reduces the dimensionality of the feature space to maximize the separation between classes by transforming the feature space. Consequently, more discriminative features are generated, improving the performance of the classifier. Random Forest is a classification method that uses multiple decision trees to classify data. The method has a high degree of accuracy and is robust to overfitting. Combining LDA and Random Forest classifiers makes for a powerful face recognition algorithm.
  • The use of encrypted face images to train the model causes the model to recognize test images encrypted with the same encryption key only with high accuracy. This drastically reduces the effectiveness of spoofing attacks as an attacker would need to encrypt images with the same key in addition to obtaining an artificial copy of an authenticated individual face image.
The rest of this paper is organized as follows. On second section related work to image scrambling and face recognition with LDA is presented; third section explains implemented methodology; fourth section demonstrates results; last section concludes the study.

2. Related Work

Using universal rules, CA cells can change their state every discrete time step in response to their neighbors. According to [16], CA-based image encryption works directly on pixels to encrypt images. Aside from its ease of use, CA image encryption provides high security, parallel computing capabilities, and high performance [16]. In addition to image encryption, CA is capable of encrypting other types of information as well. Using a reversible CA based block cipher algorithm [17], proposed an algorithm that could handle CPUs with different core counts and supported scalability beyond 128 bits. The security framework offered by [18] is made up of three stages. The first is entity authentication with a zero-knowledge protocol, while the second and third stages are encryption and decryption with CAs. Several CA-based image scrambling techniques have been developed for use in image encryption [15,19,20,21,22,23,24]. Those studies found CA scrambling to be effective against a variety of attacks, breaking high rates of correspondence between adjacent pixels. It has been found that a large number of CA-based image scrambling techniques have been developed [14,18,19,20,21,22,23]. In those studies, CA scrambling performed well against different types of attacks, breaking high correlation between adjacent pixels. The two-dimensional CA was used by [15] for image scrambling. A number of different configurations, such as evolved generations, neighborhood configurations, boundary conditions, and rules with lambda values near critical values, were examined for their effect on GDD metric scrambling performance. By using all lattices evolved from the initial lattice, the method scrambles the image. An empty lattice is created, then on that lattice pixel locations that correspond to live cells on first scrambling matrix take the pixel’s values of original subject image starting from top-leftmost cell then proceeding in row major order. For the remaining scrambling matrices, pixels at locations that have already been filled are skipped during the process. Pixels are copied from the original image to dead cells in row major order on the scrambling matrix. Based on the obtained results, higher generation scrambling results had better Gray Difference Degree (GDD). Additionally, there was a higher GDD achieved when Moore’s configuration with periodic boundary conditions was used. Among the rules tested, lambda values ranged from 0.20703 to 0.41406. The highest GDD value on tested images was achieved by Rule 224—Game of Life.
It was investigated by [20] whether other 2D-OTCA rules could be applied to scramble images besides Game of Life. Instead of using Moore’s rule, the authors use von Neumann neighborhood configuration. Different OCTA rules are experimented on and GDD is used for evaluating scrambling performance. Boundary conditions and generation selection are also taken into consideration. An initially generated lattice is evolved k times based on a randomly generated initial lattice. An image of the subject is scrambled using the final evolved lattice. On an empty lattice, pixel values of the original subject image are taken from the top-leftmost cell and proceed in row major order until every cell on the lattice corresponds to an alive cell on the scrambling matrix. By copying pixels from the original image to dead cells on the scrambling matrix, each pixel will correspond to a cell on the matrix in row major order. According to rule 171, this technique showed the highest GDD results of all the proposed techniques. As compared to other techniques, this technique took significantly less time to compute. Gray image encryption algorithm developed by [23] uses 2D CA to scramble the image at the bit level. Binary images representing bits are generated from an image by converting it into 8 binary images. An initial configuration lattice of 8 binary images is created and evolved using a B3/S1234 CA rule. As a result, 8 binary images of the original image are scrambled independently using evolved 8 binary lattices in the same way, thereby changing their positions and values simultaneously.
A modification to the 2D CA image scrambling technique proposed by [15] was implemented by [21], which resulted in better GDD scrambling. In the same way, all evolved lattices are used to scramble data. Using row major order, pixels on the original image that correspond to live cells on the scrambling matrix are copied to an empty lattice. On the remaining locations on row major order, the remaining pixels are copied as well. For the remaining scrambling matrices, repeat the same procedure. A scrambling lattice is evolved according to Game of Life 224 rules. Based on the results, the best GDD is achieved when periodic boundary conditions, Moore’s neighborhood, and more generations are included up to eight. Based on periodic boundary conditions, Moore’s neighborhood, and Moore’s neighbors, the highest GDD for eight generations was 0.9551.
In [19], CA was proposed for scrambling and watermarking images. Chaos can be detected in fractal CA rules by analyzing fractal box dimensions. After creating an initial lattice, a lattice is evolved based on a selected CA to scramble the image. This process scrambles the image as an initial step in watermarking. Furthermore, watermarked images produced using this scheme are less susceptible to noise attacks, cropping, and JPEG compression.
The author of [22] proposed using OTCA for encrypting images at the bit level. In rule 534 and rule 816, the bit values and locations of the original images are simultaneously changed with high computational efficiency at the bit level. An analysis of histograms and entropies indicates that the encryption method is robust. Furthermore, the key space is highly sensitive in addition to being large. It was found that each test image had an NPCR of nearly 100%, an Entropy of over 7.2, and a correlation almost equal to zero in each direction. Based on histogram analysis, encrypted images cannot be distinguished from their originals.
A method for scrambling images that uses ECA was proposed by [24]. ECA rules were used to test scrambling performance in classes 3 and 4. The scrambling method converts original images into 1D vectors. After k generations of evolution, a random 1D lattice is scrambled. Pixels are copied from the original image onto the empty 1D lattice and positioned where the live cells are on the scrambling lattice corresponding to pixels in the original image. Similarly, scrambling matrices with pixels already filled will skip matrices with unfilled pixels. As pixels are copied onto dead cells in the scrambling matrix, they correspond to the pixels that are still in the original image. An output 2D matrix is generated after converting a 1D vector to a 2D matrix. Using ECA for scrambling did not result in any difference in performance between GDD and 2D CA, and in some cases, performance was even better. A high GDD was obtained with Rule 22 when boundary conditions were combined with ten generation numbers. In class 3 rules tested (22, 30, 126, 150, 182), the GDDs were higher than in class 4 rules (rule 110).
As real-time processors become more common, research on automatic recognition of faces has become quite active, aiming to facilitate commercial applications by taking advantage of the human ability to recognize faces as special objects. The analysis of human facial images has been the subject of numerous studies. There are several ways in which facial features can be used to discriminate between people based on their gender, race, and age. In studies that used subjective psychovisual experiments, these features have been analyzed for their significance. Linear discriminant analysis (LDA) can be used to recognize faces by maximizing within-class scatter and minimizing between-class scatter through the combination of within- and between-class scatter. With LDA, different features of the face are objectively evaluated for their significance in identifying the human face. Using LDA for recognition can also yield a few features. LDA overcomes the limitations of Principle Component Analysis by using a linear discriminant criterion. By using this criterion, the projected samples’ between-class scatter matrix is compared with their within-class scatter matrix in order to maximize that ratio. A linear discriminant used to classify images results in the separation of images into different categories.
A variety of methods for analyzing the features of the face are described in the literature based on local linear discriminants. Through the use of nonparametric discriminant analysis (NDA) and multiclassifier integration, Ref [25] developed a new framework for face recognition. The principal space and null space of the intra-class scatter matrix are being used to improve two multi-class NDA algorithms (NSA and NFA). The NFA uses classification boundary information more effectively than the NSA. Ref [26] also proposes enhancing order-based coding capabilities to increase intrinsic structure detection in facial images in addition to enhancing local textures. By selecting the most discriminatory subspace, multimodal features can be automatically merged. In order to produce robust similarity measurements and discriminant analyses, adaptive interaction functions are used to suppress outliers in each dimension. In order to address the classification issue raised by a compact feature representation, the sparsity-driven regression model is modified. “Exponential LDE” (ELDE) is a new discriminant technique introduced by [27]. ELDE can be viewed as a compromise between the two-dimensional extension of LDE and the local discriminant embedding (LDE). Using the proposed framework, the SSS problem is overcome by eliminating the null space associated with locality-preserving scatter matrices. Distance diffusion mapping transforms original data into a new space and then applies LDE to the new space, similar to kernel-based nonlinear mapping. Increased margins between samples of different classes improve classification accuracy. The [28] method uses the local geometry structure of the data while applying a globally discriminatory structure from linear discriminant analysis, which maximizes between-class scatter while minimising within-class scatter. In kernel feature spaces, nonlinear features can also be produced through the optimization of an objective function.
A new ensemble approach for discovering discriminative patterns has been developed by [29]: the many-kernel random discriminant analysis (MK-RDA). In the proposed ensemble method, the authors incorporate a salience-aware strategy whereby random features are chosen on the semantic components of the scrambled domain using salience modeling. By optimizing binary template discriminability, Ref [30] proposes a new binarization scheme, using a novel binary discriminant analysis, a real-valued template can be transformed into a binary template. Because binary space is hard to differentiate, direct optimization is challenging. In order to solve this problem, a binary template discriminability function was developed using the perceptron.

3. Methodology

This section details procedures involved in integration of image encryption technique into pipeline of LDA based face recognition system. Firstly, phases related to processing images to obtain their encrypted versions are elaborated, following that LDA algorithm steps are explained, and modified face recognition scheme pipeline is expounded with LDA and encrypted features database.

3.1. Image Encryption Scheme

Image encryption technique is implemented with two phases. In the first phase pixels’ values are substituted using XOR operation. On second phase pixels’ positions are shuffled based on 2D lattice combined from different generations of lattices evolved from same initial lattice using CA. Initial lattice is randomly generated grid of cells confined within defined space. Using appropriate CA rules initial lattice is evolved yielding new lattices with each generation.

3.1.1. XOR Pixels Substitution

Digital images are composed of pixels usually with different intensities that are represented in numerical range depending on image’ bit depth. For example, if an image bit depth is 8 bits then pixels are represented with 8 bits then their numerical values range from 0 to 255. Note that longer bit depth as in case for RGB images describe bit depth for three channels with each channel can be uniquely represented with third of bit depth length. Then pixels can be represented as binary strings. Pixels substitution on proposed method is obtained by applying logical XOR operation between adjacent binary bits. If binary string length is n then applying operation as explained would generate n 1 string, however the left most bit is kept the same as original binary string therefore generated binary string will have length of n . The conversion of any binary string with XOR is demonstrated with algorithm below.
Algorithm 1: Processing binary string with XOR to obtain new XORed string
Input: b [n bits binary string]
Output: X [XOR on bits of b ]
1 Set   n = L e n g t h b      [n value is number of bits in b]
2 Set   X = b 0          [leftmost bit of X is same as b]
3 Set   i = 0
4 w h i l e i < n 1 { X = X + b i b i + 1 i = i + 1 }
[XOR is applied between adjacent bits and appended to X]
5Return X
As such generally for any binary string b with length n , the XOR representation X for b can be obtained as follows:
b = b 0 b 1 b 2   b n 1
X = b 0 b 0 b 1 b 1 b 2 b 2 b 3 b n 2 b n 1
In Equation (1), a binary string b consists of n bits, and the position of each bit is indicated by a subscript. For instance, the first bit in binary string b is b0, the second bit is b1, and so on. A binary string b can be converted to an XOR representation X using Equation (2). Since the first bit of X is the same as b, which is shown in step 1 of Algorithm 1, the first bit of X is b0. A second bit is determined by XOR operations between b0 and b1, a third bit by XOR operations between b1 and b2, and so forth.
As pixels values for any digital image are binary strings with length n , the same process can be applied to digital images converting an image to its XOR version. Whether the image consists of single channel (e.g., grayscale image) or multiple channels (e.g., RGB image) the process can be applied to each channel separately and channels can be recombined yielding XOR image. That is for any pixel at position i , j in an image I , its value in XOR image I version of I can be expressed by:
I i , j = X O R I i , j
Given any X string its corresponding original binary string can be regenerated using XOR operation as well however it’s applied with slight differences. Since the leftmost bit in X is the same as in original b then b 0 = X 0 . The next bit b 1 is b 0 X 1 , similarly b 2 is b 1 X 2 and the same process is repeated for n 1 times. The steps for converting XOR string to original binary string are shown below:
Algorithm 2: Obtaining original binary string from its XORed version
Input: X [XOR string with length n]
Output: b [Original binary string]
1 Set n = L e n g t h X    [n value is number of bits in X ]
2Set b = X 0   [       b            [leftmost bit of b is same as X ]
3 Set   i = 0
4 w h i l e i < n 1 {
b = b + b i X i + 1
i = i + 1 }
[XOR is applied between adjacent bits and appended to b]
5Return b
As such generally for any XOR string X with length n , the original binary string b corresponding to b can be obtained as follows:
X = X 0 X 1 X 2   X n 1
b = X 0   b 0 b 0 b 0 X 1 b 0 b 1 b 1 X 2 b 0 b 1 b n 2 X n 1
Equation (4) represents XOR string X that needs to be converted back to original binary string b . X 0 is the first bit of X , X 1 is the second bit of X and so on until last n th bit which is X n 1 . Equation (5) shows how the binary string is obtained back in series of steps where the arrow indicates the next step. Initially binary string value contains X 0 which is the same as the original binary string as such the first bit becomes   b 0 . The next step shows how to obtain the second bit b 1 which is an XOR operation between   b 0 and the second bit of X . This series of steps continue until the last bit is calculated.
Now that the conversion from XOR string to binary string is shown, the process can be applied to pixels of XOR image I to obtain original image I . That is for any pixel at i , j in I the original pixel value can returned by:
I i , j = U n X O R I i , j

3.1.2. Image Scrambling with CA

After altering pixels’ values with XOR pixels substitution in first phase, the resulting image is scrambled based on 2D lattice combined from two other lattices evolved from same initial lattice using 2D-OTCA (Two Dimensional Cellular Automata) rules. OTCA are variation of CA rules introduced by [13] where a cell in a 2D lattice transit between predetermined set of states (e.g., alive or dead) based on the state of the cells in its neighborhood and the current state of that cell. OTCA rule can be reapplied to resulting lattice again to obtain new lattice and process can be repeated k times to obtain k t h generation lattice. The transition function for any pixel at coordinates i . j in lattice L in next iteration can be expressed with function v as shown next:
I t + 1 i , j = v I t i , j , i j I t i , j
where I t i , j are cells in I t i , j neighborhood.

Neighborhood Configuration

As described in (7) transition function requires states of neighboring cells for determination of state of subject cell in subsequent generation of lattice. Most common neighborhood configurations are Von Neumann and Moore neighborhood schemes [31]. In Von Neumann Neighborhood scheme (denoted as N v N ) neighboring cells are adjacent cells in four cardinal directions (Figure 1). Given a radius r neighborhood range can be extended, with that a cell at coordinate i , j neighbors a cell at coordinate i , j in Von Neumann configuration if it satisfies the following rule:
i , j   N v N i , j , r   i f   i i + j j r
Moore’s Neighborhood scheme (denoted as N M ) differs from N v N , it includes diagonally adjacent cells to subject cell as part of the neighborhood. Similarly given a radius r neighborhood range can be extended, with that a cell at coordinate i , j neighbors a cell at coordinate i , j in Moore’s configuration if it satisfies the following rule:
i , j   N M i , j , r   i f   i i r   a n d   j j r

Boundary Conditions

Cells within lattices are confined within 2D rectangle space. Determining neighboring cells for border cells is resolved with two conditions; either Closed Boundary Condition (CBC) or Periodic Boundary Condition (PBC) [32]. In CBC missing cells from neighborhood are given naught state [33]. As for PBC cells at borders are adjacent to each other; that is for instance cells at top are adjacent to bottom cells, leftmost cells are adjacent to rightmost cells and corner cells are adjacent to each other.

Conway’s Game of Life

Conway’s Game of Life (CGL) credited to John Conway, is most universally known automata [34]. CGL is an OTCA rule which determines cell’s next state based on current cell’s state and neighboring cells in N M configuration at r = 1 . As stated by [35] in CGL or any similar variation neighboring cells are cells that are directly touching subject cell. As such neighboring cells in CGL are cells that confirms to N M configuration at r = 1 of subject cell.
In CGL cells can transition between states—alive (1) or dead (0)—in subsequent evolutions. Transition of cell state between alive or dead is determined from the following rules:
  • For a cell at coordinates i , j such that I t i , j = 0 if i , j I t i , j = 3 for i , j   N M i , j , r then I t + 1 i , j = 1 otherwise I t + 1 i , j = 0
  • For a cell at coordinates i , j such that I t i , j = 1 if 2 i , j I t i , j 3 for i , j   N M i , j , r then I t + 1 i , j = 1 otherwise I t + 1 i , j = 0
Figure 2 shows an example of lattice evolved with CGL rules. Alive cells are illustrated in white and dead cells are in black. The boundary condition in the illustration is set as PBC and neighborhood scheme is Moore’s scheme.

Scrambling Algorithm

Image scrambling process starts by generating lattices required for shuffling image pixels into new positions. Initially a lattice with random cells’ states and dimensions equal to original image dimensions is generated. Next the lattice is evolved with (7) such that neighborhood is N M , boundary condition is PBC and CGL defines new state of subject cell on next evolution. That is transition function becomes:
I t + 1 i , j = v C G L I t i , j , i j I t i , j   |   I t i , j     N M i , j , r P B C
Lattice is evolved to k th generation, then k th generation lattice is combined with one of previous generation which is named n th generation. This new combined lattice is scrambling lattice that is used to scramble image pixels. The steps for scrambling algorithm are elaborated in Algorithm 3 and an abstractive illustration of the proposed scheme in on Figure 3.
Algorithm 3: Encryption algorithm
Input: I [Original image]
Output: E [Image after scrambling]
1Convert pixels in I to its corresponding XOR string equivalent in I . That is value of pixel at coordinates i , j in I is obtained by I i , j = X O R I i , j
2 Generate random lattice L 0 with exactly the same width and height as I . Values of lattice pixels can either be 1 (alive) or 0 (dead).
3 Apply CGL OTCA transition function υ C G L   on on L 0 with N M and PBC for k generations yielding L k .
4Combine L k and L n   ( 0 < n < k ) on an initially empty lattice R such that R i , e v e n j = L k i , j and R i , o d d j = L n i , j .
5 Transform I into a stack such that elements in stack from top to bottom are values of pixels in I in row major order.
6 Scramble I such that: search R   in column major order and if R i , j = 1 pop an element from top of s t a c k ( I ) into initially empty scrambled image E at same coordinates i , j . After search is complete search R again in row major order this time and if R i , j = 0 pop an element from top of s t a c k ( I ) into scrambled image E at same coordinates i , j .
Now that Algorithm 3 is elaborated encryption key used to obtain encrypted version of original image can be expressed. The encryption key consists of five main elements:
  • Randomly generated lattice L 0 . This lattice is created with same width and height of image that require encryption. Pixels in L 0 can assume two states only either alive (white) or dead (black).
  • The CA rule used to evolve   L 0 . In proposed image encryption scheme the CA rule used is CGL rule however, different rules can be utilized to evolve L 0 to desired number of generations. Neighborhood structure can be changed as well for example using N v N or extending radius of neighborhood. In this work the neighborhood structure is N M with radius 1 due to requirements of CGL.
  • Boundary condition used to handle cells at borders for   L 0 or any subsequent evolved lattices. In proposed technique PBC was selected however, CBC can be selected as well.
  • The number of generations n selected to evolve L 0 to obtain L n . The value of n is bounded to be more than 0 and less than another value k i.e., that 0 < n < k .
  • The number of generations k selected to evolve L 0 to obtain L k . Now that since 0 < n < k then L k is rather obtained by evolving L n for ( k n ) times.
In order to show that encryption keys are robust, their ability to resist brute force attacks must be analyzed. When using brute force attack to decrypt an encrypted image, it is necessary to recreate the randomly generated lattice L 0 to precisely match the initial cell states, since slight differences in initial states would influence neighboring cells’ states in subsequent evolutions L 1 , and those neighboring cells will influence the evolution of their own neighboring cells, and the effect continues with each evolution. Also recreation of L 0 to exact initial cells states becomes more difficult with increasing size of L 0 as more initial cells states are accounted for. Initial states of cells are one of two—either alive or dead—and number of cells is determined from size of lattice w i d t h L 0 × h e i g h t L 0 then brute forcing L 0 recreation could require 2 s i z e L 0 recreation tries. The number of generations n and k are selected to evolve L 0 to L n and L k then the resulting evolutions are combined into scrambling lattice R . To break encryption key with brute force attack given that L 0 is available, L 0 is evolved k times then its combined with each L n where 0 < n < k . The process continue until the correct value of k is encountered and right combination with L n is found to produce R . Given that repetitions of L n and L k combinations are eliminated during the search for k then number of actual unique combinations tried equals size of unique pairs of n and k set at correct value of k . The size of such set (denoted as u ) is k k 1 / 2 . Then for an attacker to break encryption key with brute force attack the descrambling algorithm needs to run up to u × 2 s i z e L 0 times.
The encryption algorithm utilizes CGL with N M at radius 1 and PBC for evolving   L 0 . However, those configurations can be changed and their inclusion in main components of encryption key indicates the possibility. There are many rules for OTCA and rules classified as Class 3 and 4 generate different and complex patterns in each evolution [31]. Also neighborhood structure can be extended or changed and with different structures comes different patterns in next evolutions. Boundary condition selection as PBC or CBC affect generated patterns in subsequent generations of initial lattice L 0 as well. If such configurations are allowed to be changed then breaking encryption key with brute force attack would require significantly more than u × 2 s i z e L 0 times. Since the encryption algorithm is demonstrated with CGL, N M at radius 1 and PBC then in this regard the key space is u × 2 s i z e L 0 .
With five elements composing the encryption key are explained, then generation of encrypted image E can be expressed as function e in Equation (11) that takes XOR image I and key configurations required for encryption as its parameters.
E = e I , L 0 , v C G L , P B C , k , n

Descrambling Process

Descrambling requires regeneration of scrambling lattice R . Given scrambling key, R is recreated which is then used to reorder shuffled pixel positions of R back to I . Then XORed pixels values can be ‘UnXORed’ to retrieve original pixels’ values. Steps for descrambling E are shown in Algorithm 4:
Algorithm 4: Descrambling algorithm
Input: E Scrambled image
Output: I
1Generate R from provided keys where R = f L k , L n .
2Search R in column major order if R i , j = 1 then E i , j is added to s t a c k E .
3Search R in row major order if R i , j = 0 then E i , j is added to s t a c k E .
4 Reverse s t a c k E then pop elements from stack in an initially empty lattice generating I .
Descrambling can also be expressed as a function d in Equation (12), where E is the parameter, and encryption key configurations are the input parameters. To retrieve original pixel values, the UnXOR function detailed in Algorithm 2 is used to process the output of function d .
I = d E , L 0 , v C G L , P B C , k , n

3.2. LDA Algorithm

Linear Discriminant Analysis (LDA) proposed by R. Fisher is one of fundamental data analysis methods [36]. LDA is deployed for features extraction and dimensionality reduction [37] in applications such as face recognition [38], retrieval of images [39], and microarray classification of data [40].
LDA is largely adopted for problems than involves dimensionality reduction [41]. LDA is a suitable machine learning algorithm for reducing dimensionality in classification problems that involve more than two classes. LDA is efficient for multi-class classification as it can be used for data pre-computation to reduce the number of features, thereby reducing computational costs. LDA is preferred over other approaches. In LDA, the variance of projections within a class has the lowest variance, and the variance of projections outside the class has the highest variance. In PCA, all data are treated equally, resulting in very representative projected data, but it may sometimes obfuscate discrimination between classes.
Here LDA is used for features extraction of encrypted face images. Extracted features are compared with features database to classify input encrypted face images into appropriate classes. Input face image is encrypted with the same key used for encryption of features database. The steps of LDA implementation in context of proposed pipeline are shown below:
1.
Preprocessing faces image dataset with face detection and alignment. Encrypt dataset and scale it then split dataset into training set and testing set.
2.
Convert 2D encrypted face images training dataset into 1D vectors F 1 1 , F 2 1 , , F n c , where n is n th image of class c . Each face image 1D vector is image’s w i d t h × h e i g h t long.
3.
Find mean vector for each class k by u k = F 1 c + F 2 c + + F n c n . Then the set of all mean vectors is u 1 , u 2 , , u k , . The length of this set is equal to number of classes.
4.
Calculate overall mean vector for all classes u = u 1 + u 2 + + u n n .
5.
Find between class scatter matrix S b = k = 1 c n k u k u u k u T where n k is number of samples per class and c is number of classes.
6.
Determine within class scatter matrix S w = k = 1 c F i c F i c u k F i c u k T .
7.
Obtain linear discriminants by solving for Eigen values and vectors for matrix S w 1 S b with single value decomposition.

3.3. Encrypted Face Recognition with LDA

After presentation of image encryption process and LDA algorithm a complete pipeline for the proposed encrypted face recognition can be illustrated as shown in Figure 4. The process starts by preprocessing face images into correct alignment and size. However, this step is not mandatory for datasets with prepared alignment and face detection such as ORL dataset. Next entire face images database is encrypted with single key and divided into training set and testing set. Training set features are extracted with LDA and stored in features database then they are used for classification of test set of encrypted face images with random forest classifier.
Random forest classifier, introduced in 2001 by Leo Breiman [42] consists of independent set of decision trees that collectively classify input data based on majority votes [43]. In random forest classification random samples are selected from training set and an independent decision tree is generated for each sample. Each decision tree outputs its prediction and based on majority votes for predications a classification output is given.

4. Results and Discussion

Experimentations on XOR-OTCA CGL image encryption method and recognition of encrypted face images with LDA were conducted on standard laptop with 8 GB RAM, Intel(R) Core(TM) i5-3230M CPU @ 2.60 GHz and Microsoft Windows 10 Home 64 bits using Python3. Firstly, the robustness of image encryption scheme is measured using differential analysis with NPCR (Number of Pixels Change Rate) and statistical analysis with histogram, correlation and key sensitivity. GDD (Gray Difference Degree) is also measured for comparison with other proposed methods in literature.
After demonstration of robustness of image encryption scheme, ORL face dataset is utilized for measurement of LDA with random forest classifier accuracy in classification of encrypted face image. Since ORL dataset is preprocessed with face detection and alignment, the entire dataset is directly encrypted with same key and inserted into pipeline of encrypted face recognition with LDA post preprocessing stage.

4.1. Analysis of Image Encryption Scheme

4.1.1. Illustration of Gray Code OTCA CGL Encryption and Decryption on Sample Image

In this subsection, a sample grayscale image is encrypted using arbitrary selected key configurations to demonstrate the processes applied by the proposed scheme to generate the encrypted image. Figure 5 and Figure 6 show encryption and decryption process implemented on sample image. As shown in Figure 5 sample image is firstly processed with XOR pixels substitution converting it to its XORed version. Initial scrambling lattice with dimension identical to sample image is generated with random cells states and evolved with CGL rules to nth and kth generation. Then R is generated as described in encryption algorithm and used for scrambling XORed sample image. In decryption process illustrated on Figure 6 the encryption key is used for descrambling encrypted image yielding XORed sample image and finally XORed sample image is UnXORed to obtain original sample image.

4.1.2. Differential Analysis

Number of Pixels Change Rate

Number of Pixels Change Rate (NPCR) measures image encryption technique resistance to differential attacks [32]. The closer percentage of NPRC of encrypted images to 100% the more robust the encryption technique is. Given original image and encrypted version of image NPCR can be determined as follows:
N P C R I , E = i = 0 w i d t h I 1 j = 0 h e i g h t I 1 x i , j r e s o l u t i o n I i f   I i , j = E i , j   x i , j = 0 i f   I i , j E i , j   x i , j = 1
NPCR was computed for selected group images by comparing original images and their encrypted versions. The same key configurations were used for encrypting images; that is the same initial lattice L 0 was evolved for n th and k th generation with CGL and R was created by combining L n and L k . Table 1 shows that NPCR for encrypted group of images was more than 99% in all cases which shows the robustness of the technique.
To demonstrate the proposed method effectiveness in producing large NPCR values, the experiment was repeated on entire Yale dataset. Yale dataset consists of 15 subjects with 11 images per subject, totaling 165 images. Obtained values for NPCR were all above 99%, Table 2 shows some of NPCR results obtained for different subject’s images. Appendix A, Table A1, contains the full results.

Universal Average Changing Intensity

Universal Average Change Intensity (UACI) is utilized here to find average intensity difference between original image and its encrypted version. Ideal value of UACI is 33% [44] and it’s determined here with:
U A C I = i = 0 w i d t h I 1 j = 0 h e i g h t I 1 I i , j E I i , j 255 × r e s o l u t i o n I × 100
Similar to NPCR, UACI was computed for the same group of images using original images and same encrypted images used in NPCR test. Table 1 shows obtained UACI for encrypted group of images. UACI values for most images were around 33% whereas Airplane and Gold hill were notably lower. Again the UACI test was conducted for Yale faces dataset showing the results obtained in Table 2 and full results can be found on Table A1.

4.1.3. Statistical Analysis

Histogram

Histogram illustrates how pixels of different intensities are distributed in an image. Due to altering pixels’ intensities in scrambled image, histogram of scrambled image is different than original image. This is reducing the possibility of identifying a specific encrypted image in set of encrypted images by matching histogram of original image to images stored in database, given that database of encrypted images become available to the attacker. Figure 7 shows histogram of Mandrill image and encrypted Mandrill image. More histograms can be found in Figure A1.

Correlation

Correlation indicates similarity between original image and its scrambled version. Correlation value varies between −1 to 1 inclusive. Having correlation index closer to 1 indicates that there is strong positive correlation between datasets and opposite (closer to −1) shows there is strong negative correlation. At 0 correlation, dissimilarity between images is highest as 0 indicates no correlation at all. As such the closer the correlation value to 0 is the more dissimilar the original image and its scrambled version are. Using Karl Person’s correlation formula correlation between several images and their scrambled versions is calculated.
r = x y x 2   y 2
On proposed method same value of k and n were used to encrypt images for testing, however initial L 0 lattice was different for each tested image. That is E i m = e I i m , L 0 i m , v C G L , P B C , 12 , 6 . Results on Table 3 show that there is approximately no correlation between test images and their scrambled versions for cases of entire image or subsections taken horizontally, vertically or diagonally.

Key Space and Sensitivity Analysis

To test effectiveness of image encryption key space must be large enough to withstand brute force attacks [21]. For proposed algorithm the key is composed of initial L 0 lattice of size   w i d t h × h e i g h t , number of generations k and value n such that   0 < n < k . Since n is selected randomly based on k, and pixels on initial L 0 lattice can assume one of two states (alive or dead) then key space is   u × 2 r e s L 0 , where   u = k k 1 / 2 is the size of unique pairs of k and n set.
For instance if an image of size 256 pixels width and height requires encryption and value of k was selected to be 6 then key space in this case is 15 × 2 65536 . This key space is exceptionally wide and with larger images and k values (which in turn increases the size of   u ) the key space increases exponentially. For small images greater value of k can be selected to widen key space.
To test sensitivity of key, encrypted Mandrill image on Figure 3 is decrypted using L k and L n only. Then keys with different values of k and n are tested to decrypt the image. Results on Figure 8 show that decrypting image is only possible with correct key. Given that L 0 is available decrypting image with L k or L n only yields no useful information and same can be concluded for different values of k and n.

Information Entropy

Information entropy measures the average information conveyed by image pixels [13]. For encrypted images in ideal cases pixels have uniform distribution with equal probability of occurrence [45]. Entropy is determined with
H S = s P s i × log 2 P s i
Since experimentation is carried out on grayscale images with 8 bits’ depth (single channel) then maximum and ideal entropy value is 8. As such the greater the information entropy of ciphered image the more secure it is. Table 4 shows information entropy values for same encrypted images utilized in correlation test.

Gray Difference Degree

GDD measures how well scrambled original image is after applying scrambling techniques. GDD metric was introduced by [19] and determining its value involves several steps. The first step is finding Gray difference G D for each pixel in both original image and scrambled/encrypted image. G D is found for all input image pixels except for pixels at edges. Also calculating G D requires neighboring pixels for subject cell in N v N neighborhood structure at radius 1. Determining G D is done by Equation (17).
G D i , j = 1 4 i , j P i , j P i , j 2
where i , j is not a coordinates at edge of input image and i , j   N v N i , j , 1   i f   i i + j j 1 .
Next step is find Average G D for original image A v g G D i , j and scrambled/encrypted image   A v g E G D E i , j . Using the G D values obtained from Equation (17) enables calculating the value of Equations (18) and (19). Note that both equations are essentially the same however, the difference is on the context in which both equations values are found.
A v g G D i , j = i = 1 w i d e t h I 2 j = 1 h e i g h t I 2 G D i , j w i d t h I 2 × h e i g h t I 2
A v g E G D E i , j = i = 1 w i d e t h I 2 j = 1 h e i g h t I 2 G D E i , j w i d t h E 2 × h e i g h t E 2
where I is the original image and E is encrypted image.
Now that Average G D is obtained for both original image and scrambled/encrypted image. The value of Gray Difference Degree G D D can be determined. Using Equation (20) G D D can be determined between original image and scrambled/encrypted image.
G D D =   A v g E G D E i , j A v g G D i , j   A v g E G D E i , j + A v g G D i , j
GDD values were computed for same set of encrypted image used to find correlations, that is E i m = e I i m , L 0 i m , v C G L , P B C , 12 , 6 . GDD values in Table 4 demonstrate the technique ability to well scramble images.

4.1.4. Comparisons

In this section a comparison is performed between the proposed XOR-CGL image encryption scheme and other methods on the literature using the differential and statistical metrics. Table 5 shows NPCR, UACI and information entropy comparison between the proposed scheme and other methods on literature and Table 6 compares correlation. Comparisons indicate that NPCR values were high and UACI were close to ideal 33%. Information entropy varied and improvement is on order. As for correlation the scheme produced required week correlation across different tested orientations.
GDD metric was used to indicate the robustness and effectiveness of various image scrambling techniques in related literature. With that GDD metric can be utilized for comparing the proposed technique with other scrambling algorithms given that same test images are used. Table 7 shows a comparison between GDD of proposed scheme and other CA based scrambling techniques. Note some of test images were replaced to provide a GDD comparison across more images as compared scrambling algorithms were evaluated with different images by their authors. The results show that the proposed algorithm had better GDD on most of test images.

4.2. Encrypted Faces Recognition with LDA Classification

Based on the results of the previous subsection, it is clear that the encryption technique is effective, entire ORL dataset is encrypted with single key E i m = e I i m , L 0 , v C G L , P B C , 15 , 9 . Figure 9 shows samples of encrypted subjects’ images. In recognition pipeline 80% of encrypted subject’s images are reserved for training the model. Remaining 20% is used for testing.
Following encryption of ORL dataset, entire dataset is scaled with standard scaling for elimination of any potential bias in data. Next after splitting of dataset, training set is processed with LDA for extraction of features required for classification of test data. Note that in ORL dataset there are 40 subjects and each subject has 10 samples, 8 of which are used for training and 2 for testing resulting in 320 training sample and 80 testing samples.
Applying random forest classifier, the model was able to achieve 96.25% accuracy. Metrics evaluated are precision, recall, F1-score and accuracy. Those metrics defined by [53] are detailed in Table 8. True positive, true negative, false positive and false negative are given symbols t p ,   t n ,   f p and f n respectively.
Other metrics in Table 9 are support, macro average and weighted average. Since support value is the same for all classes as 2 test sample are provided per class the values for macro average and weighted average are the same as arithmetic mean and would have no effect in computing corresponding metrics in classification report.
To prove the proposed scheme capability of withstanding spoofing attacks, the same classification test was run again however this time testing test was replaced with original test images i.e., before encryption. This simulates the situation in which an attacker was able to obtain an authenticated person’s face image only and didn’t encrypt the face image. In this case classification accuracy of the system was low at 8.75% only. The low classification accuracy indicates that the system is not able to classify unencrypted features and authenticity can only be gained with correctly classified images. Evaluation metrics results for original test image against encrypted features database are highlighted with orange on Table 9.

5. Discussion

Using a model trained to recognize encrypted face images with high accuracy, this paper proposes a solution to spoofing’s vulnerability in facial image recognition systems. The implementation of such a model requires developing an image encryption algorithm for encrypting face images used for training the recognition model. This image encryption scheme is based on XOR pixel substitutions and CA pixel scrambling.
To evaluate the encryption performance of the image encryption algorithm, it is necessary to analyze the encrypted images encoded with the encryption scheme. Statistical analysis and differential analysis were used in the analysis. Based on the differential analysis with NPCR test, the image encryption scheme produced a high percentage of pixels’ difference between the original image and the encrypted image. A NPCR of 99% or higher was achieved in all test images. UACI was used to perform another differential analysis. On test images, the results on UACI fluctuated between 33 % and 15% within the ideal range. A statistical analysis of the data was conducted using the following five tests: histogram, correlation, key analysis, information entropy, and GDD. XOR operation on pixels’ values changed the histogram in encrypted images, so histogram matching could not identify encrypted images. A very weak correlation was observed between the original and encrypted images for the entire image, as well as in the vertical, horizontal, and diagonal directions, due to a very low similarity between the original and encrypted images. Key analysis in done by firstly determining key space for encryption algorithm which is u × 2 s i z e L 0 where u is size of the set of unique paris of k and n values; then testing sensitivity of algorithm by decrypting an encrypted image with slightly different key. This method had excellent key sensitivity, since no visual information could be extracted when decrypting the same image with slightly different keys. For encrypted grayscale images, the information entropy produced different values. Some were extremely close to 8, while others were lower. Based on GDD values, the proposed image encryption scheme produced exceptional results exceeding those obtained from other methods described in related literature.
The following observations were made about the robustness and limitations of the proposed image encryption scheme:
  • Image encryption algorithms produce very different images when they change the values of pixels in encrypted images. A very weak correlation was observed in all cases, and NPCR values exceeded 99% in every case.
  • In this method, the key space is very large, and it grows as the size of the image to be encrypted and the number of evolutions selected for configuring the encryption key increases.
  • According to the proposed scheme, GDD values were exceeding those found in some related literature on image encryption methods based on CAs for the same images.
  • A scheme for encrypting images changed the histogram to resist histogram matching attacks, but changing the pixel values with XOR is not sufficiently secure, as an XORed image would have a similar histogram to an encrypted image, hence a more robust scheme to substitute pixels must be incorporated into the algorithm.
  • Both UACI and information entropy values can be considered acceptable, but either one can be enhanced with a better pixel’s substitution scheme.
By analyzing image encryption algorithms, the algorithm is implemented into the face recognition model pipeline by encrypting the face images used to train the LDA-based model. Several experiments were performed on the model using the ORL dataset. The model’s accuracy and spoof-resistance were tested in two main experiments. For the first experiment, the entire ORL dataset was encrypted with the same key, then it was split into 80% for training and 20% for testing. In classifying encrypted face images, the system achieved 96.25% accuracy using a random forest classifier. A second experiment used the same encrypted training set but used original images for testing the model. Only 8.75% of the results were accurate in the second experiment. Since both input face images must be encrypted with the same key for a highly accurate recognition rate to be achieved, the LDA-based recognition system is highly resilient to spoofing attacks.
In information systems containing secret or sensitive information, such a system can be used to authenticate users. Authentication can then be obtained once the user adds the required encryption key configurations as well as capturing the user’s face. Whenever a system user face identity is revealed by spoofing, the attacker needs to have the correct encryption key configuration otherwise authenticating the system is very difficult. Table 10 shows sensitivity of the model when the testing set was encrypted with slightly different key   E i m = e I i m , L 0 , v C G L , P B C , 14 , 9 from the one used in encrypted testing set in Table 9, i.e., first experiment. Here the accuracy decreased significantly to 66.25%.
As in the case of the image encryption scheme, the following points concerning the effectiveness and limitations of LDA based encrypted faces recognition model were observed:
  • The proposed LDA based encrypted faces recognition model produced high accuracy in classification of encrypted faces images with the same encryption key reaching an accuracy of 96.25%.
  • The model is highly sensitive to encrypted face images with slightly different key. The model accuracy dropped to 66.25% when it was tested with testing set encrypted with a slightly different key.
  • The model is able to effectively resist spoofing attacks. Testing model with original images testing set showed that the model achieved 8.75% accuracy only.
  • The model security is limited with robustness of image encryption scheme used. The weakness of the image encryption scheme introduces vulnerabilities to encrypted faces recognition model.
  • The image encryption scheme needs to be robust enough to provide effective encryption performance however; the image encryption scheme must retain enough features in resulting encrypted images in order for the model to distinguish between different classes.

6. Conclusions

In conclusion, biometric based recognition systems including face recognition are vulnerable to spoofing attacks in which an attacker could assume the identity of authenticated individual by obtaining an artificial copy of that individual’s biometric. The solution proposed in this paper is integration of image encryption scheme into face recognition pipeline. This addition in recognition pipeline requires the attacker to submit an encrypted copy of same individual face image with correct key used for encryption of features database in order to gain false authentication.
Experimentation was performed for XOR-OTCA CGL image encryption scheme firstly to prove its robustness. Differential and statistical analysis showed that all testing images had more than 99% NPCR, correlation at almost 0, and high values for GDD metric. Key space was u × 2 r e s L 0 and key is sensitive to slight changes as no useful information can be extracted from images decrypted with slightly different keys. After proving the robustness of image encryption scheme, experimentations were performed on LDA based face recognition scheme with integrated image encryption scheme. Testing showed that the proposed pipeline had an accuracy of 96.25% in classifying encrypted test face images from encrypted features database on ORL dataset. The same test was conducted with ORL original test face images against encrypted features database; this time the accuracy was low at 8.75% which proves the proposed scheme capability to withstand spoofing attacks.

Author Contributions

Conceptualization, E.A. and B.I.; Methodology, E.A. and B.I.; Software, B.I.; Validation, K.Z.; Formal analysis, E.A. and B.I.; Investigation, E.A. and B.I.; Resources, E.A., B.I. and K.Z.; Data curation, E.A. and B.I.; Writing—original draft, E.A. and B.I.; Writing—review & editing, E.A., B.I., K.Z. and M.R.; Visualization, B.I., K.Z. and M.R.; Supervision, E.A.; Project administration, E.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are publicly available through the University of Waterloo’s image repository [Repository (uwaterloo.ca)], and University of South California SIPI Institute miscellaneous volume, [SIPI Image Database—Misc (usc.edu)]. ORL dataset was obtained from Kaggle [AT&T Database of Faces|Kaggle].

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

Table A1. Recorded NPCR and UACI values on Yale dataset.
Table A1. Recorded NPCR and UACI values on Yale dataset.
Subject 1
NPCR%99.72399.67999.70299.29899.70899.69499.56199.68999.73499.72799.7
UACI%38.12937.68238.22230.64238.45438.07321.89138.19837.92838.26637.867
Subject 2
NPCR%99.73499.76299.69699.62399.72799.72799.66899.75299.71699.73999.752
UACI%40.96238.87538.90235.88739.50139.50133.46239.08139.49338.40339.184
Subject 3
NPCR%99.76399.76999.79299.34499.81799.81799.43899.7999.78199.80899.784
UACI%42.67444.39143.90136.38943.61343.61326.95143.5543.62843.40343.495
Subject 4
NPCR%99.73799.77999.76599.60399.7499.74799.36199.74799.78599.7599.764
UACI%41.59140.89541.16334.74541.25141.09724.8941.09740.95540.94741.289
Subject 5
NPCR%99.6599.73899.73999.54299.77199.7699.55299.76799.74799.80199.796
UACI%36.54938.37838.48531.21838.22938.31122.70138.32938.18138.6938.43
Subject 6
NPCR%99.69399.77699.70999.60899.75499.75499.76799.72299.77699.75899.759
UACI%41.64539.22138.1832.14638.2638.2643.91538.66638.85539.13438.865
Subject 7
NPCR%99.74899.77699.76999.23599.77799.77799.43999.78199.75599.75699.8
UACI%42.27344.1944.25435.76743.83143.83133.18144.63644.00444.20844.247
Subject 8
NPCR%99.75799.83299.8299.40599.79399.83299.61999.80899.81199.81399.794
UACI%42.00143.32541.58533.34542.07843.32534.07140.54741.72841.70841.193
Subject 9
NPCR%99.74299.80399.76999.59599.76899.76899.64199.80599.78599.80899.803
UACI%41.49841.47841.77634.99341.72841.72835.22742.40641.95341.87741.737
Subject 10
NPCR%99.7299.78799.80499.55399.7699.77999.42699.7659.76499.75799.747
UACI%42.12143.65343.96934.98643.57843.73139.44743.72443.84442.94643.403
Subject 11
NPCR%99.63499.70699.73299.73399.75799.74299.42199.65799.73199.70699.706
UACI%42.71442.27842.76537.83242.80842.65739.96941.07942.56242.7642.389
Subject 12
NPCR%99.68799.71899.64599.61599.72999.72999.7499.66799.65299.68699.655
UACI%37.65337.5536.40434.90138.36338.36340.07936.02835.31136.10936.036
Subject 13
NPCR%99.83799.82499.81999.68499.83799.80199.56499.82999.8499.8599.841
UACI%45.05344.11144.26238.29944.31644.21334.99644.25244.29743.95444.47
Subject 14
NPCR%99.71999.8199.77999.70299.77999.77999.72199.78499.79499.77799.8
UACI%42.37343.28643.57433.40443.19843.19836.77243.77943.19243.55643.274
Subject 15
NPCR%99.76199.74599.79399.21899.899.77799.699.78999.77999.77499.784
UACI%41.00541.25243.09633.542.05243.06632.02142.63341.85542.05342.644
Figure A1. Histograms of multiple test images. On the left are original images histograms and on the right are encrypted images histograms.
Figure A1. Histograms of multiple test images. On the left are original images histograms and on the right are encrypted images histograms.
Electronics 12 00774 g0a1

References

  1. Li, L.; Mu, X.; Li, S.; Peng, H. A Review of Face Recognition Technology. IEEE Access 2020, 8, 139110–139120. [Google Scholar] [CrossRef]
  2. Ding, C.; Tao, D. Pose-invariant face recognition with homography-based normalization. Pattern Recognit. 2017, 66, 144–152. [Google Scholar] [CrossRef]
  3. Guo, G.; Zhang, N. A survey on deep learning based face recognition. Comput. Vis. Image Underst. 2019, 189, 102805. [Google Scholar] [CrossRef]
  4. Wang, X.; Yan, Z.; Zhang, R.; Zhang, P. Attacks and defenses in user authentication systems: A survey. J. Netw. Comput. Appl. 2021, 188, 103080. [Google Scholar] [CrossRef]
  5. Zhou, B.; Xie, Z.; Ye, F. Multi-modal face authentication using deep visual and acoustic features. In Proceedings of the IEEE International Conference on Communications (ICC), Shanghai, China, 20—24 May 2019; pp. 1–6. [Google Scholar]
  6. Oloyede, M.O.; Adedoyin, A.O.; Adewole, K.S. Fingerprint Biometric Authentication for Enhancing Staff Attendance System. Int. J. Appl. Inf. Syst. 2013, 5, 19–24. [Google Scholar] [CrossRef]
  7. Kisku, D.R.; Datta Rakshit, R. Face Spoofing and Counter-Spoofing: A Survey of State-of-the-art Algorithms. Trans. Eng. Comput. Sci. 2017, 5, 31. [Google Scholar]
  8. Adler, A.; Schuckers, S.A.C. Biometric Vulnerabilities, Overview. In Encyclopedia of Biometrics; Li, S.Z., Jain, A.K., Eds.; Springer: Boston, MA, USA, 2009. [Google Scholar] [CrossRef]
  9. Nagarsheth, P.; Khoury, E.; Patil, K.; Garland, M. Replay Attack Detection Using DNN for Channel Discrimination. In Proceedings of the Interspeech, Stockholm, Sweden, 20—24 August 2017. [Google Scholar] [CrossRef]
  10. Witkowski, M.; Kacprzak, S.; Żelasko, P.; Kowalczyk, K.; Gałka, J. Audio Replay Attack Detection Using High-Frequency Features. In Proceedings of the Interspeech, Stockholm, Sweden, 20—24 August 2017. [Google Scholar] [CrossRef]
  11. Steinhardt, J.; Koh, P.W.; Liang, P.S. Certified defenses for data poisoning attacks. Adv. Neural Inf. Process. Syst. 2017, 30, 1–15. [Google Scholar]
  12. Yosefnezhad Irani, B.; Ayubi, P.; Amani Jabalkandi, F.; Yousefi Valandar, M.; Jafari Barani, M. Digital image scrambling based on a new one-dimensional coupled Sine map. Nonlinear Dyn. 2019, 97, 2693–2721. [Google Scholar] [CrossRef]
  13. Kumari, M.; Gupta, S.; Sardana, P. A Survey of Image Encryption Algorithms. 3D Res. 2017, 8, 37. [Google Scholar] [CrossRef]
  14. Packard, N.H.; Wolfram, S. Two-dimensional cellular automata. J. Stat. Phys. 1985, 38, 901–946. [Google Scholar] [CrossRef]
  15. Abu Dalhoum, A.L.; Mahafzah, B.A.; Awwad, A.A.; Aldhamari, I.; Ortega, A.; Alfonseca, M. Digital image scrambling using 2D cellular automata. IEEE Multimed. 2012, 19.4, 28–36. [Google Scholar] [CrossRef]
  16. Kaur, M.; Kumar, V. A Comprehensive Review on Image Encryption Techniques. Arch. Comput. Methods Eng. 2018, 27, 15–43. [Google Scholar] [CrossRef]
  17. Nanda, S.K.; Mohanty, S.; Pattnaik, P.K.; Sain, M. Throughput Optimized Reversible Cellular Automata Based Security Algorithm. Electronics 2022, 11, 3190. [Google Scholar] [CrossRef]
  18. Corona-Bermúdez, E.; Chimal-Eguía, J.C.; Téllez-Castillo, G. Cryptographic Services Based on Elementary and Chaotic Cellular Automata. Electronics 2022, 11, 613. [Google Scholar] [CrossRef]
  19. Ye, R.; Li, H. A novel image scrambling and watermarking scheme based on cellular automata. In Proceedings of the 2008 International Symposium on Electronic Commerce and Security, Washington, DC, USA, 3–5 August 2008. [Google Scholar]
  20. Jeelani, Z.; Qadir, F. Cellular automata-based approach for digital image scrambling. Int. J. Intell. Comput. Cybern. 2018, 11, 353–370. [Google Scholar] [CrossRef]
  21. Qadir, F.; Peer, M.A.; Khan, K.A. Digital Image Scrambling Based on Two Dimensional Cellular Automata. Int. J. Comput. Netw. Inf. Secur. 2012, 5, 36–41. [Google Scholar] [CrossRef]
  22. Jeelani, Z. Digital image encryption based on chaotic cellular automata. Int. J. Comput. Vis. Image Process. 2020, 10, 29–42. [Google Scholar] [CrossRef]
  23. Ping, P.; Xu, F.; Babu, M.S.; Lv, X.; Mao, Y. Image scrambling scheme based on bit-level permutation and 2-D cellular automata. In Proceedings of the 2015 International Conference on Intelligent Information Hiding and Multimedia Signal Processing (IIH-MSP), Adelaide, Australia, 23–25 September 2015. [Google Scholar]
  24. Abu Dalhoum, A.L.; Madain, A.; Hiary, H. Digital image scrambling based on elementary cellular automata. Multimed. Tools Appl. 2016, 75, 17019–17034. [Google Scholar] [CrossRef]
  25. Li, Z.; Lin, D.; Tang, X. Nonparametric discriminant analysis for face recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2009, 31, 755–761. [Google Scholar]
  26. Ren, C.-X.; Lei, Z.; Dai, D.-Q.; Li, S.Z. Enhanced Local Gradient Order Features and Discriminant Analysis for Face Recognition. IEEE Trans. Cybern. 2015, 46, 2656–2669. [Google Scholar] [CrossRef]
  27. Dornaika, F.; Bosaghzadeh, A. Exponential Local Discriminant Embedding and Its Application to Face Recognition. IEEE Trans. Cybern. 2013, 43, 921–934. [Google Scholar] [CrossRef] [PubMed]
  28. Wang, G.; Shi, N.; Shu, Y.; Liu, D. Embedded Manifold-Based Kernel Fisher Discriminant Analysis for Face Recognition. Neural Process. Lett. 2014, 43, 1–16. [Google Scholar] [CrossRef]
  29. Jiang, R.; Al-Maadeed, S.; Bouridane, A.; Crookes, D.; Celebi, M.E. Face Recognition in the Scrambled Domain via Salience-Aware Ensembles of Many Kernels. IEEE Trans. Inf. Forensics Secur. 2016, 11, 1807–1817. [Google Scholar] [CrossRef]
  30. Feng, Y.C.; Yuen, P.C. Binary Discriminant Analysis for Generating Binary Face Template. IEEE Trans. Inf. Forensics Secur. 2011, 7, 613–624. [Google Scholar] [CrossRef]
  31. Wolfram, S. Theory and Applications of Cellular Automata; World Scientific: Singapore, 1986. [Google Scholar]
  32. Jeelani, Z.; Qadir, F. A comparative study of cellular automata-based digital image scrambling techniques. Evol. Syst. 2020, 12, 359–375. [Google Scholar] [CrossRef]
  33. Torbey, S. Towards a framework for intuitive programming of cellular automata. Parallel Process. Lett. 2009, 19, 73–83. [Google Scholar] [CrossRef]
  34. Conway, J. The game of life. Sci. Am. 1970, 223, 4. [Google Scholar]
  35. Bays, C. Introduction to Cellular Automata and Conway’s Game of Life. In Game of Life Cellular Automata; Springer: London, UK, 2010; pp. 1–7. [Google Scholar]
  36. Xanthopoulos, P.; Pardalos, P.M.; Trafalis, T.B. Linear discriminant analysis. In Robust Data Mining; Springer: New York, NY, USA, 2013; pp. 27–33. [Google Scholar]
  37. Ye, J.; Janardan, R.; Li, Q. Two-dimensional linear discriminant analysis. In Advances in Neural Information Processing Systems 17; MIT Press: Cambridge, MA, USA, 2004; Volume 30, pp. 13–18. [Google Scholar]
  38. Belhumeur, P.; Hespanha, J.; Kriegman, D. Eigenfaces vs. Fisherfaces: Recognition using class specific linear projection. IEEE Trans. Pattern Anal. Mach. Intell. 1997, 19, 711–720. [Google Scholar] [CrossRef]
  39. Swets, D.L.; Weng, J.J. Using discriminant eigenfeatures for image retrieval. IEEE Trans. Pattern Anal. Mach. Intell. 1996, 18, 831–836. [Google Scholar] [CrossRef]
  40. Dudoit, S.; Fridlyand, J.; Speed, T.P. Comparison of Discrimination Methods for the Classification of Tumors Using Gene Expression Data. J. Am. Stat. Assoc. 2002, 97, 77–87. [Google Scholar] [CrossRef]
  41. Fabiyi, S.D.; Murray, P.; Zabalza, J.; Ren, J. Folded LDA: Extending the Linear Discriminant Analysis Algorithm for Feature Extraction and Data Reduction in Hyperspectral Remote Sensing. IEEE J. Sel. Top. Appl. Earth Obs. Remote. Sens. 2021, 14, 12312–12331. [Google Scholar] [CrossRef]
  42. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  43. Parmar, A.; Katariya, R.; Patel, V. A review on random forest: An ensemble classifier. In Proceedings of the International Conference on Intelligent Data Communication Technologies and Internet of Things, Berlin, Germany, 14–16 July 2018. [Google Scholar]
  44. Wang, X.-Y.; Gu, S.-X.; Zhang, Y.-Q. Novel image encryption algorithm based on cycle shift and chaotic system. Opt. Lasers Eng. 2015, 68, 126–134. [Google Scholar] [CrossRef]
  45. Zhang, W.; Wong, K.-W.; Yu, H.; Zhu, Z.-L. An image encryption scheme using reverse 2-dimensional chaotic map and dependent diffusion. Commun. Nonlinear Sci. Numer. Simul. 2013, 18, 2066–2080. [Google Scholar] [CrossRef]
  46. Kamrani, A.; Zenkouar, K.; Najah, S. A new set of image encryption algorithms based on discrete orthogonal moments and Chaos theory. Multimed. Tools Appl. 2020, 79, 20263–20279. [Google Scholar] [CrossRef]
  47. Zhang, S.; Liu, L. A novel image encryption algorithm based on SPWLCM and DNA coding. Math. Comput. Simul. 2021, 190, 723–744. [Google Scholar] [CrossRef]
  48. Hosny, K.M.; Kamal, S.T.; Darwish, M.M.; Papakostas, G.A. New image encryption algorithm using hyperchaotic system and fibo-nacci q-matrix. Electronics 2021, 10, 1066. [Google Scholar] [CrossRef]
  49. Ye, J.; Deng, X.; Zhang, A.; Yu, H. A Novel Image Encryption Algorithm Based on Improved Arnold Transform and Chaotic Pulse-Coupled Neural Network. Entropy 2022, 24, 1103. [Google Scholar] [CrossRef] [PubMed]
  50. Wu, J.; Xia, W.; Zhu, G.; Liu, H.; Ma, L.; Xiong, J. Image encryption based on adversarial neural cryptography and SHA controlled chaos. J. Mod. Opt. 2021, 68, 409–418. [Google Scholar] [CrossRef]
  51. Liu, J.; Zhang, M.; Tong, X.; Wang, Z. Image compression and encryption algorithm based on compressive sensing and nonlinear diffusion. Multimed. Tools Appl. 2021, 80, 25433–25452. [Google Scholar] [CrossRef]
  52. Dursun, G.; Özer, F.; Özkaya, U. A new and secure digital image scrambling algorithm based on 2D cellular automata. Turk. J. Electr. Eng. Comput. Sci. 2017, 25, 3515–3527. [Google Scholar] [CrossRef]
  53. Dalianis, H. Clinical Text Mining: Secondary Use of Electronic Patient Records; Springer Nature: Berlin, Germany, 2018; pp. 47–48. [Google Scholar]
Figure 1. Illustration of Moore’s and Von Neumann neighborhood schemes at radius 1.
Figure 1. Illustration of Moore’s and Von Neumann neighborhood schemes at radius 1.
Electronics 12 00774 g001
Figure 2. An example of a lattice evolved with CGL rule (Alive cells are white and black cells are dead). PBC and N M are applied.
Figure 2. An example of a lattice evolved with CGL rule (Alive cells are white and black cells are dead). PBC and N M are applied.
Electronics 12 00774 g002
Figure 3. An illustration of main steps of proposed image encryption scheme.
Figure 3. An illustration of main steps of proposed image encryption scheme.
Electronics 12 00774 g003
Figure 4. LDA Face Recognition scheme with Encrypted Face Images.
Figure 4. LDA Face Recognition scheme with Encrypted Face Images.
Electronics 12 00774 g004
Figure 5. Encryption of Mandrill image. From left original grayscale image, XORed Image, and scrambled image with configurations R = e I , L 0 , v C G L , P B C , 12 , 7 .
Figure 5. Encryption of Mandrill image. From left original grayscale image, XORed Image, and scrambled image with configurations R = e I , L 0 , v C G L , P B C , 12 , 7 .
Electronics 12 00774 g005
Figure 6. Decryption of Mandrill image. From left scrambled image, descrambled XORed image with configurations I = d E , L 0 , v C G L , P B C , 12 , 7 , and original image (UnXORed image).
Figure 6. Decryption of Mandrill image. From left scrambled image, descrambled XORed image with configurations I = d E , L 0 , v C G L , P B C , 12 , 7 , and original image (UnXORed image).
Electronics 12 00774 g006
Figure 7. Histogram of Mandrill test image. On top Mandrill before scrambling and on bottom Mandrill after scrambling.
Figure 7. Histogram of Mandrill test image. On top Mandrill before scrambling and on bottom Mandrill after scrambling.
Electronics 12 00774 g007
Figure 8. Decrypting Mandrill image with different values of k and n. From left encrypted image, decryption with   L k only, decryption with   L n only, decryption with k = 12 n = 6 and decryption with k = 12 n = 7.
Figure 8. Decrypting Mandrill image with different values of k and n. From left encrypted image, decryption with   L k only, decryption with   L n only, decryption with k = 12 n = 6 and decryption with k = 12 n = 7.
Electronics 12 00774 g008
Figure 9. Samples of ORL’s subjects encrypted face images.
Figure 9. Samples of ORL’s subjects encrypted face images.
Electronics 12 00774 g009
Table 1. NPCR and UACI between Original Test Images and their Scrambled Versions. For any encrypted image E i m = e I i m , L 0 , v C G L , P B C , 10 , 8 .
Table 1. NPCR and UACI between Original Test Images and their Scrambled Versions. For any encrypted image E i m = e I i m , L 0 , v C G L , P B C , 10 , 8 .
Test ImageNPCRUACI
Lena99.597%28.07%
Cameraman99.467%37.075%
Barbara99.908%32.736%
Mandrill99.688%29.284%
Peppers99.489%31.934%
Airplane99.596%19.904%
Gold hill99.426%24.525%
Table 2. Sample of NPCR and UACI between Original Test Images and their encrypted versions in Yale dataset. For any encrypted image E i m = e I i m , L 0 , v C G L , P B C , 14 , 10 .
Table 2. Sample of NPCR and UACI between Original Test Images and their encrypted versions in Yale dataset. For any encrypted image E i m = e I i m , L 0 , v C G L , P B C , 14 , 10 .
Test ImageNPCRUACI
Subject 1–799.561%21.891%
Subject 3–499.344%36.389%
Subject 7–699.777%43.831%
Subject 2–899.752%39.081%
Subject 12–399.645%36.404%
Subject 9–1099.808%41.877%
Subject 5–1199.796%38.430%
Table 3. Correlation between Original Test Images and their Scrambled Versions.
Table 3. Correlation between Original Test Images and their Scrambled Versions.
Test ImageCorrelation
FullHorizontalVerticalDiagonal
Lena0.034−0.041−0.017−0.031
Cameraman0.1080.0320.127−0.083
Barbara0.0300.0210.0060.102
Mandrill−0.017−0.013−0.0290.025
Peppers−0.013−0.027−0.1040.022
Airplane0.0310.0320.0230.023
Gold hill0.010−0.0520.0550.039
Table 4. GDD between Original Test Images and their Scrambled Versions and information entropy for encrypted images.
Table 4. GDD between Original Test Images and their Scrambled Versions and information entropy for encrypted images.
Test ImageGDDInformation Entropy
Lena0.96506.8731
Cameraman0.97936.0497
Barbara0.81175.3528
Mandrill0.86527.2789
Peppers0.96867.5712
Airplane0.91336.7024
Gold hill0.95317.4778
Table 5. NPCR and UACI comparison between proposed scheme and other algorithms.
Table 5. NPCR and UACI comparison between proposed scheme and other algorithms.
AuthorYearNPCR%UACI%Info. Entropy
LenaCameramanPeppersLenaCameramanPeppersLenaCameramanPeppers
[46]202099.78699.791-30.32527.637-7.9947.994-
[47]202199.6299.63-33.5033.56-7.996--
[48]202199.624-99.60333.422-33.427--7.997
[49]202299.64699.58899.6533.43933.50533.4557.9977.9977.997
Proposed202399.59799.46799.48928.0737.07531.9346.8736.0497.571
Table 6. Correlation comparison between proposed scheme and other algorithms.
Table 6. Correlation comparison between proposed scheme and other algorithms.
Author
Year
Correlation
LenaCameramanPeppers
Hor.Ver.Dia.Hor.Ver.Dia.Hor.Ver.Dia.
[48]20210.0069--−0.00360.00480.0073−0.017−0.0334−0.0073
[49]2022−0.00350.0076−0.0026−0.0252−0.006−0.0078---
[50]2021-0.04790.0075---0.02110.01290.0013
[51]20210.00310.00050.00030.0020.00160.00130.00150.0029−0.0019
Proposed2023−0.041−0.017−0.0310.0320.127−0.083−0.027−0.1040.022
Table 7. Comparing different CA based scrambling techniques GDDs.
Table 7. Comparing different CA based scrambling techniques GDDs.
AuthorMethodLenaCameramanBarbaraGold HillMan5.1.127.1.04
[15]Game of Life0.93200.89710.8749----
[19]Elementary CA0.93110.8926-----
[24]Elementary CA-0.87800.86800.90000.84600.89800.8810
[52]Game of Life0.92000.8954--0.95900.93170.9456
Proposed MethodXOR-CGL0.96500.97930.81170.95310.94600.92340.9772
Table 8. Evaluation metrics in classification report.
Table 8. Evaluation metrics in classification report.
MetricFormula
Precision p r e c i s i o n = t p t p + f p 21
Recall r e c a l l = t p t p + f n 22
F1-score F 1 = 1 + β 2 × p r e c i s i o n × r e c a l l β 2 × p r e c i s i o n + r e c a l l 23
Accuracy A c c u r a c y = t p + t n t p + t n + f p + f n 24
Table 9. Evaluation metrics report with random forest classifier. Highlighted in blue are results in encrypted test set and orange represents results on original test set.
Table 9. Evaluation metrics report with random forest classifier. Highlighted in blue are results in encrypted test set and orange represents results on original test set.
PrecisionRecallF1-ScoreSupport
Enc. Test SetOri. Test SetEnc. Test SetOri. Test SetEnc. Test SetOri. Test SetEnc. Test SetOri. Test Set
Accuracy 0.960.098080
Macro Average0.970.020.960.090.960.048080
Weighted Average0.970.020.960.090.960.048080
Table 10. Evaluation metrics report with random forest classifier for testing set encrypted with slightly different key.
Table 10. Evaluation metrics report with random forest classifier for testing set encrypted with slightly different key.
PrecisionRecallF1-scoreSupport
Accuracy 0.6680
Macro Average0.670.660.6280
Weighted Average0.670.660.6280
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.

Share and Cite

MDPI and ACS Style

Abusham, E.; Ibrahim, B.; Zia, K.; Rehman, M. Facial Image Encryption for Secure Face Recognition System. Electronics 2023, 12, 774. https://doi.org/10.3390/electronics12030774

AMA Style

Abusham E, Ibrahim B, Zia K, Rehman M. Facial Image Encryption for Secure Face Recognition System. Electronics. 2023; 12(3):774. https://doi.org/10.3390/electronics12030774

Chicago/Turabian Style

Abusham, Eimad, Basil Ibrahim, Kashif Zia, and Muhammad Rehman. 2023. "Facial Image Encryption for Secure Face Recognition System" Electronics 12, no. 3: 774. https://doi.org/10.3390/electronics12030774

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop