# Symmetric Keys for Lightweight Encryption Algorithms Using a Pre-Trained VGG16 Model
## 3 The Proposed Method
### Example  
Below is a simple example of generating long symmetric keys using the pre-trained VGG16.  
The user randomly chooses the first image  
Figure 10: Flowchart of the proposed symmetric key generation using pre–trained VGG16 model.  
[6.903665065765381, 34.105731964111133, 67.41827392578125, 31.747112274169922, 15.00304317473652, 17.883718490600586, 31.02227210998535, 3.426398515701294, 9.4799994082330322, 67.9732666015625, 21.41775369644165, 17.164846420280886, 0.9679595232009888, 11.956241607666016, 2.2587838172912598, 6.765922546386719, 19.34865951538086, 5.30103540205322, 10.16125774383545, 17.66643333435086, 6.217296600341797, 35.38439178466797, 12.481855392456055, 49.49517822265625, 2.6517748832702637, 58.775062561035156, 14.703927697, 4.851640224456787, 32.54026794433594, 18.19671058654785, 38.65156936645508, 62.830291748046875,...] * We eliminated all instances of 0.0 from the extracted features in the second image. The second image contains 3644 features, as shown below. [24.223085403442383, 10.136581420898438, 9.996827125549316, 43.26572036743164, 9.374469757080078, 4.680146217346191, 11.460838317871094, 8.864582061767578, 12.735118865966797, 1.2287561893463135, 6.5052361488342285, 4.149342060089111, 7.862621784210205, 3.47650627441406, 3.7152833938598633, 11.048995018005371, 13.816470416792, 1.718098759651184, 11.642448425292969, 5.83514261245725, 3.547330379486084, 8.25907039642334, 3.026193141937256, 5.3880109786987305, 1.9568023681640625, 3.869873046875, 0.10132180899381638, 6.91591732635498, 29.360055923461914, 11.005602836608887, 3.67189192771916, 25.473989486694336, 9.130292892456055, 7.472241401672363, 11.316661834716797, 8.249753952026367, 15.941848754882812, 6.701721668243408, 2.25915780786133, 33.0833396916211,...] * Remove decimal points from all the resulting features for the first image, then convert them into a binary string. The output is a binary string of 150,728 bits.  
\begin{tabular}{l l l} \hline
**Feature** & **Remove the Dot (J)** & **Convert to Binary** \\ \hline
6.903665065765381 & 6903665065765381 & 1100010000110110110001100011010101000000101 \\ \hline
34.10573196411133 & 3410573196411133 & 110000011111100101111001111010010000000111111101 \\ \hline
67.41827392578125 & 6741827392578125 & 101111111100110100000000001011011111000100100101101 \\ \hline
31.747112274169922 & 31747112274169922 & 111000011001001101010100101010111111100000000100010 \\ \hline
15.003043174743652 & 15003043174743652 & 1101010101010101001100000011010111111111001100100 \\ \hline... &... &... \\ \hline \end{tabular}  
* Remove decimal points from all the resulting features for the second image, then convert them into a binary string. The output is a binary string of 193,752 bits.  
\begin{tabular}{l l l} \hline
**Feature** & **Remove the Dot (J)** & **Convert to Binary** \\ \hline
24.223085403442383 & 24223085403442383 & 1010110000001110111000100001100001100110011111 \\ \hline
10.136581420898438 & 1001000000001100101010101100110110101001001001000110 \\ \hline
9.996827125549316 & 9996827125549316 & 1000111000010000001111111100110011000100010001000 \\ \hline
43.26572036743164 & 4326572036743164 & 1111010111111110000110101010111111111111100 \\ \hline
9.374469757080078 & 9374469757080078 & 10000101001110000001111101010000010001100000111100 \\ \hline... &... &... \\ \hline \end{tabular}
* To equalize the two binary strings, truncate them to the length of the shorter one and perform an XOR operation between the binary string of the first image and the binary string of the second image. The output is a binary string of 150,728 bits, as shown below. [0110100000101101001111000111100010010010010010110001011101101011011011110111100000101111 1101100000010101110011000 111100000010101110010111001100110011100 11111111000000011111110010011001111111000 1111111101