ITUD20130122A1 - METHOD TO IMPROVE THE PERFORMANCE OF AN ELECTRONIC PROCESSOR - Google Patents

METHOD TO IMPROVE THE PERFORMANCE OF AN ELECTRONIC PROCESSOR

Info

Publication number
ITUD20130122A1
ITUD20130122A1 IT000122A ITUD20130122A ITUD20130122A1 IT UD20130122 A1 ITUD20130122 A1 IT UD20130122A1 IT 000122 A IT000122 A IT 000122A IT UD20130122 A ITUD20130122 A IT UD20130122A IT UD20130122 A1 ITUD20130122 A1 IT UD20130122A1
Authority
IT
Italy
Prior art keywords
prime
numbers
ppos
algorithm
input
Prior art date
Application number
IT000122A
Other languages
Italian (it)
Inventor
Francesco Sovrano
Original Assignee
Francesco Sovrano
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Francesco Sovrano filed Critical Francesco Sovrano
Priority to IT000122A priority Critical patent/ITUD20130122A1/en
Publication of ITUD20130122A1 publication Critical patent/ITUD20130122A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7204Prime number generation or prime number testing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Saccharide Compounds (AREA)

Description

Descrizione del trovato avente per titolo: Description of the invention having as title:

"METODO PER MIGLIORARE LE PRESTAZIONI DI UN ELABORATORE ELETTRONICO" "METHOD FOR IMPROVING THE PERFORMANCE OF AN ELECTRONIC COMPUTER"

CAMPO DI APPLICAZIONE FIELD OF APPLICATION

II presente trovato si riferisce ad un metodo per migliorare le prestazioni di un elaboratore elettronico, in particolare nella fattorizzazione di un numero, ad esempio applicabile a sistemi di gestione della sicurezza informatica. The present invention relates to a method for improving the performance of an electronic computer, in particular in the factoring of a number, for example applicable to computer security management systems.

STATO DELLA TECNICA STATE OF THE TECHNIQUE

È noto che lo studio delle teorie sui numeri primi e lo sviluppo di algoritmi di ricerca di numeri primi sono di basilare importanza nel settore dell’informatica, in quanto possono rappresentare il nucleo di software ed applicazioni per la sicurezza informatica, in particolare nel contesto della scomposizione di una chiave pubblica RSA (Rivest, Shamir, Adleman). It is known that the study of prime number theories and the development of prime number search algorithms are of fundamental importance in the information technology sector, as they can represent the core of software and applications for computer security, in particular in the context of decomposition of an RSA public key (Rivest, Shamir, Adleman).

Un bisogno molto sentito in questo ambito è quello di ridurre il carico computazionale, il sovraccarico di memoria (overhead) e/o il tempo di calcolo per gli elaboratori elettronici coinvolti nelle operazioni di ricerca di numeri primi, in particolare nella scomposizione di una chiave pubblica RSA nelle applicazioni di sicurezza informatica. A much felt need in this area is to reduce the computational load, the memory overload (overhead) and / or the computation time for the computers involved in the search operations of prime numbers, in particular in the decomposition of a public key. RSA in cybersecurity applications.

Uno scopo del presente trovato è quello di mettere a disposizione un metodo per migliorare le prestazioni di un elaboratore elettronico, An object of the present invention is to provide a method for improving the performance of an electronic computer,

di un numero, applicabile in particolare a sistemi di gestione della sicurezza informatica, che superi almeno uno degli inconvenienti della tecnica nota. of a number, applicable in particular to IT security management systems, which overcomes at least one of the drawbacks of the prior art.

Per ovviare agli inconvenienti della tecnica nota e per ottenere questi ed ulteriori scopi e vantaggi, la Richiedente ha studiato, sperimentato e realizzato il presente trovato. In order to obviate the drawbacks of the known art and to obtain these and further objects and advantages, the Applicant has studied, tested and implemented the present invention.

ESPOSIZIONE DEL TROVATO EXPOSURE OF THE FOUND

Il presente trovato è espresso e caratterizzato nella rivendicazione indipendente. Le rivendicazioni dipendenti espongono altre caratteristiche del presente trovato o varianti dell’idea di soluzione principale. The present invention is expressed and characterized in the independent claim. The dependent claims disclose other features of the present invention or variants of the main solution idea.

In accordo con il suddetto scopo, forme di realizzazione qui descritte sono relative ad un metodo per migliorare le prestazioni di un elaboratore elettronico, in particolare, nella fattorizzazione di un numero ed applicabile nella sicurezza informatica, comprendente: In accordance with the above purpose, embodiments described herein relate to a method for improving the performance of an electronic computer, in particular, in the factoring of a number and applicable in computer security, comprising:

- una fase di inserimento di un numero input qualsiasi appartenente all'insieme dei numeri naturali; - a phase of insertion of any input number belonging to the set of natural numbers;

- iniziare un ciclo iterativo con iteratore definito PPOS inizialmente uguale ad 1 fino ad un massimo pari alla parte intera della metà della radice quadrata del numero input, in cui PPOS rappresenta la posizione dei numeri dispari all'interno dell’insieme dei numeri naturali, in cui il ciclo iterativo comprende l’iterazione delle seguenti fasi i) -v): - start an iterative cycle with iterator defined PPOS initially equal to 1 up to a maximum equal to the integer part of half the square root of the input number, in which PPOS represents the position of the odd numbers within the set of natural numbers, in which the iterative cycle includes the iteration of the following phases i) -v):

i) una fase di controllo salto per controllare se effettuare un salto in base ad un criterio di raggruppamento e densità di numeri primi, in caso contrario avviene un normale incremento di 1 di PPOS; i) a jump control phase to check whether to perform a jump based on a criterion of grouping and density of prime numbers, otherwise a normal PPOS increase of 1 occurs;

ii) una fase di gestione dei limiti di radice, in cui se il numero primo più grande e minore del valore della radice quadrata di PPOS*2+l è maggiore di un precedente numero primo usato come limite di radice, allora esso risulta essere il nuovo limite di radice; ii) a phase of managing the root limits, in which if the prime number greater and less than the value of the square root of PPOS * 2 + l is greater than a previous prime number used as the root limit, then it turns out to be the new root limit;

iii) una fase di definizione di gruppi di dimensione G dispari. Presa la retta dei numeri naturali positivi, ogni multiplo di G a partire da G rappresenta il primo elemento di ogni gruppo (ad esempio con G=7 si otterranno i gruppi 1-7, 9-13, 15-21, 23-27,...), dunque in ogni gruppo sono presenti alternativamente (G-l)/2+l o (G-l)/2 numeri dispari; iii) a phase of definition of groups of odd G dimension. Taking the line of positive natural numbers, each multiple of G starting from G represents the first element of each group (for example with G = 7 we will obtain groups 1-7, 9-13, 15-21, 23-27, ...), therefore in each group there are alternatively (G-l) / 2 + l or (G-l) / 2 odd numbers;

iv) una fase di esecuzione di un primo algoritmo basato su aritmetica modulare oppure di un secondo algoritmo basato su operazioni lineari eseguito sui numeri dispari individuati nella fase iii), in funzione del numero di numeri dispari previsti in ciascuno dei gruppi di dimensione G, per verificare se PPOS*2+l è un numero primo; iv) a phase of execution of a first algorithm based on modular arithmetic or of a second algorithm based on linear operations performed on the odd numbers identified in phase iii), depending on the number of odd numbers foreseen in each of the groups of dimension G, for check if PPOS * 2 + l is a prime number;

v) una fase di controllo che prevede che: v) a control phase which provides that:

- se PPOS*2+l è un numero primo, si controlla che sia un divisore del numero in input e nel caso in cui ciò fosse vero viene restituito come risultato PPOS*2+l, che rappresenta il numero primo più piccolo e fattore del numero in input; - if PPOS * 2 + l is a prime number, it is checked that it is a divisor of the number in input and if this is true it is returned as a result PPOS * 2 + l, which represents the smallest prime number and factor of the number in input;

- se PPOS raggiunge la parte intera della metà della radice quadrata del numero in input senza che alcun fattore sia trovato, allora viene restituito il valore del numero in input, in quanto numero primo. Ulteriori forme di realizzazione qui descritte sono relative ad un elaboratore elettronico configurato per l’esecuzione di un metodo in accordo con la presente descrizione, comprendente un’unità di elaborazione centrale, una memoria elettronica, una banca dati elettronica e circuiti ausiliari, in cui l’unità di elaborazione centrale è configurata per effettuare i calcoli ed i controlli delle fasi i) - v), la memoria elettronica è configurata per memorizzare, in modo temporaneo o definitivo, i risultati dei calcoli e controlli delle fasi i) - v), la banca dati elettronica è configurata per organizzare, gestire e rendere disponibili i risultati dei calcoli e controlli delle fasi i) -v). - if PPOS reaches the integer part of half the square root of the input number without any factor being found, then the value of the input number is returned, as a prime number. Further embodiments described herein relate to an electronic computer configured for carrying out a method in accordance with the present description, comprising a central processing unit, an electronic memory, an electronic database and auxiliary circuits, in which the the central processing unit is configured to perform the calculations and checks of phases i) - v), the electronic memory is configured to store, temporarily or permanently, the results of the calculations and checks of phases i) - v), the electronic database is configured to organize, manage and make available the results of the calculations and checks of phases i) -v).

Ancora ulteriori forme di realizzazione sono relative ad un programma per computer memorizzabile in un mezzo leggibile da un computer che contiene le istruzioni che, una volta eseguite da un elaboratore elettronico, determinano l’esecuzione di un metodo in accordo con la presente descrizione. Still further embodiments relate to a computer program that can be memorized in a computer readable medium that contains the instructions which, once executed by an electronic computer, determine the execution of a method in accordance with this description.

ILLUSTRAZIONE DEI DISEGNI ILLUSTRATION OF DRAWINGS

Queste ed altre caratteristiche del presente trovato appariranno chiare dalla seguente descrizione di forme di realizzazione, fomite a titolo esemplificativo, non limitativo, con riferimento agli annessi disegni in cui: These and other characteristics of the present invention will become clear from the following description of embodiments, provided by way of non-limiting example, with reference to the attached drawings in which:

- la fig. 1 è uno schema a blocchi di possibili forme di realizzazione di un metodo in accordo con la presente descrizione; - fig. 1 is a block diagram of possible embodiments of a method in accordance with the present description;

- la fig. 2 è uno schema a blocchi di un sistema computer utilizzabile per effettuare un metodo in accordo con la presente descrizione; - fig. 2 is a block diagram of a computer system which can be used to carry out a method in accordance with the present description;

- la fig. 3 illustra un grafico che mette in relazione la densità di probabilità ed i numeri primi relativo ad un primo algoritmo utilizzato dal metodo in accordo con il presente trovato; - fig. 3 illustrates a graph relating the probability density and the prime numbers relating to a first algorithm used by the method in accordance with the present invention;

- la fig. 4 è un grafico relativo ad un secondo algoritmo utilizzato nel metodo in accordo con il presente trovato; - fig. 4 is a graph relating to a second algorithm used in the method in accordance with the present invention;

- la fig. 5 è un altro grafico relativo al secondo algoritmo; - fig. 5 is another graph relating to the second algorithm;

- la fig. 6 presenta istogrammi relativi al secondo algoritmo; - fig. 6 shows histograms relating to the second algorithm;

- la fig. 7a è un ulteriore grafico relativo al secondo algoritmo; - fig. 7a is a further graph relating to the second algorithm;

- la fig. 7b è uno schema di flusso relativo al grafico di fig. 7a; - fig. 7b is a flow diagram relating to the graph of fig. 7a;

- la fig. 7c è uno schema di flusso sintetizzato relativo al grafico di fig. 7a; - fig. 7c is a summarized flow diagram relating to the graph of fig. 7a;

- la fig. 8 è un altro grafico relativo al secondo algoritmo. - fig. 8 is another graph relating to the second algorithm.

Per facilitare la comprensione, numeri di riferimento identici sono stati utilizzati, ove possibile, per identificare elementi comuni identici nelle figure. Va inteso che elementi e caratteristiche di una forma di realizzazione possono essere convenientemente incorporati in altre forme di realizzazione senza ulteriori precisazioni. To facilitate understanding, identical reference numbers have been used wherever possible to identify identical common elements in the figures. It should be understood that elements and features of one embodiment can be conveniently incorporated into other embodiments without further specification.

DESCRIZIONE DI FORME DI REALIZZAZIONE DESCRIPTION OF EMBODIMENTS

Si farà ora riferimento nel dettaglio alle varie forme di realizzazione del trovato, delle quali uno o più esempi sono illustrati nelle figure allegate. Ciascun esempio è fornito a titolo di illustrazione del trovato e non è inteso come una limitazione dello stesso. Ad esempio, le caratteristiche illustrate o descritte in quanto facenti parte di una forma di realizzazione potranno essere adottate su, o in associazione con, altre forme di realizzazione per produrre un’ulteriore forma di realizzazione. Resta inteso che il presente trovato sarà comprensivo di tali modifiche e varianti. Reference will now be made in detail to the various embodiments of the invention, of which one or more examples are illustrated in the attached figures. Each example is provided by way of illustration of the invention and is not intended as a limitation thereof. For example, the features illustrated or described as being part of an embodiment may be adopted on, or in association with, other embodiments to produce a further embodiment. It is understood that the present invention will include these modifications and variations.

Nel seguito viene descritto un metodo per migliorare le prestazioni di un elaboratore elettronico, in particolare nella fattorizzazione di un numero, applicabile nella sicurezza informatica in accordo con il presente trovato, che trova applicazione in differenti algoritmi che comprendono sistemi di ricerca di numeri primi. In the following, a method for improving the performance of an electronic computer is described, in particular in the factorization of a number, applicable in computer security in accordance with the present invention, which finds application in different algorithms which include systems for searching for prime numbers.

Le applicazioni di tali sistemi di ricerca riguardano principalmente la sicurezza informatica, con la creazione di software in grado di lavorare a velocità molto elevate nel quale la fattorizzazione o la ricerca di numeri primi sia di primaria importanza. La fig. 1 è utilizzata per descrivere forme di realizzazione di un metodo in accordo con la presente descrizione. The applications of these search systems mainly concern information security, with the creation of software capable of working at very high speeds in which the factorization or the search for prime numbers is of primary importance. Fig. 1 is used to describe embodiments of a method in accordance with the present description.

II metodo secondo la presente descrizione prevede una fase di inserimento, o input, di un numero qualsiasi appartenente all'insieme dei numeri naturali positivi (fase 100). Inizialmente il metodo prevede di controllare che il numero in input non sia un multiplo di 3 o che non sia inferiore a 4 o che non sia un quadrato perfetto (Es: 4*4=16). The method according to the present description provides for an insertion step, or input, of any number belonging to the set of positive natural numbers (step 100). Initially, the method involves checking that the number in input is not a multiple of 3 or that it is not less than 4 or that it is not a perfect square (Ex: 4 * 4 = 16).

In forme di realizzazione specifiche, il metodo prevede di iniziare un ciclo iterativo con iteratore chiamato PPOS inizialmente uguale ad 1 fino ad un massimo pari alla parte intera della metà della radice quadrata di input. PPOS può rappresentare la posizione dei numeri dispari all'interno del loro insieme, come risulterà chiaro nel prosieguo della descrizione, In specific embodiments, the method provides for starting an iterative loop with iterator called PPOS initially equal to 1 up to a maximum equal to the integer part of half the square root of the input. PPOS can represent the position of odd numbers within their whole, as will become clear later in the description,

Il metodo secondo la presente descrizione prevede una fase di controllo (fase 101) se effettuare un salto in base ad un criterio di raggruppamento e densità di numeri primi, come meglio spiegato nel prosieguo, in caso contrario avviene un normale incremento di 1 di PPOS. The method according to the present description provides a control step (step 101) whether to perform a jump based on a criterion of grouping and density of prime numbers, as better explained below, otherwise a normal increase of 1 of PPOS occurs.

Il metodo secondo la presente descrizione prevede una fase di gestione dei limiti di radice (fase 102), in cui se il numero primo più grande e minore del valore della radice quadrata di PPOS*2+l è maggiore di un precedente numero primo usato come limite di radice, allora esso risulterà essere il nuovo limite di radice. The method according to the present description provides a step of managing the root limits (step 102), in which if the prime number greater and less than the value of the square root of PPOS * 2 + l is greater than a previous prime number used as root limit, then it will turn out to be the new root limit.

In forme di realizzazione, nella fase 102 non verranno eseguiti controlli su divisori maggiori di tale limite. In embodiments, in step 102 no checks will be performed on dividers greater than this limit.

In possibili implementazioni, il primo limite di radice è 7. In possible implementations, the first root limit is 7.

Il metodo secondo la presente descrizione prevede una fase di definizione di gruppi di dimensione G, ad esempio, gruppi di 7 numeri (G=7 o G7). Ogni gruppo utilizza come estremi di raggruppamento, aH’interno della retta dei numeri naturali e positivi, i multipli del numero di elementi del gruppo, (ad esempio nel caso di specie 7: 7-13, 14-20, 21-27, ecc..) in cui in ogni gruppo sono presenti un numero predefmito di numeri dispari, ad esempio, alternativamente, 4 o 3 numeri dispari nel caso di raggruppamenti di 7 (G7). The method according to the present description provides for a step of defining groups of dimension G, for example, groups of 7 numbers (G = 7 or G7). Each group uses as grouping extremes, within the line of natural and positive numbers, the multiples of the number of elements of the group (for example in this case 7: 7-13, 14-20, 21-27, etc. ..) in which in each group there are a predefined number of odd numbers, for example, alternatively, 4 or 3 odd numbers in the case of groupings of 7 (G7).

Dato che l'algoritmo lavora unicamente con numeri dispari e PPOS ne rappresenta la posizione all'interno dell’insieme dei numeri naturali, o comunque del sottoinsieme dei numeri naturali definito tra 1 e la parte intera della radice quadrata del numero in input, si può prevedere che, come descritto nella sezione RAGGRUPPAMENTI E DENSITÀ, se il numero G di elementi di un raggruppamento è dispari, potrà contenere alternativamente (G-l)/2+l o (G-l)/2 numeri dispari, altrimenti se il numero G di elementi di un gruppo è pari, potrà contenere G/2 numeri dispari. Dunque nel caso in cui G=7, saranno presenti in ogni gruppo 4 o 3 numeri dispari. Since the algorithm works only with odd numbers and PPOS represents their position within the set of natural numbers, or in any case of the subset of natural numbers defined between 1 and the integer part of the square root of the input number, we can provide that, as described in the GROUPING AND DENSITY section, if the number G of elements of a grouping is odd, it may contain alternatively (G-l) / 2 + l or (G-l) / 2 odd numbers, otherwise if the number G of elements of a group is even, it may contain G / 2 odd numbers. So if G = 7, 4 or 3 odd numbers will be present in each group.

Successivamente, è prevista l’esecuzione di un primo algoritmo (fase 104.1) oppure di un secondo algoritmo (fase 104.2), secondo le necessità, come meglio spiegato in seguito, che verificano se PPOS*2+l è un numero primo. Subsequently, the execution of a first algorithm (phase 104.1) or a second algorithm (phase 104.2) is foreseen, according to the needs, as better explained below, which check if PPOS * 2 + l is a prime number.

In forme di realizzazione, il primo algoritmo, mediante aritmetica modulare, controlla che PPOS*2+l non sia multiplo di alcun numero primo in una apposita tabella PRIMELINE, maggiore di 1 e più piccolo del limite di radice, calcolando ogni volta, tramite moltiplicazioni e divisioni, il modulo della distanza tra PPOS ed i numeri primi stessi. Se tale modulo è pari a 0 allora PPOS*2+l è un multiplo. L'operazione è eseguita finché non è stato trovato nè alcun multiplo, nè alcun primo ed un iteratore J è minore al numero di elementi nella tabella PRIMELINE. In embodiments, the first algorithm, by means of modular arithmetic, checks that PPOS * 2 + l is not a multiple of any prime number in a suitable PRIMELINE table, greater than 1 and smaller than the root limit, calculating each time, by multiplication and divisions, the modulus of the distance between PPOS and the prime numbers themselves. If this modulo is equal to 0 then PPOS * 2 + l is a multiple. The operation is performed until neither multiple nor prime has been found and an iterator J is less than the number of elements in the PRIMELINE table.

In forme di realizzazione, il secondo algoritmo prevede di mantenere aggiornate 3 diverse tabelle per poter gestire correttamente gli incrementi non effettuati delle distanze associate ai numeri primi, fino al limite di radice, in posizioni superiori a quella del più piccolo divisore primo corrispondente a rispettivi istogrammi. Ogni modulo di distanza è quindi ottenuto dai moduli, precedentemente confrontati e salvati nella tabella PRIMELINE, usando operazioni lineari. Se la distanza da un numero primo è uguale a 0 o è uguale al numero primo stesso allora PPOS*2+l è un multiplo di quel primo. L'operazione è eseguita finché non è stato trovato nè alcun multiplo, nè alcun primo ed un iteratore J è minore al numero di elementi nella tabella PRIMELINE. Se PPOS*2+l è un numero primo, due tabelle (LTABLE e DTABLE) verranno svuotate e due parametri corrispondenti a numeri primi (MINGAP e C2) verranno impostati ad un valore di partenza. In embodiments, the second algorithm provides for keeping 3 different tables updated in order to correctly manage the unsuccessful increments of the distances associated with the prime numbers, up to the root limit, in positions higher than that of the smallest prime divisor corresponding to respective histograms. . Each distance module is then obtained from the modules, previously compared and saved in the PRIMELINE table, using linear operations. If the distance from a prime number equals 0 or equals the prime number itself then PPOS * 2 + l is a multiple of that prime. The operation is performed until neither multiple nor prime has been found and an iterator J is less than the number of elements in the PRIMELINE table. If PPOS * 2 + l is a prime number, two tables (LTABLE and DTABLE) will be emptied and two parameters corresponding to prime numbers (MINGAP and C2) will be set to a starting value.

In forme di realizzazione, una fase di controllo 105, successiva alla fase 104.1 o 104.2 prevede che se PPOS*2+l viene scoperto essere un numero primo allora si controlla che esso non sia un divisore del numero in input ed in caso contrario l'algoritmo termina prematuramente restituendo come risultato PPOS*2+l, cioè il numero primo più piccolo e fattore dell'input dato. Nel caso in cui PPOS raggiungesse la parte intera della metà della radice quadrata dell'input senza che alcun fattore fosse già stato trovato, allora l'algoritmo terminerebbe restituendo il valore dell'input stesso, in quanto numero primo. In embodiments, a control step 105, subsequent to step 104.1 or 104.2 provides that if PPOS * 2 + 1 is found to be a prime number then it is checked that it is not a divisor of the number in input and, otherwise, the algorithm terminates prematurely by returning PPOS * 2 + l, ie the smallest prime number and factor of the given input. In the event that PPOS reaches the integer part of half the square root of the input without any factor having already been found, then the algorithm would terminate by returning the value of the input itself, as a prime number.

In particolare, di seguito vengono descritte forme di realizzazione del primo algoritmo, che utilizza principalmente l'aritmetica modulare per la ricerca di soluzioni per la fattorizzazione in tempi ridotti e del secondo algoritmo, che utilizza principalmente operazioni lineari. In particular, embodiments of the first algorithm are described below, which mainly uses modular arithmetic to search for solutions for factorization in a short time, and of the second algorithm, which mainly uses linear operations.

II primo algoritmo risulta particolarmente efficace per la fattorizzazione di numeri con ordine di grandezza relativamente basso. The first algorithm is particularly effective for factoring numbers with a relatively low order of magnitude.

Il secondo algoritmo, utilizzando operazioni lineari, consente di operare su numeri con ordine di grandezza elevato, ottenendo un maggior vantaggio in termini di velocità computazionale. The second algorithm, using linear operations, allows to operate on numbers with a high order of magnitude, obtaining a greater advantage in terms of computational speed.

In particolare, il secondo algoritmo è configurato per ridurre la probabilità di sovraccarico di memoria (detto anche overhead), rispetto alle convenzionali operazioni modulari su calcolatore. In particular, the second algorithm is configured to reduce the probability of memory overload (also called overhead), compared to conventional modular computer operations.

Nella forme di realizzazione qui riportate, un numero da fattorizzare può essere qualsiasi numero naturale maggiore di 0, nel seguito chiamato input. In the embodiments reported here, a number to be factored can be any natural number greater than 0, hereinafter referred to as input.

L’input può essere messo in ingresso al primo algoritmo o al secondo algoritmo, ad esempio, inserendolo mediante un’interfaccia utente, ad esempio, digitandolo direttamente sul calcolatore, acquisendolo dall’uscita di altro programma o leggendolo da supporti fisici quali un hard disk, una scheda magnetica di riconoscimento, o simili. Il primo algoritmo ed il secondo algoritmo, eseguono raffronti tra l’input ed altri dati, eventualmente raccolti in precedenza dal primo e dal secondo algoritmo stessi, al fine di ottenere in uscita i fattori primi che scompongono l’input. The input can be input to the first algorithm or to the second algorithm, for example, by entering it through a user interface, for example, typing it directly on the computer, acquiring it from the output of another program or reading it from physical media such as a hard disk , a magnetic identification card, or the like. The first algorithm and the second algorithm perform comparisons between the input and other data, possibly previously collected by the first and second algorithm themselves, in order to obtain the prime factors that break down the input at the output.

In particolare, il primo algoritmo ed il secondo algoritmo sono entrambi configurati per effettuare raffronti sull’input e numeri primi inseriti nell’anzidetta tabella PRIMELINE. In particular, the first algorithm and the second algorithm are both configured to make comparisons on the input and prime numbers inserted in the aforementioned PRIMELINE table.

In forme di realizzazione, il primo algoritmo ed il secondo algoritmo sono configurati per aggiornare automaticamente la tabella PRIMELINE. In embodiments, the first algorithm and the second algorithm are configured to automatically update the PRIMELINE table.

Primo e secondo algoritmo trovano applicazione nell'ambito della sicurezza informatica, in particolare, in merito alla scomposizione di chiavi pubbliche, quali le chiavi pubbliche RSA (nome derivante dagli ideatori Rivest, Shamir, Adleman). The first and second algorithms are applied in the field of computer security, in particular, with regard to the decomposition of public keys, such as public keys RSA (name deriving from the creators Rivest, Shamir, Adleman).

In forme di realizzazione, il primo algoritmo ed il secondo algoritmo possono essere implementati con un linguaggio di programmazione scelto tra C, C++, lava o linguaggi di programmazione simili. In embodiments, the first algorithm and the second algorithm can be implemented with a programming language selected from C, C ++, lava or similar programming languages.

Il metodo del presente trovato può essere eseguito mediante un elaboratore elettronico, o sistema di computer, 200, descritto ad esempio con riferimento alla fig. The method of the present invention can be carried out by means of an electronic processor, or computer system, 200, described for example with reference to fig.

2, che comprende un’unità di elaborazione centrale 201, o CPU, una memoria elettronica 202, una banca dati elettronica 203 e circuiti ausiliari (o I/O) (non illustrati). 2, which includes a central processing unit 201, or CPU, an electronic memory 202, an electronic database 203 and auxiliary circuits (or I / O) (not shown).

L’unità di elaborazione centrale 201 può essere configurata ed utilizzata per effettuare i calcoli ed i controlli delle fasi 101, 102, 103, 104.1, 104.2 e 105. The central processing unit 201 can be configured and used to perform the calculations and checks of phases 101, 102, 103, 104.1, 104.2 and 105.

La memoria elettronica 202 può essere configurata ed utilizzata, ad esempio, per memorizzare, in modo temporaneo o definitivo, i risultati dei calcoli e controlli delle fasi 101, 102, 103, 104.1, 104.2 e 105. The electronic memory 202 can be configured and used, for example, to store, temporarily or permanently, the results of the calculations and checks of the phases 101, 102, 103, 104.1, 104.2 and 105.

La banca dati elettronica 203, che può essere memorizzata nella memoria elettronica 202, oppure essere memorizzata su un altro supporto di memoria, può essere configurata ed utilizzata per organizzare, gestire e rendere disponibili i risultati dei calcoli e controlli delle fasi 101, 102, 103, 104.1, 104.2 e 105, ad esempio, per memorizzare, popolare, modificare, aggiornare, svuotare, ad esempio le tabelle PRIMELINE, DTABLE, LTABLE. The electronic database 203, which can be stored in the electronic memory 202, or be stored on another memory medium, can be configured and used to organize, manage and make available the results of the calculations and checks of the phases 101, 102, 103 , 104.1, 104.2 and 105, for example, to store, populate, modify, update, empty, for example the tables PRIMELINE, DTABLE, LTABLE.

Il sistema di computer 200 può prevedere, inoltre, un’interfaccia di input 205, o comunque un dispositivo di input, ad esempio collegato in rete con altri computer, oppure con una rete di telecomunicazione. Tale interfaccia di input 205 può essere configurata ed utilizzata per l’esecuzione della fase di inserimento 100. The computer system 200 can also provide an input interface 205, or in any case an input device, for example networked with other computers, or with a telecommunications network. This input interface 205 can be configured and used for the execution of the insertion step 100.

Il sistema di computer 200 può prevedere inoltre uno o più dispositivi di connessione di rete 206, quali schede, moduli o porte per la comunicazione di rete, senza fili o cablata, con una rete di altri computer o con una rete di telecomunicazione. Tali uno o più dispositivi di connessione di rete 206 possono essere impiegati per accedere al sistema di computer 200 per l’esecuzione da remoto del metodo in accordo con la presente descrizione. The computer system 200 may further provide one or more network connection devices 206, such as cards, modules or ports for wireless or wired network communication with a network of other computers or with a telecommunication network. Such one or more network connection devices 206 can be used to access the computer system 200 for remote execution of the method in accordance with this description.

Ad esempio, la CPU può essere una qualsiasi forma di processore per computer che possa essere utilizzata in ambito informatico per il controllo della sicurezza informatica. La memoria può essere connessa alla CPU e può essere una o più fra quelle commercialmente disponibili, come una memoria ad accesso casuale (RAM), una memoria a sola lettura (ROM), floppy disc, disco rigido, memoria di massa, o qualsiasi altra forma di archiviazione digitale, locale o remota. Le istruzioni software e i dati possono essere ad esempio codificati e memorizzati nella memoria per comandare la CPU. Anche i circuiti ausiliari possono essere connessi alla CPU per aiutare il processore in maniera convenzionale. I circuiti ausiliari possono includere ad esempio almeno uno tra: circuiti cache, circuiti di alimentazione, circuiti di clock, circuiteria di ingresso/uscita, sottosistemi, e similari. Un programma (o istruzioni computer) leggibile dal sistema di computer 200 può determinare quali compiti siano realizzabili in accordo con il metodo secondo la presente descrizione. In alcune forme di realizzazione, il programma è un software leggibile dal sistema di computer 200. Il sistema di computer 200 include un codice per generare e memorizzare informazioni e dati introdotti o generati nel corso del metodo in accordo con la presente descrizione. Forme di realizzazione del metodo in accordo con la presente descrizione possono essere incluse in un programma per computer memorizzabile in un mezzo leggibile da un computer che contiene le istruzioni che, una volta eseguite dal sistema di computer 200, determinano l’esecuzione del metodo di cui si discute. For example, the CPU can be any form of computer processor that can be used in the IT environment for controlling IT security. The memory can be connected to the CPU and can be one or more of those commercially available, such as a random access memory (RAM), a read only memory (ROM), floppy disk, hard disk, mass memory, or any other form of digital storage, local or remote. Software instructions and data can, for example, be coded and stored in memory to drive the CPU. Auxiliary circuits can also be connected to the CPU to aid the processor in a conventional manner. The auxiliary circuits can include, for example, at least one of: cache circuits, power supply circuits, clock circuits, input / output circuitry, subsystems, and the like. A computer program (or instructions) readable by the computer system 200 can determine which tasks are achievable according to the method according to the present description. In some embodiments, the program is software readable by the computer system 200. The computer system 200 includes a code for generating and storing information and data introduced or generated in the course of the method in accordance with the present disclosure. Embodiments of the method in accordance with the present description can be included in a computer program which can be stored in a computer readable medium which contains the instructions which, once executed by the computer system 200, determine the execution of the method of which we discuss.

Qui di seguito verranno illustrate forme di realizzazione del primo algoritmo e del secondo algoritmo in modo separato, ma resta inteso che in forme di realizzazione primo e secondo algoritmo possono essere combinati o associati, oppure possono essere realizzati altri algoritmi senza uscire dall’ambito protetto dal presente trovato. In particolare, primo e secondo algoritmo vengono utilizzati per chiarire complessivamente e dettagliatamente gli aspetti realizzativi alla base dell’intero metodo esposto e resta inteso che aspetti , ad esempio, descritti nel primo algoritmo possono essere utilizzati dal secondo algoritmo o in atre fasi del presente metodo. Nella seguente descrizione i nomi attribuiti a singoli concetti, tabelle, espressioni sono previsti per la diretta realizzazione del primo e del secondo algoritmo anche al fine di favorirne l’ implementazione utilizzando linguaggi di programmazione, quali quelli sopra citati. Hereinafter, embodiments of the first algorithm and the second algorithm will be illustrated separately, but it is understood that in embodiments the first and second algorithm can be combined or associated, or other algorithms can be realized without leaving the protected scope of the present invention. In particular, the first and second algorithm are used to clarify the implementation aspects at the base of the whole method described in detail and overall and it is understood that aspects, for example, described in the first algorithm can be used by the second algorithm or in other phases of this method. . In the following description, the names attributed to individual concepts, tables, expressions are provided for the direct implementation of the first and second algorithm also in order to facilitate its implementation using programming languages, such as those mentioned above.

La descrizione che segue è divisa, inoltre, in sezioni nelle quali vengono utilizzate in parte espressioni appartenenti al primo ed al secondo algoritmo al fine di chiarirne il funzionamento operativo, in relazione al metodo oggetto del presente trovato. The following description is also divided into sections in which expressions belonging to the first and second algorithm are used in part in order to clarify their operating operation, in relation to the method object of the present invention.

PRIMO ALGORITMO FIRST ALGORITHM

II primo algoritmo utilizza la proprietà di estrazione di fattori dal segno di radice, per una riduzione dei calcoli da effettuare nella fattorizzazione dell’input. The first algorithm uses the property of extracting factors from the root sign, for a reduction of the calculations to be made in the input factorization.

Per la proprietà di estrazione di fattori dal segno di radice, per stabilire se un numero è un numero primo è sufficiente controllare se il tale numero, in questo caso l’input, è multiplo dei numeri interi uguali, od immediatamente minori, alla radice del numero. For the property of extracting factors from the root sign, to establish whether a number is a prime number it is sufficient to check whether this number, in this case the input, is a multiple of the integers equal to, or immediately smaller, at the root of number.

Nel caso vengano controllati tutti i numeri interi inferiori alla radice del numero senza rilevare alcun multiplo, tale numero non risulta multiplo di alcun numero e, di conseguenza risulta essere un numero primo. If all integers below the root of the number are checked without detecting any multiple, this number is not a multiple of any number and, consequently, is a prime number.

Inoltre, tale controllo può essere limitato ai soli numeri primi uguali o minori alla radice dell’input, in quanto divisori di tutti gli altri numeri e di interesse per la fattorizzazione. Furthermore, this control can be limited only to prime numbers equal to or less than the root of the input, as they are divisors of all other numbers and of interest for factorization.

I numeri primi con i quali confrontare l’input sono riportati nella tabella PRIMELINE. The prime numbers with which to compare the input are shown in the PRIMELINE table.

In forme di realizzazione, la tabella PRIMELINE viene aggiornata automaticamente, ed il primo algoritmo concentra le operazioni di raffronto su tutti i numeri dispari minori od uguali alla radice quadrata dell’input, essendo i numeri pari sicuramente multipli di 2. In embodiments, the PRIMELINE table is automatically updated, and the first algorithm concentrates the comparison operations on all odd numbers less than or equal to the square root of the input, the even numbers being certainly multiples of 2.

II primo algoritmo aggiorna, quindi, la tabella PRIMELINE assegnando una posizione PPOS, ad ogni numero dispari a partire dal numero 3 fino al numero dispari più prossimo alla radice quadrata dell'input. The first algorithm then updates the PRIMELINE table by assigning a PPOS position to each odd number starting from the number 3 up to the odd number closest to the square root of the input.

A titolo d’esempio, la posizione PPOS del numero naturale 3 ha valore 1, la posizione PPOS del numero naturale 5 ha valore 2, la posizione PPOS del numero naturale 7 ha valore 3, la posizione PPOS del numero naturale 9 ha valore 4, ecc.. Inoltre il numero dispari associato alla posizione PPOS è ottenibile dalla relazione PPOS*2+l. As an example, the PPOS position of the natural number 3 has the value 1, the PPOS position of the natural number 5 has the value 2, the PPOS position of the natural number 7 has the value 3, the PPOS position of the natural number 9 has the value 4, etc .. Furthermore, the odd number associated with the PPOS position can be obtained from the relation PPOS * 2 + 1.

La definizione della posizione PPOS dei numeri consente di identificare se un numero è un numero primo utilizzando il seguente principio: prendendo un primo numero dispari di valore X maggiore di 1, a cui è assegnata una determinata posizione PPOS di valore Y, ed un secondo numero dispari di valore V, maggiore di X, con posizione PPOS di valore Z, qualora si verifichi che il valore della differenza Z - Y risulti un multiplo del valore X, allora il numero dispari di valore V è multiplo del numero dispari di valore X. The definition of the PPOS position of numbers allows you to identify if a number is a prime number using the following principle: by taking an odd first number of value X greater than 1, which is assigned a certain PPOS position of value Y, and a second number odd of value V, greater than X, with PPOS position of value Z, if it occurs that the value of the difference Z - Y is a multiple of the value X, then the odd number of value V is a multiple of the odd number of value X.

Infatti, qualora si verifichi tale principio nel confronto tra un determinato numero dispari ed un numero primo già presente nella tabella PRIMELINE, il numero dispari risulterebbe multiplo di tale numero primo e di conseguenza risulterebbe non essere un numero primo. In fact, if this principle occurs in the comparison between a certain odd number and a prime number already present in the PRIMELINE table, the odd number would be a multiple of this prime number and consequently it would not be a prime number.

Nel caso in cui il numero dispari non sia multiplo di nessuno tra i numeri inseriti nella tabella PRIMELINE, esso viene identificato come nuovo numero primo ed inserito nella tabella PRIMELINE. If the odd number is not a multiple of any of the numbers entered in the PRIMELINE table, it is identified as a new prime number and inserted in the PRIMELINE table.

L’input viene poi confrontato con tutti i numeri primi, inseriti nella tabella PRIMELINE, che presentano una posizione PPOS che raggiunge la parte intera di metà della radice quadrata dell'input. The input is then compared with all the prime numbers, entered in the PRIMELINE table, which have a PPOS position that reaches the whole half of the square root of the input.

Nel caso il resto della divisione dell'input per uno di tali numeri primi fosse pari a 0 allora l'algoritmo terminerebbe prematuramente restituendo il valore del numero primo trovato, in quanto tale numero primo sarebbe divisore dell’input. Per come è stato concepito il primo algoritmo, l'operazione di confronto tra l’input ed i numeri primi presenti nella tabella PRIMELINE è eseguita, al più, per una quantità di volte pari alla metà della radice quarta del valore dell’input. If the remainder of the division of the input by one of these prime numbers were equal to 0 then the algorithm would terminate prematurely by returning the value of the prime number found, as this prime number would be a divisor of the input. As the first algorithm was conceived, the comparison operation between the input and the prime numbers in the PRIMELINE table is performed, at most, for a quantity of times equal to half the fourth root of the input value.

Nel caso non venga identificato alcun numero primo che risulti divisore dell'input tra quelli inseriti nella tabella PRIMELINE, l’input risulta sicuramente un numero primo, ovvero privo di fattori diversi da se stesso o da 1, e l’algoritmo restituisce l’input stesso. If no prime number is identified that divides the input among those inserted in the PRIMELINE table, the input is certainly a prime number, i.e. devoid of factors other than itself or 1, and the algorithm returns the input same.

In forme di realizzazione, l’operazione di riempimento della tabella PRIMELINE ed il confonto tra l’input ed i numeri primi può essere realizzata dal primo algoritmo in modo progressivo, il che comporta una riduzione dei tempi di calcolo. In embodiments, the filling operation of the PRIMELINE table and the comparison between the input and the prime numbers can be carried out by the first algorithm in a progressive manner, which leads to a reduction in calculation times.

In forme di realizzazione preferenziali, il primo algoritmo può essere ottimizzato, ai fini di incrementare la velocità di calcolo computazionale, tenendo conto delle considerazioni propedeutiche esposte di seguito nei paragrafi DISTRIBUZIONE DEI NUMERI PRIMI e RAGGRUPPAMENTI E DENSITÀ. In preferential embodiments, the first algorithm can be optimized, in order to increase the computational speed, taking into account the preparatory considerations set out below in the paragraphs DISTRIBUTION OF PRIME NUMBERS and GROUPINGS AND DENSITY.

DISTRIBUZIONE DEI NUMERI PRIMI DISTRIBUTION OF PRIME NUMBERS

La probabilità che il modulo dell’input confrontato con un k-esimo numero primo sia diverso da 0, cioè che non ne sia multiplo, può essere identificata con The probability that the module of the input compared with a k-th prime number is different from 0, that is, that it is not a multiple of it, can be identified with

P((N mod NPk) != 0) P ((N mod NPk)! = 0)

dove N è l’input, appartenente all'insieme dei numeri positivi naturali e dispari, NPk è il k-esimo numero primo, P indica la probabilità, mod è l’operatore che indica il modulo della divisione tra N e NPk. where N is the input, belonging to the set of natural and odd positive numbers, NPk is the k-th prime number, P indicates the probability, mod is the operator that indicates the modulus of the division between N and NPk.

Inoltre, si può dimostrare che: Furthermore, it can be shown that:

P((N mod NPk)!=0) = (NPk-l)/NPk = 1 - 1/NPk P ((N mod NPk)! = 0) = (NPk-l) / NPk = 1 - 1 / NPk

Da ciò consegue che per ogni numero intero k, compreso nell’intervallo tra 1 e NPradix, intervallo indicabile come segue: From this it follows that for each integer k, included in the interval between 1 and NPradix, an interval that can be indicated as follows:

[1, NPradix] [1, NPradix]

dove NPradix è la posizione PPOS del numero primo più grande, di dimensione inferiore od uguale ad Nradix. where NPradix is the PPOS position of the largest prime, smaller than or equal to Nradix.

Nradix rappresenta la radice quadrata dell’input, anche indicata con il comando math.sqrt(N). Nradix represents the square root of the input, also indicated with the math.sqrt (N) command.

Si può inoltre dimostrare che la probabilità che N sia un numero primo, indicata con P(N è primo), è data da: It can also be shown that the probability that N is a prime number, denoted by P (N is prime), is given by:

P(N è primo) = II [1, NPradix, k]{P((N mod NPk)!= 0)} P (N is prime) = II [1, NPradix, k] {P ((N mod NPk)! = 0)}

dove l’espressione II[a,b,k]{...} rappresenta il prodotto incrementale di quanto compreso all’interno di {...}, con k che varia da 'a' a 'b<1>. where the expression II [a, b, k] {...} represents the incremental product of what is included within {...}, with k varying from 'a' to 'b <1>.

P(N è primo) è, quindi, il rapporto tra il numero di possibili combinazioni in cui nessun modulo è uguale a 0 ed il numero totale di combinazioni di moduli possibile. P(N è primo) rappresenta in particolare la densità di numeri primi al variare del numero in considerazione, definita densità PRIME_DENSITY. P (N is prime) is, therefore, the ratio between the number of possible combinations in which no module is equal to 0 and the total number of possible combinations of modules. P (N is prime) represents in particular the density of prime numbers as the number under consideration varies, defined density PRIME_DENSITY.

Nel seguito vengono riportati due esempi: Two examples are shown below:

ESEMPIO 1 EXAMPLE 1

N=l l; N = 1 1;

Nradix=math.sqrt(N)=3 ; Nradix = math.sqrt (N) = 3;

NPradix=l ; NPradix = l;

P( N è primo ) = II[l,l,k] P( ( 11 mod NPk ) != 0) = 2/3= 0.66. P (N is prime) = II [l, l, k] P ((11 mod NPk)! = 0) = 2/3 = 0.66.

ESEMPIO 2 EXAMPLE 2

N=7; P( N è primo )=1; N = 7; P (N is prime) = 1;

N=19; P( N è primo )=0.66; N = 19; P (N is prime) = 0.66;

N=29; P( N è primo )=0.53 =2/3 * 4/5 ; N = 29; P (N is prime) = 0.53 = 2/3 * 4/5;

N=53; P( N è primo )=0.46=2/3*4/5*6/7. N = 53; P (N is prime) = 0.46 = 2/3 * 4/5 * 6/7.

RAGGRUPPAMENTI E DENSITÀ GROUPINGS AND DENSITY

Si può dimostrare empiricamente che, presa la retta dei numeri naturali positivi, utilizzando come estremi di segmento i multipli di 7 a partire da 1, si ottengono gruppi di sette numeri, chiamati nel seguito gruppi G7, ad esempio tenendo in considerazione numeri primi gemelli, dei quali si riporta una rappresentazione esemplificativa in fig. It can be empirically shown that, taking the line of positive natural numbers, using multiples of 7 starting from 1 as segment extremes, we obtain groups of seven numbers, called G7 groups below, for example taking into account twin primes, of which an exemplary representation is reported in fig.

3. 3.

Tale concetto di raggruppamenti e densità, impiegato nella fase 103 (fig. 1), è utilizzabile propedeuticamente al primo algoritmo, così come al secondo algoritmo, essendo implementato a monte delle fasi 104.1 e 104.2 (fig. 1). This concept of groupings and densities, used in step 103 (fig. 1), can be used in preparation for the first algorithm, as well as for the second algorithm, being implemented upstream of steps 104.1 and 104.2 (fig. 1).

La somma delle densità PRIME_DENSITY, detta somma G7_ROOF, degli elementi di un determinato gruppo G7, moltiplicata per un fattore di 0.98, determinato empiricamente, coincide con il numero massimo di possibili numeri primi presenti nel gruppo G7. The sum of the PRIME_DENSITY densities, called the G7_ROOF sum, of the elements of a given G7 group, multiplied by a factor of 0.98, determined empirically, coincides with the maximum number of possible prime numbers present in the G7 group.

Questo comporta che, nel caso si sia già trovato un numero di numeri primi uguale al maggiorante della somma G7_ROOF, sarà possibile trascurare con sicurezza tutti i restanti elementi ancora da controllare del gruppo G7. This implies that, if a number of prime numbers equal to the greater than the sum G7_ROOF has already been found, it will be possible to safely ignore all the remaining elements of the G7 group still to be checked.

Ad esempio, in una implementazione del primo algoritmo, che utilizza la somma G7 ROOF, è stato possibile verificare sperimentalmente che il primo algoritmo ha potuto trascurare tra i primi 4.453.079 di numeri, oltre a tutti i numeri pari, anche 29.344 numeri multipli dispari, senza controllarli. For example, in an implementation of the first algorithm, which uses the sum G7 ROOF, it was possible to experimentally verify that the first algorithm could neglect among the first 4,453,079 numbers, in addition to all even numbers, even 29,344 odd multiple numbers , without checking them.

In modo analogo anche il secondo algoritmo, dettagliatamente esposto in seguito, può permettere di ottenere risultati comparabili al primo algoritmo, in termini di quantità di numeri che possono essere trascurati, cioè di risparmio computazionale. In forme di realizzazione, possono essere utilizzati raggruppamenti con un numero di elementi maggiore di 7 elementi. In a similar way, the second algorithm, explained in detail below, can allow to obtain results comparable to the first algorithm, in terms of the quantity of numbers that can be neglected, that is, of computational savings. In embodiments, groupings with a number of elements greater than 7 elements can be used.

Si definisce la costante S circa uguale a 6.86, ottenuta dal prodotto di 7 per il fattore 0.98, data la quale, la densità effettiva di numeri primi varia di una funzione kf(G), ricavabile sperimentalmente di circa l/(S*c). Si è inoltre ricavato il valore della costante c sopra utilizzata, per raggruppamenti delle seguenti dimensioni G: The constant S is defined as approximately equal to 6.86, obtained from the product of 7 by the factor 0.98, given which, the effective density of prime numbers varies by a function kf (G), which can be experimentally obtained by approximately l / (S * c) . The value of the constant c used above was also obtained, for groupings of the following dimensions G:

i. G=3; c=l/S; kf(G)=l, infatti l’ultimo elemento di un raggruppamento di 1 o 2 numeri dispari, che risulta l’unico a poter essere saltato, è sempre un multiplo di 3. the. G = 3; c = 1 / S; kf (G) = l, in fact the last element of a grouping of 1 or 2 odd numbers, which is the only one that can be skipped, is always a multiple of 3.

ii. G=5; c=l; kf(G)=l/S; ii. G = 5; c = l; kf (G) = 1 / S;

iii. G=7; c=l; kf(G)=l/S; iii. G = 7; c = l; kf (G) = 1 / S;

iv. G=9; c=2; kf(G)=l/(2*S); iv. G = 9; c = 2; kf (G) = 1 / (2 * S);

v. G=l l; c=3; kf(G)=l/(3*S); v. G = 1 1; c = 3; kf (G) = 1 / (3 * S);

vi. G=13; c=3; kf(G)=l/(3*S); you. G = 13; c = 3; kf (G) = 1 / (3 * S);

vii. G=15; c=3; kf(G)=l/(3*S); vii. G = 15; c = 3; kf (G) = 1 / (3 * S);

viii. G=17; c=4; kf(G)=l/(4*S); viii. G = 17; c = 4; kf (G) = 1 / (4 * S);

ix. G=19; c=5; kf(G)=l/(5*S); ix. G = 19; c = 5; kf (G) = 1 / (5 * S);

x. G=21; c=4; kf(G)=l/(4*S); x. G = 21; c = 4; kf (G) = 1 / (4 * S);

xi. G=23; c=5; kf(G)=l/(5*S). xi. G = 23; c = 5; kf (G) = l / (5 * S).

Se consideriamo che If we consider that

c*S*PRIME_DENSITY = G7_ROOF è possible ottenere la relazione c * S * PRIME_DENSITY = G7_ROOF it is possible to get the relation

PRIME_DEN SIT Y = G7_ROOF*kf(7) PRIME_DEN SIT Y = G7_ROOF * kf (7)

Di conseguenza è possibile affermare che, essendo G9_ROOF il corrispettivo di G7_ROOF per raggruppamenti di dimensione G=9, quando G9_ROOF risulta minore od uguale ad 1, allora anche G7_ROOF è minore di 1, in quanto kf(9)<kf(7) : Consequently, it is possible to state that, since G9_ROOF is the equivalent of G7_ROOF for groupings of size G = 9, when G9_ROOF is less than or equal to 1, then also G7_ROOF is less than 1, since kf (9) <kf (7):

PRIMEJDENSITY < kf(7) PRIMEJDENSITY <kf (7)

PRIME DENSITY <= kf(9) PRIME DENSITY <= kf (9)

Al variare di PRIME_DENSITY diventa, quindi, più conveniente utilizzare raggruppamenti di dimensione G e kf(G) sempre più grandi, in quanto potranno essere trascurati più numeri con uguale certezza di non primalità. As PRIME_DENSITY varies, therefore, it becomes more convenient to use larger and larger groupings of dimension G and kf (G), since more numbers can be neglected with equal certainty of non-primality.

Questa realizzazione permette di aumentare a dismisura la quantità di numeri trascurabili. This realization allows to dramatically increase the quantity of negligible numbers.

Tali considerazioni permettono di ottenere un algoritmo stabile, con complessità asintotica inferiore a: These considerations allow to obtain a stable algorithm, with asymptotic complexity lower than:

0(n<A>(3/4)) = 0(η<Λ>(1/4)*η<Λ>(1/2)) 0 (n <A> (3/4)) = 0 (η <Λ> (1/4) * η <Λ> (1/2))

dove il fatto che il limite sia superiore é dovuto alla capacità dell'algoritmo di identificare e trascurare, senza controllare nessun dividendo, un numero elevato di numeri non primi, teoricamente infiniti, quando n tende ad infinito. where the fact that the limit is higher is due to the algorithm's ability to identify and neglect, without checking any dividends, a large number of non-prime numbers, theoretically infinite, when n tends to infinity.

Poiché vengono controllati solo i numeri inferiori alla radice quadrata dell’input per una quantità di volte che dipendono dal limite di radice che può raggiungere come valore massimo la radice quarta dell’input, dunque: η<Λ>(1/4)*η<Λ>(1/2)= η<Λ>(3/4). Since only the numbers lower than the square root of the input are checked for a quantity of times that depend on the root limit which can reach the fourth root of the input as a maximum value, therefore: η <Λ> (1/4) * η <Λ> (1/2) = η <Λ> (3/4).

ALGORITMO 2 ALGORITHM 2

Il secondo algoritmo, presenta complessità asintotica coincidente con il primo algoritmo. The second algorithm has asymptotic complexity coinciding with the first algorithm.

Il secondo algoritmo si comporta in modo simile ad un algoritmo Distance Vector Routing, ovvero un algoritmo di instradamento basato su vettori delle distanze. The second algorithm behaves similarly to a Distance Vector Routing algorithm, that is a routing algorithm based on distance vectors.

L’algoritmo Distance Vector Routing è anche noto come routing di Bellman-Ford, perché basato sull'omonimo algoritmo, è classificato come algoritmo di routing dinamico, che tiene conto del carico istantaneo della rete sul quale è implementato. Il secondo algoritmo in particolare mantiene aggiornata una tabella che riporta i valori delle distanze dai numeri primi precedentemente trovati. The Distance Vector Routing algorithm is also known as Bellman-Ford routing, because based on the algorithm of the same name, it is classified as a dynamic routing algorithm, which takes into account the instantaneous load of the network on which it is implemented. The second algorithm in particular keeps up-to-date a table showing the values of the distances from the primes previously found.

Il secondo algoritmo si basa sulle ipotesi di seguito descritte. The second algorithm is based on the assumptions described below.

LA TEORIA DEL TRE THE THEORY OF THREE

La Teoria del Tre, ideata e così denominata dal Richiedente, riguarda la distribuzione dei resti, ottenibili con l’operatore modulo, delle divisioni delle distanze tra multipli di altri numeri, in seguito definiti multipli, e i numeri primi. The Theory of Three, conceived and so named by the Applicant, concerns the distribution of the remainders, obtainable with the modulo operator, of the divisions of the distances between multiples of other numbers, hereinafter defined as multiples, and the prime numbers.

Nelle figg. 4, 5 e 8, è rappresentato, usando una notazione ad istogrammi 12, e ciascuno istogramma 12 è associato ad un multiplo di un numero primo. In figs. 4, 5 and 8, is shown, using a histogram notation 12, and each histogram 12 is associated with a multiple of a prime number.

In fig. 5 in particolare è illustrato il principio di realizzazione degli istogrammi 12. Per la realizzazione degli istogrammi 12 vengono riportati i numeri dispari, orizzontalmente in una riga 28, ed i numeri primi, presenti nella tabella PRIMELINE, verticalmente in una colonna 27. In fig. 5 in particular illustrates the principle of realization of the histograms 12. For the realization of the histograms 12 the odd numbers are shown horizontally in a row 28 and the prime numbers, present in the PRIMELINE table, vertically in a column 27.

Ogni istogramma 12 presenta un altezza uguale alla differenza tra RV+1, dove RV rappresenta la metà della radice quadrata di PPOS, e la posizione all'interno della tabella PRIMELINE del più piccolo numero primo che divide il multiplo ad esso associato. Each histogram 12 has a height equal to the difference between RV + 1, where RV represents half of the square root of PPOS, and the position within the PRIMELINE table of the smallest prime number that divides the multiple associated with it.

Ogni volta che la tabella PRIMELINE viene aggiornata con un nuovo numero primo l’altezza degli istogrammi aumenta conseguentemente di un’unità. Each time the PRIMELINE table is updated with a new prime number, the height of the histograms consequently increases by one unit.

Con riferimento a fig. 5, inoltre, può essere notato che tra i primi numeri dispari a partire dal numero naturale 3 compaiono pochi istogrammi 12, ovvero multipli, consecutivi, essendo elevata la probabilità di di conseguenza, si troveranno principalmente gruppi composti da uno o due istogrammi 11 With reference to fig. 5, moreover, it can be noted that among the first odd numbers starting from the natural number 3 appear a few histograms 12, that is multiple, consecutive, the probability being high consequently, mainly groups composed of one or two histograms will be found 11

Col diminuire della probabilità, ovvero all’aumentare del valore dei numeri dispari i multipli diventano più fitti e compaiono frequentemente a gruppi di tre o più istogrammi 12 adiacenti. As the probability decreases, or as the value of the odd numbers increases, the multiples become denser and frequently appear in groups of three or more 12 adjacent histograms.

In fig. 6 è rappresentato il grafico delle combinazioni permesse tenendo in considerazione le proprietà delle triplette 13 - 18, ed in particolare sono illustrate una prima tripletta 13, una seconda tripletta 14, una terza tripletta 15, una quarta tripletta 16, una quinta tripletta 17 ed una sesta tripletta 18 comprendenti tre istogrammi 12 ciascuna. In fig. 6 shows the graph of the allowed combinations taking into account the properties of the triplets 13 - 18, and in particular a first triplet 13, a second triplet 14, a third triplet 15, a fourth triplet 16, a fifth triplet 17 and a sixth triplet 18 comprising three histograms 12 each.

PROPRIETÀ' DELLE TRIPLETTE OWNERSHIP OF TRIPLETS

Una prima proprietà afferma che ogni tripletta 13 - 18 possiede uno ed un solo istogramma 12 multiplo di tre, indicato in seguito il numero 19, che rappresenta un multiplo di tre ed esso presenta altezza massima all’interno di ogni tripletta 13 - 18, per costruzione degli istogrammi 12. A first property states that each triplet 13 - 18 has one and only one histogram 12 multiple of three, later indicated the number 19, which represents a multiple of three and it has maximum height within each triplet 13 - 18, for construction of histograms 12.

Una seconda proprietà afferma che nessun istogramma 12 appartenente ad una tripletta 13 - 18 potrà mai essere multiplo dello stesso numero primo di un altro istogramma 12 nella stessa tripletta 13 - 18. Non potranno quindi esserci istogrammi 12 ad altezza uguale appartenenti alla stessa tripletta 13 - 18; nel caso in cui ci sia un incremento di RV, tutte le altezze dei precedenti elementi sono da considerarsi incrementate di uno. A second property states that no histogram 12 belonging to a triplet 13 - 18 can ever be a multiple of the same prime number of another histogram 12 in the same triplet 13 - 18. There can therefore be no histograms 12 of equal height belonging to the same triplet 13 - 18; if there is an increase in RV, all the heights of the previous elements are to be considered increased by one.

Una terza proprietà afferma che ogni istogramma multiplo di tre 19 possiede altezza locale massima; nel caso in cui ci sia un incremento di RV in un elemento della tripletta 13 - 18, tutte le altezze degli elementi precedenti all'incremento sono da considerarsi aumentate di uno. A third property states that every multiple histogram of three 19 has maximum local height; if there is an increase in RV in an element of the triplet 13 - 18, all the heights of the elements preceding the increase are to be considered increased by one.

Dalla prima, seconda e terza proprietà si può ricavare che le possibili triplette 13 -18 sono esclusivamente quelle di fig. 6. From the first, second and third properties it can be deduced that the possible triplets 13 -18 are exclusively those of fig. 6.

A titolo d’esempio, identificando in modo più preciso gli istogrammi 12 appartenenti alle varie triplette 13 - 18, la prima tripletta 13 presenta a sinistra un istogramma minore 20, centralmente l’istogramma multiplo di tre 19 e a destra un istogramma mediano 21, di altezza compresa tra Γ istogramma minore 20 e l’istogramma multiplo di tre 19. By way of example, by identifying more precisely the histograms 12 belonging to the various triplets 13 - 18, the first triplet 13 presents on the left a minor histogram 20, in the center the multiple histogram of three 19 and on the right a median histogram 21, of height between Γ minor histogram 20 and multiple of three histogram 19.

Nelle restanti triplette 14 - 18 sono presenti, in modo analogo alla prima tripletta 13, l’istogramma minore 20, l’istogramma multiplo di tre 19 e l’istogramma mediano 21. In the remaining triplets 14 - 18 there are, in a similar way to the first triplet 13, the minor histogram 20, the multiple histogram of three 19 and the median histogram 21.

Ad esempio, la seconda tripletta 14 presenta a sinistra l’istogramma mediano 21, centralmente l’istogramma minore 20 e a destra l’istogramma multiplo di tre 19. Le triplette 13 - 18 rappresentano, inoltre, in base alla prima proprietà, seconda proprietà e terza proprietà, tutte le possibili combinazioni che alternano un istogramma minore 20, un istogramma multiplo di tre 19 ed un istogramma mediano 21. For example, the second triplet 14 has the median histogram 21 on the left, the minor histogram 20 in the center and the multiple of three histogram 19 on the right. third property, all the possible combinations that alternate a minor histogram 20, a multiple histogram of three 19 and a median histogram 21.

In considerazione di quanto fino ad ora esposto, è possibile, quindi, poter gestire e mantenere correttamente e stabilmente una tabella dei moduli delle distanze dai numeri primi trovati senza ricorrere ad operazioni modulari e/o moltiplicazioni. Fanno eccezione i casi di incremento di RV, in cui la distanza dai numeri primi maggiori del precedente RV, fino all'attuale RV, verrà posta uguale alla distanza tra PPOS e la posizione del corrispettivo numero primo. In consideration of what has been explained up to now, it is therefore possible to manage and maintain correctly and stably a table of the modules of the distances from the prime numbers found without resorting to modular operations and / or multiplications. The exceptions are the cases of RV increase, in which the distance from the major prime numbers of the previous RV, up to the current RV, will be set equal to the distance between PPOS and the position of the corresponding prime number.

In fig. 7a è illustrato un esempio successione di istogrammi 12, dalla quale è possibile ricavare una successione di triplette 13 - 18. In fig. 7a illustrates an example of a succession of histograms 12, from which it is possible to obtain a succession of triplets 13 - 18.

La successione delle triplette è ottenuta partendo dall 'istogramma 12 appartenente al multiplo di valore minore, ovvero partendo da sinistra, e considerando tre istogrammi 12 continui. The sequence of the triplets is obtained starting from the histogram 12 belonging to the multiple of smaller value, that is, starting from the left, and considering three continuous histograms 12.

Successivamente ci si sposta di un istogramma 12 verso destra e si valutano altri tre istogrammi 12 continui e, in particolare, valutando l’appartenenza ad una diversa tripletta 13 - 18. Subsequently, a histogram 12 is moved to the right and another three histograms 12 are evaluated continuously and, in particular, by evaluating whether they belong to a different triplet 13 - 18.

Nel caso di specie la successione è: In the present case, the succession is:

13 - 16 - 14 - 17 - 16 - 14 - 13 - 15 - 18 -17 -16 - 14 13 - 16 - 14 - 17 - 16 - 14 - 13 - 15 - 18 -17 -16 - 14

In fig. 7b è invece riportato uno schema di flusso 30 nel quale le frecce 23 indicano il passaggio da una tripletta 13 - 18 a quella successiva, quest’ultima indicata con la punta 24 di ogni freccia 23. In fig. 7b instead shows a flow chart 30 in which the arrows 23 indicate the transition from a triplet 13 - 18 to the next one, the latter indicated with the tip 24 of each arrow 23.

La fig. 7c rappresenta uno schema di flusso sintetizzato 31, tramite un algoritmo di sintesi, dello schema di flusso 30, ma applicabile anche ad altre forme applicative di istogrammi 12 utilizzati nel metodo secondo il presente trovato. Fig. 7c represents a synthesized flow chart 31, by means of a synthesis algorithm, of the flow chart 30, but applicable also to other application forms of histograms 12 used in the method according to the present invention.

La fig. 7c illustra, inoltre, possibili associazioni di triplette 13 - 18, ottenibili dallo schema di flusso sintetizzato, considerando combinazioni di quattro istogrammi consecutivi, in particolare sono illustrate configurazioni di triplette 16 14, 15 18 e 14 13. Fig. 7c also illustrates possible associations of triplets 13 - 18, obtainable from the synthesized flow diagram, considering combinations of four consecutive histograms, in particular configurations of triplets 16 14, 15 18 and 14 13 are illustrated.

In forme di realizzazione del secondo algoritmo, l’utilizzo delle triplette 13 - 18 comprendenti P istogramma mediano 21, l’ istogramma minore 20 e l’ istogramma multiplo di tre 19 permette, inoltre, di eseguire controlli sulla correttezza dei moduli delle distanze trovati. In embodiments of the second algorithm, the use of triplets 13 - 18 comprising the median P histogram 21, the minor histogram 20 and the multiple histogram of three 19 also allows to perform checks on the correctness of the distance modules found.

A titolo d’esempio, se all’interno di una qualsiasi tripletta 13 - 18 è presente un istogramma 12 maggiore dell’ istogramma multiplo di tre 19, allora si è verificato un errore ed il secondo algoritmo può prevedere meccanismi di correzione o di segnalazione ad un utente. By way of example, if within any triplet 13 - 18 there is a histogram 12 greater than the multiple histogram of three 19, then an error has occurred and the second algorithm can provide for correction or signaling mechanisms. a user.

Un ulteriore errore può verificarsi nel caso istogramma multipli di tre 19 di due triplette 13 - 18 adiacenti presentino altezza diversa. A further error may occur if histogram multiples of three 19's of two adjacent triplets 13 - 18 have different heights.

Nel seguito vengono proposti una serie di CASISTICHE riguardanti il secondo algoritmo e la suddivisione degli istogrammi in triplette 13 - 18, che portano a chiarire una possibile realizzazione operativa. In the following a series of CASES are proposed regarding the second algorithm and the subdivision of the histograms into triplets 13 - 18, which lead to clarify a possible operational implementation.

CASISTICHE CASES

Nel caso di serie continue rappresentate dalla terza tripletta 15 (fig. 6 e 7a), in cui le posizioni all'intemo dell'insieme dei numeri primi, LOP1 ed LOP2, dei più piccoli numeri che dividono gli ultimi 2 multipli associati alla terza tripletta 15, sono entrambe minori delle posizioni di due più grandi numeri primi chiamati MINGAP e POSC2 divisori di un elemento della serie di multipli che va dall'ultimo numero primo trovato fino al PPOS in esame, o al più LOP2 è minore di POSC2, è necessario mantenere aggiornata un'ulteriore tabella LTABLE, oltre alla tabella PRIMELINE che nel caso di specie contiene sia i numeri primi trovati sia i moduli delle distanze ad essi relative. Ad ogni elemento di LTABLE verrà associata una tema di valori: LOP1, LOP2 e il PPOS di LOP2, chiamato LPPOS. In the case of continuous series represented by the third triplet 15 (fig. 6 and 7a), in which the positions within the set of prime numbers, LOP1 and LOP2, of the smallest numbers that divide the last 2 multiples associated with the third triplet 15, are both smaller than the positions of two largest prime numbers called MINGAP and POSC2 divisors of an element of the series of multiples that goes from the last prime number found up to the PPOS in question, or at most LOP2 is less than POSC2, it is necessary keep an additional LTABLE table updated, in addition to the PRIMELINE table which in this case contains both the prime numbers found and the distance modules relating to them. Each element of LTABLE will be associated with a theme of values: LOP1, LOP2 and the PPOS of LOP2, called LPPOS.

In presenza di una o più triplette 14 13 si dovrà mantenere aggiornata una terza tabella DTABLE a causa dell'andamento approssimativamente sinusoidale, indicato dalla linea di profilo 25, delle altezze degli istogrammi 12 di fig. 8. In the presence of one or more triplets 14 13, a third table DTABLE must be kept updated due to the approximately sinusoidal trend, indicated by the profile line 25, of the heights of the histograms 12 of fig. 8.

Ad ogni elemento presente nella tabella DTABLE è associato il corrispettivo LOP1 della prima tripletta 13, cioè il LOP2 della seconda tripletta 14, ed il suo PPOS, chiamato DPPOS. Un nuovo elemento viene inserito in tabella solo nel caso in cui LOP1 sia minore di MINGAP e di POSC2. Altrimenti, nel caso in cui la nuova coppia di valori da inserire avesse LOP1 uguale a quello di altri elementi nella tabella DTABLE, allora il DPPOS di quest'ultimo elemento precedentemente presente in tabella DTABLE verrebbe posto uguale al DPPOS del nuovo elemento, il quale non verrà, quindi, inserito nella tabella DTABLE. Each element present in the DTABLE table is associated with the corresponding LOP1 of the first triplet 13, ie the LOP2 of the second triplet 14, and its PPOS, called DPPOS. A new element is inserted in the table only if LOP1 is less than MINGAP and POSC2. Otherwise, if the new pair of values to be inserted had LOP1 equal to that of other elements in the DTABLE table, then the DPPOS of the latter element previously present in the DTABLE table would be set equal to the DPPOS of the new element, which is not it will then be inserted into the DTABLE table.

MINGAP, POSC2 ed ogni elemento delle tabelle DTABLE e LTABLE sono necessari per poter gestire correttamente gli incrementi non effettuati delle distanze associate ai numeri primi in posizioni superiori a quella del più piccolo divisore primo corrispondente a ciascun istogramma 12. MINGAP, POSC2 and each element of the DTABLE and LTABLE tables are necessary in order to correctly manage the unsuccessful increments of the distances associated with the prime numbers in positions greater than that of the smallest prime divisor corresponding to each histogram 12.

Le tabelle DTABLE e LTABLE permettono sostanzialmente di immagazzinare le informazioni riguardanti i multipli esaminati associati alle rispettive configurazioni degli istogrammi 12, ed in particolare associare gruppi di multipli a determinate triplette 13 - 18. The DTABLE and LTABLE tables allow substantially to store the information concerning the multiples examined associated with the respective configurations of the histograms 12, and in particular to associate groups of multiples to certain triplets 13 - 18.

GESTIONE INCREMENTI INCREASE MANAGEMENT

In forme di realizzazione del secondo algoritmo vengono tenuti in considerazione gli ultimi 2 elementi di ogni tripletta 13 - 18, dei quali le posizioni dei più piccoli numeri primi che dividono i multipli associati compongono i primi 2 valori, chiamati rispettivamente OP1 ed OP2, della terna JUMP contenente come terzo elemento la distanza GAP, dall'ultimo numero primo trovato. In embodiments of the second algorithm, the last 2 elements of each triplet 13 - 18 are taken into consideration, of which the positions of the smallest prime numbers that divide the associated multiples make up the first 2 values, respectively called OP1 and OP2, of the triad JUMP containing as a third element the GAP distance, from the last prime number found.

Se GAP>0 e la posizione, chiamata J del numero primo ACTUAL_PRIME in considerazione è maggiore di OP2 e, o non è appena avvenuto un incremento di RV, o ACTUALJPRIME<=RV-2 implica che: If GAP> 0 and the position, called J of the prime number ACTUAL_PRIME under consideration is greater than OP2 and, either an increase in RV has just occurred, or ACTUALJPRIME <= RV-2 implies that:

Se J>MINGAP e J>OPl allora la distanza di PPOS da ACTUAL_PRIME, associata ad ACTUAL_PRIME in PRIMELINE che per comodità chiameremo ACTUAL_PRIME_DIST, verrà incrementata di GAP. If J> MINGAP and J> OPl then the distance of PPOS from ACTUAL_PRIME, associated with ACTUAL_PRIME in PRIMELINE which for convenience we will call ACTUAL_PRIME_DIST, will be increased by GAP.

In caso contrario: If not:

Se OPl>OP2 e J<=OPl e J diverso da 1, allora ACTUAL_PRIME_DIST, salvata in PRIMELINE, verrà incrementata di 2. If OPl> OP2 and J <= OPl and J different from 1, then ACTUAL_PRIME_DIST, saved in PRIMELINE, will be incremented by 2.

Altrimenti, se non ci sono elementi nella tabella LTABLE e J>POSC2 allora ACTUAL_PRIME_DIST verrà incrementata della distanza di PPOS da MINGAP, chiamata CI neH'algoritmo. Otherwise, if there are no elements in the LTABLE table and J> POSC2 then ACTUAL_PRIME_DIST will be incremented by the distance of PPOS from MINGAP, called CI in the algorithm.

Altrimenti, sempre se la tabella LTABLE è vuota ma ci sono elementi in DTABLE, allora: Otherwise, again if the LTABLE table is empty but there are elements in DTABLE, then:

Se J è maggiore del LOP1 dell'ultimo elemento in DTABLE, chiamato DOPI, significa che suddetto elemento deve essere rimosso dalla tabella DTABLE e se presente nella tabella DTABLE non ci fossero più elementi allora ACTUAL_PRIME_DIST verrà incrementata della distanza di PPOS da POSC2, chiamata C2 neH'algoritmo, mentre in caso ci fossero ancora elementi allora ACTUAL_PRIME_DIST verrà incrementata della distanza di PPOS dal DPPOS dell'ultimo elemento nella tabella DTABLE. If J is greater than the LOP1 of the last element in DTABLE, called DOPI, it means that this element must be removed from the DTABLE table and if there are no more elements in the DTABLE table then ACTUAL_PRIME_DIST will be increased by the distance of PPOS from POSC2, called C2 in the algorithm, while if there are still elements then ACTUAL_PRIME_DIST will be increased by the distance of PPOS from the DPPOS of the last element in the DTABLE table.

Se, invece, J<=DOPl allora ACTUAL_PRIME_DIST verrebbe incrementata della distanza di PPOS dal DPPOS dell'ultimo elemento in DTABLE. If, on the other hand, J <= DOPl then ACTUAL_PRIME_DIST would be increased by the distance of PPOS from the DPPOS of the last element in DTABLE.

Se, altresì, non ci fossero elementi in nessuna tra le tabelle DTABLE ed LTABLE, allora ACTUAL_PRIME_DIST verrebbe incrementata della distanza di PPOS da C2. Also, if there were no elements in any of the DTABLE and LTABLE tables, then ACTUAL_PRIME_DIST would be incremented by the distance of PPOS from C2.

Se, invece, ci fossero elementi nella tabella LTABLE e quindi si fosse a distanza 2 dall'ultimo multiplo di 3, allora: If, on the other hand, there were elements in the LTABLE table and therefore we were at a distance of 2 from the last multiple of 3, then:

Se J fosse minore od uguale al LOP2 dell'ultimo elemento nella tabella LTABLE allora: If J were less than or equal to the LOP2 of the last element in the LTABLE table then:

Se ci fossero elementi in DTABLE e LOP2>=DOPl, allora: If there were elements in DTABLE and LOP2> = DOPl, then:

Se J>DOPl, allora verrebbe rimosso l'ultimo elemento dalla tabella DTABLE e quindi nel caso in cui non ci fossero più elementi nella tabella DTABLE o DOPl>LOP2, ACTUAL_PRIME_DIST verrebbe incrementata con la distanza di PPOS da LPPOS dell'ultimo elemento in LTABLE, mentre nel caso opposto ACTUAL_PRIME_DIST verrebbe incrementata della distanza di PPOS dal DPPOS dell'ultimo elemento in DTABLE. If J> DOPl, then the last element would be removed from the DTABLE table and so if there were no more elements in the DTABLE table or DOPl> LOP2, ACTUAL_PRIME_DIST would be incremented with the distance of PPOS from LPPOS of the last element in LTABLE , while in the opposite case ACTUAL_PRIME_DIST would be increased by the distance of PPOS from the DPPOS of the last element in DTABLE.

Altrimenti, ACTUAL_PRIME_DIST verrebbe incrementata della distanza di PPOS dal DPPOS dell'ultimo elemento nella tabella DTABLE. Otherwise, ACTUAL_PRIME_DIST would be incremented by the distance of PPOS from the DPPOS of the last element in the DTABLE table.

Altrimenti, ACTUAL_PRIME_DIST verrebbe incrementata della distanza di PPOS da LPPOS dell'ultimo elemento nella tabella LTABLE. Otherwise, ACTUAL_PRIME_DIST would be incremented by the distance of PPOS from LPPOS of the last element in the LTABLE table.

Mentre se J>LOP2 e J minore od uguale al LOP1 dell’ultimo elemento in LTABLE allora: While if J> LOP2 and J less than or equal to the LOP1 of the last element in LTABLE then:

ACTUAL_PRIME_DIST verrebbe incrementata di 1 più la distanza di PPOS dal LPPOS dell'ultimo elemento nella tabella LTABLE. Se ci sono elementi nella tabella DTABLE e J>DOPl allora verrebbe rimosso l'ultimo elemento dalla tabella DTABLE. Se J fosse uguale al LOP1 dell’ultimo elemento in LTABLE, allora verrebbe rimosso l'ultimo elemento dalla tabella LTABLE. ACTUAL_PRIME_DIST would be incremented by 1 plus the distance of PPOS from the LPPOS of the last element in the LTABLE table. If there are elements in the DTABLE table and J> DOPl then the last element would be removed from the DTABLE table. If J were equal to the LOP1 of the last element in LTABLE, then the last element would be removed from the LTABLE table.

Altrimenti se J<=OP2, allora ACTUAL_PRIME_DIST viene incrementata solamente di 1. Otherwise if J <= OP2, then ACTUAL_PRIME_DIST is only incremented by 1.

Nel caso in cui ACTUAL_PRIME_DIST fosse maggiore di ACTUAL_PRIME stesso allora essa sarebbe posta uguale al modulo tra la distanza effettiva (non ACTU AL_PRIME_DI ST ! ) ed ACTUAL PRIME. If ACTUAL_PRIME_DIST were greater than ACTUAL_PRIME itself then it would be set equal to the module between the effective distance (not ACTU AL_PRIME_DI ST!) And ACTUAL PRIME.

MANTENIMENTO TABELLE MAINTENANCE OF TABLES

Se si sta per inserire un elemento nella tabella LTABLE e già ci sono altri elementi nella tabella LTABLE e OP2 è maggiore del LOP2 dell’ultimo elemento in LTABLE, allora suddetto LOP2 viene posto uguale ad OP2, in quanto altrimenti avverrebbe una sovrapposizione tra alcuni elementi della tabella LTABLE. If you are about to insert an element in the LTABLE table and there are already other elements in the LTABLE table and OP2 is greater than the LOP2 of the last element in LTABLE, then said LOP2 is set equal to OP2, as otherwise there would be an overlap between some elements of the LTABLE table.

In presenza di una o più triplette 14 13, nel caso in cui ci siano elementi nella tabella LTABLE ed OP1 è maggiore del LOP2 dell’ultimo elemento in LTABLE, allora LOP2=OPl, in quanto altrimenti avverrebbe una sovrapposizione tra alcuni elementi della tabella LTABLE. In the presence of one or more triplets 14 13, if there are elements in the LTABLE table and OP1 is greater than the LOP2 of the last element in LTABLE, then LOP2 = OPl, as otherwise there would be an overlap between some elements of the LTABLE table .

È chiaro che al metodo per migliorare le prestazioni di un elaboratore elettronico fin qui descritto possono essere apportate modifiche e/o aggiunte di parti, senza per questo uscire dall’ambito del presente trovato. It is clear that modifications and / or additions of parts may be made to the method for improving the performance of an electronic computer described so far, without thereby departing from the scope of the present invention.

E anche chiaro che, sebbene il presente trovato sia stato descritto con riferimento ad alcuni esempi specifici, una persona esperta del ramo potrà senz’altro realizzare molte altre forme equivalenti di metodo per migliorare le prestazioni di un elaboratore elettronico, aventi le caratteristiche espresse nelle rivendicazioni e quindi tutte rientranti nell’ambito di protezione da esse definito. It is also clear that, although the present invention has been described with reference to some specific examples, a person skilled in the art will certainly be able to realize many other equivalent forms of method for improving the performance of an electronic computer, having the characteristics expressed in the claims and therefore all fall within the scope of protection defined by them.

Claims (7)

RIVENDICAZIONI 1. Metodo per migliorare le prestazioni di un elaboratore elettronico (200), in particolare nella fattorizzazione di un numero ed applicabile nella sicurezza informatica, caratterizzato dal fatto che comprende: - una fase di inserimento (100) di un numero input appartenente all'insieme dei numeri naturali; - iniziare un ciclo iterativo con iteratore PPOS inizialmente uguale ad 1 fino ad un massimo pari alla parte intera della metà della radice quadrata del numero input, in cui il ciclo iterativo comprende l’iterazione delle seguenti fasi i) - v): i) una fase di controllo salto (101) per controllare se effettuare un salto in base ad un criterio di raggruppamento e densità di numeri primi, in caso contrario avviene un normale incremento di 1 di PPOS; ii) una fase di gestione dei limiti di radice (102), in cui se il numero primo più grande e minore del valore della radice quadrata di PPOS*2+l è maggiore di un precedente numero primo usato come limite di radice, allora esso risulta essere il nuovo limite di radice; iii) una fase di definizione di gruppi (103) in cui si definisce un numero (G) di gruppi di n numeri (Gn), in cui n è un numero naturale, utilizzando come estremi di un segmento della retta dei numeri naturali i multipli di n a partire da n, in cui in ogni gruppo (Gn) sono previsti un predefinito numero di numeri dispari; iv) una fase di esecuzione di un primo algoritmo (104.1) basato su aritmetica modulare oppure di un secondo algoritmo (104.2) basato su operazioni lineari eseguito sui numeri dispari individuati nella fase iii) (103), in funzione del numero di numeri dispari previsti in ciascuno dei gruppi di n numeri (Gn), per verificare se PPOS*2+l è un numero primo; v) una fase di controllo (105) che prevede che: - se PPOS*2+l è un numero primo, si controlla che non sia un divisore del numero in input ed in caso contrario viene restituito come risultato PPOS*2+l, che rappresenta il numero primo più piccolo e fattore del numero in input; - se PPOS raggiunge la parte intera della metà della radice quadrata del numero in input senza che alcun fattore sia trovato, allora viene restituito il valore del numero in input, in quanto numero primo. CLAIMS 1. Method for improving the performance of an electronic computer (200), in particular in the factoring of a number and applicable in IT security, characterized by the fact that it includes: - an insertion step (100) of an input number belonging to the set of natural numbers; - start an iterative cycle with PPOS iterator initially equal to 1 up to a maximum equal to the integer part of half the square root of the input number, in which the iterative cycle includes the iteration of the following phases i) - v): i) a jump control step (101) to check whether to perform a jump on the basis of a criterion of grouping and density of prime numbers, otherwise a normal increase of 1 of PPOS occurs; ii) a phase of managing the root limits (102), in which if the prime number greater and less than the value of the square root of PPOS * 2 + l is greater than a previous prime number used as the root limit, then it turns out to be the new root limit; iii) a phase of defining groups (103) in which a number (G) of groups of n numbers (Gn) is defined, in which n is a natural number, using multiples as extremes of a segment of the line of natural numbers of n starting from n, in which in each group (Gn) there are a predefined number of odd numbers; iv) an execution phase of a first algorithm (104.1) based on modular arithmetic or of a second algorithm (104.2) based on linear operations performed on the odd numbers identified in step iii) (103), depending on the number of odd numbers provided in each of the groups of n numbers (Gn), to check if PPOS * 2 + l is a prime number; v) a control phase (105) which provides that: - if PPOS * 2 + l is a prime number, it is checked that it is not a divisor of the number in input and otherwise it is returned as a result PPOS * 2 + l, which represents the smallest prime number and factor of the number in input ; - if PPOS reaches the integer part of half the square root of the input number without any factor being found, then the value of the input number is returned, as a prime number. 2. Metodo come nella rivendicazione 1, in cui il primo algoritmo (104.1), mediante aritmetica modulare, controlla che (PPOS*2+l) non sia multiplo di alcun numero primo in una tabella (PRIMELINE) di numeri primi popolata dinamicamente, maggiore di 1 e più piccolo del limite di radice, calcolando ogni volta, tramite moltiplicazioni e divisioni, il modulo della distanza tra PPOS ed i numeri primi stessi, in cui se tale modulo è pari a 0 allora PPOS*2+l è un multiplo e l'operazione è eseguita finché non è stato trovato nè alcun multiplo, nè alcun primo ed un iteratore J è minore al numero di elementi nella tabella (PRIMELINE). 2. Method as in claim 1, wherein the first algorithm (104.1), by means of modular arithmetic, checks that (PPOS * 2 + l) is not a multiple of any prime number in a dynamically populated table (PRIMELINE) of prime numbers, greater of 1 and smaller than the root limit, calculating each time, through multiplications and divisions, the modulus of the distance between PPOS and the primes themselves, where if this modulus is equal to 0 then PPOS * 2 + l is a multiple and the operation is performed until neither multiple nor prime has been found and an iterator J is less than the number of elements in the table (PRIMELINE). 3. Metodo come nella rivendicazione 1, in cui il secondo algoritmo (104.2), usando operazioni lineari, prevede di mantenere aggiornate 3 diverse tabelle (PRIMELINE, LTABLE, DTABLE) per poter gestire incrementi non effettuati delle distanze associate ai numeri primi, fino al limite di radice, in posizioni superiori a quella del più piccolo divisore primo corrispondente a rispettivi istogrammi, in cui ogni modulo di distanza è quindi ottenuto dai moduli, o resti della divisione, precedentemente confrontati e salvati in una tabella (PRIMELINE) di numeri primi e di distanza popolata dinamicamente, in cui se la distanza da un numero primo è uguale a 0 o è uguale al numero primo stesso allora PPOS*2+l è un multiplo di quel primo e l'operazione è eseguita finché non è stato trovato nè alcun multiplo, nè alcun primo ed un iteratore J è minore al numero di elementi nella tabella (PRIMELINE), in cui se PPOS*2+l è un numero primo, ed inoltre vengono previste altre due tabelle (LTABLE, DTABLE) configurate per immagazzinare le informazioni riguardanti i multipli esaminati, associati alle rispettive configurazioni degli istogrammi (12), ed in particolare associare gruppi di multipli a determinate triplette (13 - 18) di configurazioni degli istogrammi (12) pre-identificate, dette due tabelle (LTABLE, DTABLE) vengono svuotate e due parametri corrispondenti a posizioni di due più grandi numeri primi divisori di un elemento della serie di multipli che va dall'ultimo numero primo trovato fino al PPOS in esame (MINGAP, C2) vengono impostati ad un valore di partenza. 3. Method as in claim 1, in which the second algorithm (104.2), using linear operations, provides to keep updated 3 different tables (PRIMELINE, LTABLE, DTABLE) in order to manage unexecuted increments of the distances associated with the prime numbers, up to root limit, in positions higher than that of the smallest prime divisor corresponding to respective histograms, in which each distance module is then obtained from the modules, or remainders of the division, previously compared and saved in a table (PRIMELINE) of prime numbers and dynamically populated distance, where if the distance from a prime number equals 0 or equals the prime number itself then PPOS * 2 + l is a multiple of that prime and the operation is performed until no one is found multiple, no prime and an iterator J is less than the number of elements in the table (PRIMELINE), where if PPOS * 2 + l is a prime number, and also two other tables (LTABLE, DTABLE) are provided with figured to store the information regarding the multiples examined, associated with the respective configurations of the histograms (12), and in particular to associate groups of multiples to certain triplets (13 - 18) of pre-identified histogram configurations (12), called two tables ( LTABLE, DTABLE) are emptied and two parameters corresponding to positions of two largest prime numbers divisors of an element of the series of multiples that goes from the last prime number found up to the PPOS in question (MINGAP, C2) are set to a value of departure. 4. Metodo come nella rivendicazione 1, 2 o 3, in cui il numero n di numeri di un gruppo (Gn) è maggiore od uguale a 7. 4. Method as in claim 1, 2 or 3, wherein the number n of numbers of a group (Gn) is greater than or equal to 7. 5. Metodo come nella rivendicazione 1, 2 o 3, in cui il numero n di numeri di un gruppo (Gn) è uguale a 7 e se il numero (G) di gruppi (Gn) è dispari, il gruppo (Gn) contiene 3*G (G-l)/2 o 3*G (G-l)/2 1 numeri dispari, mentre se il numero (G) di gruppi (Gn) è pari, contiene 7*G/2 numeri dispari. 5. Method as in claim 1, 2 or 3, in which the number n of numbers of a group (Gn) is equal to 7 and if the number (G) of groups (Gn) is odd, the group (Gn) contains 3 * G (G-l) / 2 or 3 * G (G-l) / 2 1 odd numbers, while if the number (G) of groups (Gn) is even, it contains 7 * G / 2 odd numbers. 6. Elaboratore elettronico configurato per l’esecuzione di un metodo come in una qualsiasi delle rivendicazioni precedenti, comprendente un’unità di elaborazione centrale (201), una memoria elettronica (202), una banca dati elettronica (203) e circuiti ausiliari, in cui l’unità di elaborazione centrale (201) è configurata per effettuare i calcoli ed i controlli delle fasi (101, 102, 103, 104.1, 104.2, 105), la memoria elettronica (202) è configurata per memorizzare, in modo temporaneo o definitivo, i risultati dei calcoli e controlli delle fasi (101, 102, 103, 104.1, 104.2, 105), la banca dati elettronica (203) è configurata per organizzare, gestire e rendere disponibili i risultati dei calcoli e controlli delle fasi (101, 102, 103, 104.1, 104.2, 105). 6. Electronic computer configured for carrying out a method as in any one of the preceding claims, comprising a central processing unit (201), an electronic memory (202), an electronic database (203) and auxiliary circuits, in wherein the central processing unit (201) is configured to perform the calculations and checks of the phases (101, 102, 103, 104.1, 104.2, 105), the electronic memory (202) is configured to store, temporarily or final, the results of the calculations and checks of the phases (101, 102, 103, 104.1, 104.2, 105), the electronic database (203) is configured to organize, manage and make available the results of the calculations and checks of the phases (101 , 102, 103, 104.1, 104.2, 105). 7. Programma per computer memorizzabile in un mezzo leggibile da un computer che contiene le istruzioni che, una volta eseguite da un elaboratore elettronico (200), determinano l’esecuzione di un metodo come in una qualsiasi delle rivendicazioni da 1 a 5.7. Computer program that can be stored in a computer readable medium that contains the instructions which, once executed by an electronic computer (200), determine the execution of a method as in any of claims 1 to 5.
IT000122A 2013-09-25 2013-09-25 METHOD TO IMPROVE THE PERFORMANCE OF AN ELECTRONIC PROCESSOR ITUD20130122A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
IT000122A ITUD20130122A1 (en) 2013-09-25 2013-09-25 METHOD TO IMPROVE THE PERFORMANCE OF AN ELECTRONIC PROCESSOR

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
IT000122A ITUD20130122A1 (en) 2013-09-25 2013-09-25 METHOD TO IMPROVE THE PERFORMANCE OF AN ELECTRONIC PROCESSOR

Publications (1)

Publication Number Publication Date
ITUD20130122A1 true ITUD20130122A1 (en) 2015-03-26

Family

ID=49887147

Family Applications (1)

Application Number Title Priority Date Filing Date
IT000122A ITUD20130122A1 (en) 2013-09-25 2013-09-25 METHOD TO IMPROVE THE PERFORMANCE OF AN ELECTRONIC PROCESSOR

Country Status (1)

Country Link
IT (1) ITUD20130122A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BE1016982A6 (en) * 2006-02-08 2007-11-06 Laureyssens Dirk Prime number calculation method for e.g. computers, comprises generating two series of numbers using two different algorithms and then eliminating non prime numbers using elimination algorithms
US7711666B1 (en) * 2005-08-31 2010-05-04 Richard Crandall Reduction of memory usage for prime number storage by using a table of differences between a closed form numerical function and prime numbers which bounds a prime numeral between two index values
CN102325024A (en) * 2011-09-26 2012-01-18 飞天诚信科技股份有限公司 Method and device for generating big prime
US8219601B1 (en) * 2010-03-10 2012-07-10 Henry Lepe Method for operating a computer for generating a comprehensive and exclusive list of prime numbers

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7711666B1 (en) * 2005-08-31 2010-05-04 Richard Crandall Reduction of memory usage for prime number storage by using a table of differences between a closed form numerical function and prime numbers which bounds a prime numeral between two index values
BE1016982A6 (en) * 2006-02-08 2007-11-06 Laureyssens Dirk Prime number calculation method for e.g. computers, comprises generating two series of numbers using two different algorithms and then eliminating non prime numbers using elimination algorithms
US8219601B1 (en) * 2010-03-10 2012-07-10 Henry Lepe Method for operating a computer for generating a comprehensive and exclusive list of prime numbers
CN102325024A (en) * 2011-09-26 2012-01-18 飞天诚信科技股份有限公司 Method and device for generating big prime
US20130304779A1 (en) * 2011-09-26 2013-11-14 Feitian Technologies Co., Ltd. Method and device for generating big prime

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
COUVREUR C ET AL: "INTRODUCTION TO FAST GENERATION OF LARGE PRIME NUMBERS", PHILIPS JOURNAL OF RESEARCH,, vol. 37, no. 5/06, 1982, ELSEVIER, AMSTERDAM, NL, pages 231 - 264, XP000915355, ISSN: 0165-5817 *
MENEZES A J ET AL: "HANDBOOK OF APPLIED CRYPTOGRAPHY", part sections 4.1-4.4 1997, CRC PRESS, BOCA RATON, FL, USA, ISBN: 978-0-8493-8523-0, article "Public key parameters", pages: 133 - 154, XP002241264 *
P. GIBLIN: "Primes and Programming", part Chapter 2 1993, CAMBRIDGE UNIVERSITY PRESS, Cambridge, UK, ISBN: 0-521-40988-8, article "Listing Primes", pages: 37 - 68, XP002145064 *

Similar Documents

Publication Publication Date Title
Gaubert et al. Modeling and analysis of timed Petri nets using heaps of pieces
CN109558479A (en) Rule matching method, device, equipment and storage medium
CN109522382A (en) Spatial data gridding statistical method and device
CN103543901B (en) The method and apparatus generating menu
CN103425692B (en) Data export method and device
Drwal et al. Complexity of interval minmax regret scheduling on parallel identical machines with total completion time criterion
CN108073687A (en) Random walk, random walk method, apparatus and equipment based on cluster
CN106250110A (en) Set up the method and device of model
CN107402942B (en) Indexing method and device
CN109977373A (en) Identification number assignment method, identification number recovery method and device
CN107077766A (en) The bank note distribution method and system of a kind of self-aided terminal note output
CN107368451A (en) Circuit state space equation computational methods, device and system
JP5972472B2 (en) Data processing apparatus, data processing method, and program
ITUD20130122A1 (en) METHOD TO IMPROVE THE PERFORMANCE OF AN ELECTRONIC PROCESSOR
CN108874491A (en) The method and device of information load
Lozano et al. On the maximum common embedded subtree problem for ordered trees
Bartolini et al. Algorithms for the non-bifurcated network design problem
CN108334305A (en) A kind of division operation method, device, equipment and storage medium
CN106469042B (en) The generation method and device of pseudo random number
JP5060515B2 (en) Ground-to-ground traffic estimation method, ground-to-ground traffic estimation device and program
Grossi et al. Colored range searching in linear space
CN110895479B (en) Data processing method, device and equipment
CN104408023A (en) Index calculation method and index calculator
Husfeldt Invitation to algorithmic uses of inclusion–exclusion
Munro et al. Succinct posets