# A Quantum-Secure Cryptographic Algorithm Integrating Fractals and Prime Numbers
## 1 Introduction  
In recent years, along with the digitalization of information, the field of cryptography has become more and more important, and the protection and encryption of documents from public and private institutions must guarantee a high level of security. In [1], the authors introduced a new algorithm for extending secure coding based on prime numbers coming from RSA by using Information Fusion techniques and fractals. As we will see below after the introduction, we will extend the results in [1], and we will introduce two quantum properties, that is, the random evolution of the fragments of the key and the recombination of the fragment of the key to obtain a key that is resistant to quantum malicious attacks since the key becomes crypto-agile. The CSPRNG (Cryptographically Secure Pseudo-Random Number Generator) uses techniques that generate random numbers suitable for cryptographic systems [2]. In this work, we have developed a new algorithm for generating a highly random key based on concepts like fractals, the fractal nature of the sequence of prime numbers [3], the RSA algorithm, and quantum security. The idea of using fractals in cryptography is a relatively new idea that some researchers are exploring. Mathematical studies on fractals began in 1982 with [PERSON]. He formalized this new type of geometry in his book [4]. Mandelbrot sets are widely used for cryptographical purposes. The study in [5] used a modified Mandelbrot set to generate a public key and a modified Julia set to generate a private key. Another study from 2020 used two Mandelbrot sets to create an encryption algorithm [6]. A Mandelbrot set was also utilized in [7] along with the Hilbert transformation to create a random encryption key. In 2019, an algorithm for encrypting images was proposed using two fractals: the Hilbert curve and the H-Tree [8]. These fractals were used in this study to shuffle the pixel positions and their values in an image. There are also types of studies, like ours, that propose the application of different combined techniques to obtaining cryptographic algorithm, withthe aim of optimizing their effectiveness. In one study, for example, two algorithms based on fractals and chaos theory are combined to obtain an encoded image [9]. A 2023 work proposed the combination of the RSA algorithm, homomorphic cryptography, and chaotic maps to enhance image encryption [10]. Another work from 2024 combined an E-fractal and a hash function to create a cryptographic key [11]. Another recent article proposes the use of a 3D fractal cube and compressed sensing to create a compression encryption algorithm [12]. The choice of using fractals is motivated by the inherently complex and chaotic structure of these geometric shapes [13]. In fact, as is well known, a fractal F is a set that has the following properties:  
* Self-similarity: F is an object that is similar to one or more of its parts. Indeed, F is the union of a certain number of parts that reproduce the entire initial F when sufficiently enlarged. * Fine structure: F reveals details at every zoom. * Irregularity: F cannot be described as a set of points that satisfy simple geometrical or analytical rules. * Fractional dimension: A new dimension concept is defined for fractals, different from the classical conception; this new introduced dimension is called the \"Hausdorff dimension\" and is defined by a formula that uses the logarithms \[d=\frac{\ln(N)}{\ln(s)}\] with N equal to the number of parts into which the object can be divided and \(s\) the scale factor. These properties make the idea of applying fractals in the field of cryptography interesting [14]. Another section of the algorithm concerns the generation of prime numbers. A relevant question in the field of mathematics in recent decades is that of the generation of primes and whether this can be represented by a deterministic scheme. In [15], we showed that the prime numbers follow a multiscale distribution, meaning that they can be classified in terms of tree structures.