Il programma di lavoro registrato nella eprom di un elaboratore elettronico adibito ad esempio al governo di una macchina confezionatrice di prodotti con film estensibile, od altra macchina automatica, può attualmente essere copiato con estrema facilità. Scopo del trovato è ovviare a questo inconveniente con l'abbinamento interattivo al detto elaboratore elettronico, di una unità elettronica di sicurezza, nel seguito denominata per semplicità "chiave", che ha il compito di attivare o disattivare funzioni o programmi speciali nello stesso elaboratore.
La chiave è costituita da una minischeda in SMD, alloggiata in un contenitore di piccole dimensioni, annegata in una resina speciale ed è dotata di un single chip che può essere mascherato oppure programmato una sola volta. La chiave è un sistema chiuso ed autonomo, contenente nel proprio interno prom, ram ed eeprom ed è collegabile per via seriale all'elaboratore principale, senza portare all'esterno bus ed altri segnali e ciò per garantire una grande sicurezza contro copiature.
Per poter salvaguardare la totalità del programma dell'elaboratore principale, il programma di tale elaboratore può essere scritto in modo da attivare la macchina automatica alla quale è collegato, solo se l'abilitazione è stata fornita e mantenuta con continue richieste alla chiave.
Per poter invece salvaguardare solo alcune funzioni principali del programma, una parte del programma dell'elaboratore funziona in modo normale e solo alcune funzioni sono attivate con l'abilitazione della chiave. In questo caso si ha il grande vantaggio di avere la parte principale del programma in una versione unica e standardizzata. Sarà il programma stesso che dovrà verificare la presenza della chiave ed attivare le funzioni particolari.
La chiave, come più avanti meglio precisato, potrà essere personalizzata durante la fase di programmazione dell'elaboratore principale, con l'inserimento di particolari funzioni che evitano la copiatura della parte principale del programma, e con l'inserimento sulla chiave stessa di blocchi di programmi, di routine proprie o di parti di routine, che durante la fase di lavoro dell'elaboratore principale vengono scaricate nella ram di quest'ultimo per essere eseguite.
Con le stesse parti che normalmente compongono una chiave, si possono costruire più chiavi personalizzate, predisposte per salvaguardare varie funzioni e più chiavi possono essere collegate tra loro in cascata ed essere predisposte per operare in sincronismo col l'elaboratore principale.
Maggiori caratteristiche del trovato, ed i vantaggi che ne derivano, appariranno evidenti dalla seguente descrizione di una forma preferita di realizzazione dello stesso, illustrata a puro titolo d'esempio, non limitativo, nelle figure delle quattro tavole allegate di disegni, in cui:
la fig. 1 è uno schema a blocchi che evidenzia la composizione e la funzionalità della chiave;
la fig. 2 illustra con uno schema a blocchi la formazione dei programmi di lavoro sia nella chiave secondo l'invenzione che nell'elaboratore principale che governa il funzionamento della macchina automatica;
le fig. 3 e 4 illustrano con uno schema a blocchi due diversi flussi di operatività della chiave secondo l'invenzione.
Dalla fig. 1 si rileva che la chiave 1 è normalmente dotata di almeno una presa 2 per il collegamento via seriale all'elaboratore principale 4 della macchina automatica e ad un supporto esterno di attivazione che può essere rappresentato da un computer come più avanti detto, o da altro adatto mezzo. Con 3 è indicata un'altra eventuale presa per consentire il collegamento reciproco di più chiavi in cascata, che opereranno in sincronismo con l'elaboratore principale 4.
Come già detto, la chiave comprende un single chip 5 con relative memorie ram 6-prom 7-eeprom 8. Con 9 è indicata una unità logica che sovrintende a tutte le funzione del single chip e che è stato studiata appositamente per consentire l'inserimento di parametri e/o di routine di programmazione, atti a personalizzare l'operatività della chiave.
Il blocco 10 indica il programma di gestione seriale. Questo blocco è stato ad esempio predisposto per gestire le comuni seriali RS232 ed RS485, con possibilità di espansione ad altri tipi di comunicazione. Può avere un baud-rate programmabile via hardware o software, sia in fase di produzione della chiave che durante l'impiego della stessa, con possibilità di modificare la velocità anche all'interno del singolo messaggio. Anche i parity bits sono programmabili via hardware o software, sia in fase di costruzione che in fase di funzionamento della chiave, ed è pure prevista la possibilità di introdurre dei frame errors secondo regole programmabili, il tutto allo scopo di rendere estremamente complicato qualsiasi tentativo di interpretazione dei messaggi.
Il blocco 11 indica il gestore dei protocolli di comunicazione. Analogamente a quanto avviene per la gestione fisica della comunicazione, anche a livello logico è possibile programmare il tipo di protocollo. Alcuni tipi di protocolli di comunicazione sono già previsti standard nel programma della chiave ed altri possono essere aggiunti su indicazioni specifiche del costruttore delle macchine automatiche. Il blocco 11 è anche preposto al riconoscimento della chiave alla quale è indirizzato il messaggio, catturando solo i messaggi relativi alla stessa chiave.
Il blocco 12 è relativo alla routine degli input. Esegue la traduzione dei messaggi provenienti dall'elaboratore 4 della macchina automatica e che a livello di seriale, transitano crittografati secondo regole modificabili nel tempo.
Il blocco 13 esegue l'elaborazione degli input. Elabora i messaggi passati dal blocco 12, distinguendo le risposte a comandi inviati in precedenza, da nuovi comandi provenienti dall'elaboratore 4. Per i primi l'elaborazione si ferma a questo blocco, mentre gli altri comandi vengono passati alle routine a livello superiore preposte alle varie funzioni.
Il blocco 14 è l'analizzatore degli eventi casuali. Serve ad aumentare il numero delle possibili combinazioni, lasciando al caso il verificarsi di un particolare evento e di una particolare condizione. Queste routine controllano quando gli eventi specificati si verificano.
Il blocco 15 è il gestore degli eventi casuali. È preposto alle regole della causalità, regole che possono cambiare nel tempo e la cui funzione è modificabile tramite apposite tabelle.
Il blocco 16 è relativo alle routine di trattamento dei comandi. È preposto alla gestione dei nuovi comandi che debbono essere inviati dalla chiave, in relazione alla logica ed alle regole che sono in quel momento attive.
Il blocco 17 è il supervisore del sistema per codificare/decodificare e crittografare:decrittografare. È il gestore della logica di codifica che accetta le regole dettate nella fase di programmazione della chiave (vedi oltre) e che poi esegue tali regole in relazione alle particolari condizioni della logica interna di funzionamento della chiave o della logica di funzionamento di volta in volta dettate dall'elaboratore 4.
Il blocco 18 è relativo alla gestione dei programmi del costruttore della macchina automatica. Interviene solo nel caso in cui nella fase di programmazione della chiave (vedi oltre), si sia provveduto a mescolare nel programma della chiave stessa, parti di programmi o routine che in realtà devono essere eseguiti nell'elaboratore 4. Il blocco 18 provvede alla gestione di queste parti di programmi o di routine e stabilisce i tempi ed i modi di trasferire le procedure all'elaboratore 4.
Il blocco 19 è reativo al programma di elaborazione degli output. Prepara i messaggi da inviare all'elaboratore 4.
Il blocco 20 è relativo alla routine di codifica dei messaggi di output. Lavora in simmetria al blocco 12 della routine di decofica degli input. Esegue la traduzione dei messaggi preparati dal blocco 19 di elaborazione output, nel formato in cui devono essere trasmessi sulla linea seriale e secondo le regole che sono attive in quel momento.
I blocchi 21 e 22 sono relativi ai programmi di attivazione e disattivazione della chiave collegata all'elaboratore 4. Occorre la presenza di un supporto esterno di attivazione, quale ad esempio un computer od altro apparato collegato alla presa 2, come indicato con 102, per trasmettere alla chiave i dati che identificano in maniera univoca l'elaboratore 4.
Con riferimento alla fig. 2 viene ora illustrato un possibile sistema di personalizzazione della chiave, per far sì che la sua logica di funzionamento risulti segreta. Per questo scopo, la chiave 1 e l'elaboratore 4 della macchina automatica vengono collegati ad un Personal Computer (PC) 25, attraverso rispettivi prom programmer 23 e 27. Il programmatore si avvale di una libreria macro sistema 28 e di programmi, procedure e routine di base 30. Attraverso gli appositi programmi che girano sul PC 25, il programmatore può generare un software con sistemi ed algoritmi che verranno fatti coffoscere solo a personale autorizzato. Con appositi programmi, lo stesso programmatore potrà eventualmente introdurre nel software della chiave, routines 31 proprie e specifiche della macchina governata dall'elaboratore 4.
Una volta definito l'insieme del programma nelle sue varie parti, attraverso il compilatore e link 29 verranno generati i files che costituiscono il programma oggetto 24 e che attraverso il prom programmer 23 saranno impiegati per la programmazione della chiave. Con una procedura analoga, sfruttando routine scritte in linguaggio "C" e quindi di facile trasportabilità, il programmatore potrà creare il software di interfaccia 26 da inserire nell'elaboratore 4 della macchina, attraverso il prom programmer 27.
Resta inteso che secondo una diversa forma di realizzazione del trovato, la programmazione della chiave potrà essere effettuata con una cosiddetta fase di mascheratura. I files del programma vengono forniti al costruttore del single chip 5 di fig. 1 che provvederà ad inserire in questo componente il programma dell'utente.
Le fig. 3 e 4 mostrano in modo semplificato un possibile flusso di interfacciamento tra una chiave 1 e l'elaboratore 4 di una macchina automatica, dove alcune funzioni debbono essere protette. In questo caso è previsto che l'elaboratore della macchina abbia un suo codice identificativo registrato in memoria e che la chiave 1 sia stata precondizionata nell'abbinamento a questo specifico elaboratore. Nella fig. 3 è illustrato in particolare il flusso di attivazione della funzione, mentre nella fig. 4 è illustrata la procedura per mantenere attivata la stessa funzione.
Alla fase 32 di start, seguono le fasi 33 e 34 di attivazione sia del programma dell'elaboratore 4 che della chiave 1. Se vi è una richiesta 35 di funzione speciale dall'operatore che controlla il funzionamento della macchina automatica e che allo scopo interviene sull'elaboratore 4, quest'ultimo invia alla chiave una richiesta 37 di colloquio. Se la chiave non è presente, la funzione richiesta non viene attivata ed il programma di richiesta ha fine come indicato con 36. Se invece la chiave è presente, la fase 38 prevede che il programma della chiave stessa invii all'elaboratore 4, secondo una regola casuale stabilita, una serie di informazioni che caratterizzano i messaggi ed i comandi che da quel momento in poi vengono scambiati tra le parti 1-4, ed invvii una tabella che definisce come codificare/decodificare e/o crittografare/decrittografare i vari messaggi.
Vengono inoltre caricate nella ram dell'elaboratore 4 delle routine che saranno eseguite durante il riconoscimento di attivazione della funzione. Tra le fasi 37 e 38 dianzi dette vi è una fase intermedia 39 di verifica della presenza della chiave ed in caso negativo si ha una mancata attivazione 40 della funzione, con interruzione 41 del flusso.
Dopo la fase 38, seguendo la logica predefinita, l'e laboratore 4 invia in modo mascherato il proprio codice identificativo ed il codice della funzione da attivare, come indicato con 42. Segue una fase 43 di verifica della validità dei dati inviati dall'elaboratore 4 e se la chiave non riconosce la validità di questi dati, sia come contenuto che come codifica, annulla quanto inviato in precedenza e la funzione non viene attivata, come indicato con la successione delle fasi 44 e 45.
Nel caso in cui la richiesta abbia superato i vari controlli, la chiave 1 invia in modo mascherato il consenso 46 di attivare la funzione 47 e le routine necessarie alla operatività della funzione, dopo di che il flusso ha termine come indicato con 48.
Per evitare che una volta attivata la funzione, la chiave 1 venga scollegata ed impiegata per attivare la stessa funzione su altre macchine, può essere previsto che l'elaboratore 4 richieda in continuazione il consenso a mantenere attiva la stessa funzione.
La fig. 4 mostra un flusso di verifica continua della presenza della chiave.
Ad attivazione avvenuta 49 e dopo la fase di riconoscimento della chiave, l'elaboratore 4 inizia a colloquiare con le regola, tabelle e routines stabilite in fase di inizializzazione 50 e nella fase successiva 51 invia un comando per verificare in continuazione la presenza della chiave. Tale verifica viene fatta secondo le regole, la tabella di codifica e la routine attive in quel momento e cioè in base alle ultime informazioni inviate dalla chiave 1.
Nella fase 52 la chiave interpreta il messaggio secondo le stesse regole e nella fase 53, se l'analizzatore degli eventi casuali stabilisce che è verificata la condizione 54 per modificare logica e modalità di trasmissione, richiama l'intervento 55 del gestore degli eventi casuali, che stabilisce secondo un proprio algoritmo le nuove regole, la nuova tabella di trascodifica e le nuove routine da attivare nell'elaboratore 4.
Tale logica, attraverso il criterio di trasmissione precedente, viene inviata all'elaboratore 4 e da quel momento le nuove regole indicate con 56, prendono il posto di quelle precedenti indicate con 50.
Parallelamente la chiave invia il consenso 57 al mantenimento della funzione speciale attraverso l'ultima logica concordata tra le unità 1 e 4. L'elaboratore 4 riceve il consenso 58, la funzione 59 rimane attiva ed il flusso ha termine come indicato con 60.
Nel caso in cui l'elaboratore 4 non riceva una risposta dalla chiave 1, l'operatività 61 della funzione speciale viene eliminata, la routine 62 caricata in ram si autodistrugge ed il flusso ha termine come indicato con 63.
The work program recorded in the eprom of an electronic computer used, for example, for the control of a packaging machine for products with stretch film, or other automatic machine, can currently be copied very easily. The object of the invention is to overcome this drawback with the interactive combination of said electronic processor with an electronic safety unit, hereafter referred to for simplicity as "key", which has the task of activating or deactivating special functions or programs in the same processor.
The key consists of an SMD mini-board, housed in a small container, drowned in a special resin and is equipped with a single chip that can be masked or programmed only once. The key is a closed and autonomous system, containing prom, ram and eeprom internally and can be connected via serial connection to the main computer, without carrying outside the bus and other signals and this to guarantee great security against copying.
In order to safeguard the entire program of the main computer, the program of this computer can be written so as to activate the automatic machine to which it is connected, only if the enabling has been provided and maintained with continuous requests to the key.
To be able to safeguard only some of the main functions of the program, a part of the computer program works normally and only some functions are activated by enabling the key. In this case there is the great advantage of having the main part of the program in a single and standardized version. It will be the program itself that must verify the presence of the key and activate the particular functions.
The key, as better specified below, can be customized during the programming phase of the main computer, with the insertion of particular functions that avoid copying the main part of the program, and with the insertion on the key of blocks of programs, own routines or parts of routines, which during the work phase of the main computer are downloaded into the ram of the latter to be executed.
With the same parts that normally make up a key, several customized keys can be built, designed to safeguard various functions and several keys can be connected together in cascade and be arranged to operate in synchronism with the main processor.
Further characteristics of the invention, and the advantages that derive from it, will become evident from the following description of a preferred embodiment thereof, illustrated purely by way of non-limiting example, in the figures of the four enclosed drawings, in which:
fig. 1 is a block diagram showing the composition and functionality of the key;
fig. 2 shows a block diagram of the formation of the work programs both in the key according to the invention and in the main computer which governs the operation of the automatic machine;
the fig. 3 and 4 show a block diagram of two different operating flows of the key according to the invention.
From fig. 1 it is noted that the key 1 is normally equipped with at least one socket 2 for the serial connection to the main computer 4 of the automatic machine and to an external activation support which can be represented by a computer as described below, or by other suitable medium. 3 indicates another possible socket to allow the reciprocal connection of several keys in cascade, which will operate in synchronism with the main computer 4.
As already mentioned, the key includes a single chip 5 with its 6-prom 7-eeprom 8 ram memories. 9 indicates a logic unit that oversees all the functions of the single chip and that has been specifically designed to allow insertion of parameters and / or programming routines, designed to customize the operation of the key.
Block 10 indicates the serial management program. This block has, for example, been designed to manage the common RS232 and RS485 serial ports, with the possibility of expansion to other types of communication. It can have a baud-rate programmable via hardware or software, both during the production of the key and during the use of the same, with the possibility of changing the speed even within the single message. Even the parity bits are programmable via hardware or software, both during the construction phase and during the operation of the key, and there is also the possibility of introducing frame errors according to programmable rules, all in order to make any attempt to make it extremely complicated. interpretation of the messages.
Block 11 indicates the manager of the communication protocols. Similarly to what happens for the physical management of communication, the type of protocol can also be programmed at the logical level. Some types of communication protocols are already provided as standard in the key program and others can be added on specific indications of the automatic machine manufacturer. Block 11 is also responsible for recognizing the key to which the message is addressed, capturing only the messages relating to the same key.
Block 12 relates to the input routine. It carries out the translation of the messages coming from the processor 4 of the automatic machine and which, at the serial level, pass encrypted according to rules that can be modified over time.
Block 13 performs the input processing. It processes the messages passed by block 12, distinguishing the responses to commands sent previously, from new commands from computer 4. For the first, processing stops at this block, while the other commands are passed to the higher level routines in charge to the various functions.
Block 14 is the random event analyzer. It serves to increase the number of possible combinations, leaving the occurrence of a particular event and a particular condition to chance. These routines control when the specified events occur.
Block 15 is the random event handler. It is responsible for the rules of causality, rules that can change over time and whose function can be modified through special tables.
Block 16 relates to the command treatment routines. It is responsible for managing the new commands that must be sent from the key, in relation to the logic and rules that are active at the time.
Block 17 is the supervisor of the system for coding / decoding and encrypting: decrypting. It is the manager of the coding logic that accepts the rules dictated in the key programming phase (see below) and then executes these rules in relation to the particular conditions of the internal operating logic of the key or the operating logic dictated from time to time from the computer 4.
Block 18 relates to the management of the programs of the automatic machine manufacturer. It intervenes only if in the key programming phase (see below), parts of programs or routines that must actually be executed in the computer 4 have been mixed in the key program itself. Block 18 provides for the management of these parts of programs or routines and establishes the times and ways of transferring the procedures to the computer 4.
Block 19 is responsive to the output processing program. Prepare the messages to be sent to the computer 4.
Block 20 relates to the coding routine of the output messages. Work in symmetry on block 12 of the input decoding routine. It carries out the translation of the messages prepared by the output processing block 19, in the format in which they must be transmitted on the serial line and according to the rules that are active at that moment.
Blocks 21 and 22 relate to the activation and deactivation programs of the key connected to the computer 4. An external activation support is required, such as for example a computer or other device connected to socket 2, as indicated with 102, for transmit to the key the data that uniquely identify the processor 4.
With reference to fig. 2 shows a possible system for personalizing the key, so that its operating logic is kept secret. For this purpose, the key 1 and the processor 4 of the automatic machine are connected to a Personal Computer (PC) 25, through respective prom programmer 23 and 27. The programmer makes use of a macro system library 28 and of programs, procedures and basic routine 30. Through the special programs that run on the PC 25, the programmer can generate software with systems and algorithms that will only be made available to authorized personnel. With specific programs, the same programmer can eventually introduce in the key software, own and specific routines 31 of the machine controlled by the computer 4.
Once the whole program has been defined in its various parts, the files that make up the object program 24 will be generated through the compiler and link 29 and which will be used to program the key through the prom programmer 23. With a similar procedure, using routines written in "C" language and therefore easy to transport, the programmer can create the interface software 26 to be inserted in the computer 4 of the machine, through the prom programmer 27.
It is understood that according to a different embodiment of the invention, the programming of the key can be carried out with a so-called masking phase. The program files are supplied to the manufacturer of the single chip 5 in fig. 1 which will insert the user program into this component.
The fig. 3 and 4 show in a simplified way a possible interface flow between a key 1 and the processor 4 of an automatic machine, where some functions must be protected. In this case, the computer of the machine is expected to have its own identification code stored in the memory and that the key 1 has been preconditioned in the combination with this specific computer. In fig. 3 shows in particular the activation flow of the function, while in fig. 4 shows the procedure for keeping the same function activated.
The start phase 32 is followed by the activation steps 33 and 34 of both the computer 4 program and the key 1. If there is a special function request 35 from the operator who controls the operation of the automatic machine and who intervenes for the purpose on the computer 4, the latter sends an interview request 37 to the key. If the key is not present, the requested function is not activated and the request program ends as indicated by 36. If, on the other hand, the key is present, step 38 requires that the key program itself send to the processor 4, according to a established random rule, a series of information that characterize the messages and commands that from then on are exchanged between parts 1-4, and send a table that defines how to encode / decode and / or encrypt / decrypt the various messages.
Routines which will be performed during the recognition of activation of the function are also loaded into the ram of the processor 4. Between the phases 37 and 38 mentioned above there is an intermediate phase 39 for checking the presence of the key and in the negative case there is a failure to activate the function 40, with interruption 41 of the flow.
After step 38, following the predefined logic, the processor 4 sends its own identification code and the code of the function to be activated in a masked manner, as indicated with 42. A step 43 follows to check the validity of the data sent by the processor 4 and if the key does not recognize the validity of these data, both as content and as encoding, it cancels what has been sent previously and the function is not activated, as indicated with the sequence of steps 44 and 45.
In the event that the request has passed the various checks, the key 1 sends the consent 46 in a masked manner to activate the function 47 and the routines necessary for the operation of the function, after which the flow ends as indicated with 48.
To avoid that once the function is activated, the key 1 is disconnected and used to activate the same function on other machines, it can be provided that the computer 4 continuously requests consent to keep the same function active.
Fig. 4 shows a flow of continuous verification of the presence of the key.
After activation 49 and after the key recognition phase, the processor 4 starts to talk with the rules, tables and routines established in the initialisation phase 50 and in the subsequent phase 51 sends a command to continuously check the presence of the key. This check is made according to the rules, the coding table and the routine active at that moment, that is, based on the latest information sent by key 1.
In phase 52 the key interprets the message according to the same rules and in phase 53, if the random event analyzer establishes that condition 54 has been verified to modify logic and transmission mode, it calls intervention 55 of the random event manager, which establishes according to its own algorithm the new rules, the new transcoding table and the new routines to be activated in the computer 4.
This logic, through the previous transmission criterion, is sent to the processor 4 and from that moment the new rules indicated with 56 take the place of the previous ones indicated with 50.
In parallel, the key sends the consent 57 to the maintenance of the special function through the last logic agreed between the units 1 and 4. The processor 4 receives the consent 58, the function 59 remains active and the flow ends as indicated with 60.
In the event that the processor 4 does not receive a response from the key 1, the operation 61 of the special function is eliminated, the routine 62 loaded in ram is self-destructing and the flow ends as indicated with 63.