# Symmetric Keys for Lightweight Encryption Algorithms Using a Pre-Trained VGG16 Model
## 2 Theoretical Background
### Feature Extraction Using VGG16 Architecture  
The visual geometry group (VGG) at the University of Oxford developed the VGG-16 model, which stands out for its depth and consists of 16 layers. Figure 6 illustrates how we can use the VGG-16 model for feature extraction, with 13 convolutional layers and 3 fully connected layers [16]. Each block, comprising multiple convolutional layers and a max-pooling layer to facilitate down-sampling, structures the layers [17]. Known for its simplicity and effectiveness, VGG-16 demonstrates strong performance across various computer vision tasks [18].  
The VGG-16 network structure [19], illustrated in Figure 6, can be described as follows:  
* The initial two convolutional layers contain 64 feature kernel filters, each sized at 3 \(\times\) 3. Upon passing an RGB image input (with a depth of 3) through these layers, the dimensions transform to 224 \(\times\) 224 \(\times\) 64. Subsequently, the output undergoes a max pooling layer with a stride of 2.
* Following are the third and fourth convolutional layers with 128 feature kernel filters, each also sized at 3 \(\times\) 3. These layers are succeeded by a max pooling layer with a stride of 2, resulting in output dimensions of 56 \(\times\) 56 \(\times\) 128.
* The fifth, sixth, and seventh layers are convolutional layers with 256 feature maps, each with a kernel size of 3 \(\times\) 3. These layers are followed by a max pooling layer with a stride of 2.
* The eighth through thirteenth layers are two sets of convolutional layers with 512 kernel filters, each with a size of 3 \(\times\) 3. These layers are followed by a max pooling layer with a stride of 1.
* The fourteenth and fifteenth layers are fully connected hidden layers with 4096 units each, followed by a softmax output layer (the sixteenth layer) with 1000 units.
* Convolution layer: The convolutional layer process entails using a kernel matrix to generate a feature map from the input matrix, achieved through the mathematical operation of convolution [20]. This linear operation involves sliding the kernel matrix across the input matrix, performing element-wise matrix multiplication at each position, and accumulating the results onto the feature map, as shown in Figure 7[21]. Convolution is widely utilized in various fields like image processing, statistics, and physics [22]. The calculation of the convoluted image follows this procedure: \[S\;(i,\;j)=\sum_{x}\sum_{y}\;I\;(\text{x},\;\text{y})\;k\;(i\;-\;\text{x},\;j \;-\;\text{y})\] (1) where \(I\) is a 2-dimensional image input, \(k\) is a 2-dimensional kernel filter, and \(S\) is a 2-dimensional output feature map.
* Non-linear activation functions, such as the Rectified Linear Unit (ReLU), serve as nodes in a neural network that follow the convolutional layer. These functions are responsible for introducing nonlinearity to the input signal through a piecewise  
Figure 6: The graphic above depicts the “top” portion of the model being removed. A 3D stack of feature maps convolves the remaining pre–trained output layers.  
linear transformation. In the case of ReLU, the function outputs the input if it is positive and outputs zero if it is negative, as shown in Figure 8[23].
3. Pooling layer: The convolutional layer's feature map output is limited because it preserves the exact location of features in the input, making it sensitive to minor changes like cropping or rotation [24]. To address this issue, we can introduce down-sampling in the convolutional layers by adding a pooling layer after the nonlinearity layer [25]. This pooling helps to make the representation insensitive to small translations of the input, ensuring that most of the pooled outputs remain unchanged even with slight adjustments to the input [26]. The max-pooling unit extracts the maximum value from a set of four values, as illustrated in Figure 9. Average pooling is an alternative option for pooling layers [27].