Everyone in the IT field is interested in how big a threat quantum computers are to cryptography and how to deal with the problem. This series of articles tries to explain this problem in a popular way. After the Introduction, we can look at the problem of factorization.
Let's start with the factorization problem. The best way to attack this algorithm is provided by the so-called GNFS (General Number Field Sieve). This provides a list of pairs of numbers. If we multiply these numbers together, we should get the desired product. Then, we need to test the given pairs of numbers for primality. If we want to find out the approximate number of operations, we need to know the complexity of the GNFS algorithm itself, which can be calculated based on information about the length of n the factored number. We give this length in bits.
An important part is determining the number of number pairs. This data is usually in units
of pairs, the exception is the situation when the primality verification fails for some
reason during generation. This data therefore works as a kind of indicator. Based on further
tests, the aforementioned indicator can warn, for example, about an inappropriate choice
of testing algorithm. So, ideally, we will get one result, or five results. If there are
more than ten, there has probably been a failure somewhere and it is advisable to check the
entire mechanism.
In any of these cases, a test for primality of the expected pairs follows. Since the number
of tests is small, there is no significant change in complexity. However, the correct choice
of testing algorithms is important. Among the applicable ones are the following:
So we know how many logical operations are needed, but how to convert this into instructions
for a 64b CPU? Based on the requirements, it is necessary to solve the creation of the matrix
(120 instructions per step) and then the analysis of the matrix content (5 instructions per step).
Then the results must be tested for primality. This calculation applies to numbers that fit into
the processor registers. As soon as the prime numbers are larger, the calculation begins
to become more complicated. Of course, the number of operations for creating the matrix increases
in a similar way and slightly for analyzing it. From this, it is possible to approximately
determine the total number of instructions.
In a similar way, we can also find the total memory requirement. The amount of memory required
to create the GNFS matrix is approximately:
Based on the above approximate calculations, we have estimates that we can use to calculate the required machine time, the related power consumption and the amount of memory needed to complete the given task. The task will be to factorize the key in order to find out what is within the capabilities of individuals, organizations or our civilization, or what is completely beyond our capabilities. For our own calculation, we will consider a hypothetical computer with 10 cores at a frequency of 1GHz, without hyperthreading, the power consumption of this computer will be an ideal 100 W. Based on the previous information, the following results are obtained:
| n-bit | Complexity | Factorization | Instructions | Memory (B) | Time (years) | Energy (J) |
| 512 | 275.2 | 1.757∙1019 | 2.19∙1021 | 6.75∙1012 | 6.96∙105 | 2.19∙1015 |
| 1024 | 2101.6 | 1.316∙1026 | 1.64∙1028 | 2.58∙1017 | 5.21∙1012 | 1.64∙1022 |
| 2048 | 2136.4 | 1.533∙1035 | 1.91∙1037 | 2.86∙1023 | 6.07∙1021 | 1.91∙1031 |
| 2540 | 2149.3 | 3.527∙1038 | 4.40∙1040 | 4.99∙1025 | 1.39∙1025 | 4.40∙1035 |
| 3072 | 2161.7 | 5.805∙1041 | 7.25∙1043 | 6.95∙1027 | 2.30∙1028 | 7.25∙1037 |
| 4096 | 2182.2 | 1.289∙1047 | 1.61∙1049 | 2.55∙1031 | 5.11∙1033 | 1.61∙1043 |
| 7168 | 2229.3 | 2.539∙1059 | 3.17∙1061 | 4.01∙1039 | 1.00∙1046 | 3.17∙1055 |
| 8192 | 2242.1 | 5.708∙1062 | 7.13∙1064 | 6.88∙1041 | 2.26∙1049 | 7.13∙1058 |
| 13550 | 2296.9 | 1.178∙1077 | 1.47∙1079 | 2.40∙1051 | 4.66∙1063 | 1.47∙1073 |
| 37100 | 2444.2 | 3.952∙10115 | 4.94∙10117 | 1.16∙1077 | 1.56∙10102 | 4.94∙10111 |
| 76608 | 2591.4 | 1.342∙10154 | 1.67∙10156 | 5.64∙10102 | 5.32∙10140 | 1.67∙10150 |
Unfortunately, the reality will be extremely different. If there is not enough memory, access
to data during the calculation will be slowed down due to the need to access the data storage.
This is an expansion of the order of 103 for NVMe disks, 104 for SSD
disks and 107 for HDD - spinning disks. At the same time, memory in the order of
TB is needed for the 512b number itself. The memories themselves have a consumption that
corresponds to another approximately 100W per 1.5 TB. This corresponds to a small increase
in power consumption in decimal places. Furthermore, especially when analyzing a matrix that
is huge in size, the data does not fit in the processor cache. This leads to so-called
cache-misses, i.e. these are memory-intensive operations. However, any such access needs
to reload the memory contents into the cache, together with problems with branch prediction
in the code, this will mean a loss of approximately 200 cycles. No calculations will
be performed during this time. Overall, this can result in a slowdown of approximately
5 orders of magnitude (105 to 109 depending on the technologies used).
Are we capable of carrying out such an attack? We can look at it from several perspectives:
To be continued in the section Algorithms Using the Discrete Logarithm Problem
1. Introductory Provisions
1.1. These General Terms and Conditions are, unless otherwise agreed in writing in the contract, an integral part of all contracts relating to training organised or provided by the trainer, Jan Dušátko, IČ 434 797 66, DIČ 7208253041, with location Pod Harfou 938/58, Praha 9 (next as a „lector“).2. Creation of a contract by signing up for a course
2.1. Application means unilateral action of the client addressed to the trainer through a data box with identification euxesuf, e-mailu with address register@cryptosession.cz or register@cryptosession.info, internet pages cryptosession.cz, cryptosession.info or contact phone +420 602 427 840.3. Termination of the contract by cancellation of the application
3.1. The application may be cancelled by the ordering party via e-mail or via a data mailbox.4. Price and payment terms
4.1. By sending the application, the ordering party accepts the contract price (hereinafter referred to as the participation fee) indicated for the course.5. Training conditions
5.1. The trainer is obliged to inform the client 14 days in advance of the location and time of the training, including the start and end dates of the daily programme.6. Complaints
6.1. If the participant is grossly dissatisfied with the course, the trainer is informed of this information.7. Copyright of the provided materials
7.1. The training materials provided by the trainer in the course of the training meet the characteristics of a copyrighted work in accordance with Czech Act No 121/2000 Coll.8. Liability
8.1. The trainer does not assume responsibility for any shortcomings in the services of any third party that he uses in the training.9. Validity of the Terms
9.1 These General Terms and Conditions shall be valid and effective from 1 October 2024.Consent to the collection and processing of personal data
According to Regulation (EU) No 2016/679 of the European Parliament and of the Council on the protection of individuals with regard to the processing of personal data and on the free movement of such data and repealing Directive 95/46/EC (General Data Protection Regulation, hereinafter referred to as "the Regulation"), the processor xxx (hereinafter referred to as "the Controller") processes personal data. Individual personal data that are part of the processing during specific activities at this web presentation and in the course of trade are also broken down.Information about the records of access to the web presentation
This website does not collect any cookies. The site does not use any analytical scripts of third parties (social networks, cloud providers). For these reasons, an option is also offered for displaying the map in the form of a link, where the primary source is OpenStreet and alternatives then the frequently used Maps of Seznam, a.s., or Google Maps of Google LLC Inc. The use of any of these sources is entirely at the discretion of the users of this site. The administrator is not responsible for the collection of data carried out by these companies, does not provide them with data about users and does not cooperate on the collection of data.Information about contacting the operator of the site
The form for contacting the operator of the site (administrator) contains the following personal data: name, surname, e-mail. These data are intended only for this communication, corresponding to the address of the user and are kept for the time necessary to fulfil the purpose, up to a maximum of one year, unless the user determines otherwise.Information about the order form
In case of an interest in the order form, the form contains more data, i.e. name, surname, e-mail and contact details for the organisation. These data are intended only for this communication, corresponding to the address of the user and are kept for one year, unless the user determines otherwise. In the event that a business relationship is concluded on the basis of this order, only the information required by Czech law on the basis of business relations (company name and address, bank account number, type of course and its price) will continue to be kept by the administrator.Information about the course completion document
Within the course, a course completion document is issued by the processor. This document contains the following data: student's name and surname, the name and date of the course completion and the employer's name. The information is subsequently used for the creation of a linear hash tree (non-modifiable record). This database contains only information about the provided names and company names, which may or may not correspond to reality and is maintained by the processor for possible re-issuance or verification of the document's issuance.Rights of the personal data subject
The customer or visitor of this website has the possibility to request information about the processing of personal data, the right to request access to personal data, or the right to request the correction or deletion of any data held about him. In the case of deletion, this requirement cannot be fulfilled only if it is not data strictly necessary in the course of business. The customer or visitor of this website also has the right to obtain explanations regarding the processing of his personal data if he finds out or believes that the processing is carried out in violation of the protection of his private and personal life or in violation of applicable legislation, and the right to request removal of the resulting situation and to ensure the correction.