# A Hybrid Key Generator Model Based on Multiscale Prime Sieve and Quantum-Inspired Approaches
## 9 Information Fusion Infrastructure Overview  
Below is a block diagram of the main stages of the system that enable data fusion. The diagram is divided into three parts:  
* Quantum algorithm: used to extract the quantum subkey;
* RSA: used to create the numerical code and private key;
* QPIF algorithm: used for data fusion. The numerical part is represented by the product of two prime numbers (Modulus). The QPIF algorithm was created to obtain a fusion key from quantum and numerical data. The conversion of two vectors into a matrix is one of the most crucial steps in this algorithm. This matrix must be square and its order must depend on the number of components of the two vectors. To this end, the following steps must be performed:  
* Let \(a\in Z^{m}\) and \(b\in Z^{n}\), two vectors where \(a\) contains the quantum component and \(b\) the product of two prime numbers. As in [1], be \(s\in Z\): \[s=m+n\] (6)
* Let \(q\in Z\) : \[q=\left\lceil\sqrt{s}\right\rceil\] (7) a whole number containing \(s\) root. * To have a square root, it is necessary that the following relations (8) and (9) are satisfied: \[nz1=q-mod(m,q)\] (8) \[nz2=q-mod(n,q)\] (9)  
These are the dimensions of padding elements for both vectors. Therefore, we can represent the vectors \(a1\in Z^{m1}\) and \(b1\in Z^{m1}\) by the first elements equal to vectors \(a\) and \(b\) and the last elements with \(nz1\) adding components to the first vector and \(nz2\) to the second, respectively. Therefore, the dimensions will be as in (10) and (11), respectively:  
\[m1=m+nz1 \tag{10}\]  
\[n1=n+nz2 \tag{11}\]  
The padding is achieved by some components of the same vector, decided by the private key. The first component of the key is the index of the first value to be padded; the second component is added to the previous index and gives us the index of the second padding value e and so on, in a loop. Apart from that, we split every vector into blocks that will become the rows of the matrix U, a matrix whose two vectors are put properly as in (12) and (13),  
\[nblock\_a1=m1/q \tag{12}\]  
\[nblock\_b1=n1/q \tag{13}\]  
Then, as in (14):  
\[Pad=nz1+nz2 \tag{14}\]  
and finally, the addition of the calculated padding, in this phase, on two vectors. * In the formation of matrix U, where to stack the blocks is determined by the private key, formed by RSA algorithm (considering itself as a vector). Vector a1 is given index \"0\" and vector b1 index \"1\". The first element of the private key (mod 2) determines with which of the two vectors the matrix formation needs to begin. Additionally, the value of the first element of the private key vector dictates also the quantity of blocks of the vector to be allocated in the matrix, and the value of the next element dictates the quantity of blocks of the other vector, and so on alternatively. If all blocks of a single vector are being inserted, then all blocks of the second vector are inserted individually. * Finally, you must verify that the obtained matrix is really squared as, in some cases, you can get a greater or smaller number of blocks than the number of elements of each block, thus having a rectangular matrix. In this case, it is enough that you add the number of columns or lines necessary to get such a dimension that the matrix becomes squared. As in (15) and (16), be: \[PadTot=q^{2}-(m+n)\] (15) \[q=\left\lceil\sqrt{s}\right\rceil\]0 (16) where Pad is defined in (14) and PadTot in (15). Then, three cases can be distinguished as in (17)-(19) \[q=\left\lceil\sqrt{s}\right\rceil\]1 (17) \[q=\left\lceil\sqrt{s}\right\rceil\]2 (18) \[q=\left\lceil\sqrt{s}\right\rceil\]3 (19)  
The private key creates the line or column of padding to be inserted. In creating the matrix, the value of the first component of the key dictates the element of the first line from which the first component of padding is obtained; the second component value of the key dictates the element of the first column from which the second component of padding is obtained, and so on.