Device for encrypting and decrypting of signals

Abstract: An electronic device comprises coding logic to code digital signals in accordance with one of a number of predetermined codes; a code selector to select one of the predetermined codes; and a protocol selector to configure coded digital output signals produced by the coding logic to conform to one of a number of predetermined protocols.

Description: INTRODUCTION THIS INVENTION relates to an electronic device for encoding or decoding electrical signals. BACKGROUND TO THE INVENTION In certain applications such as remote alarm systems and access control systems, which require secure data transmission, data in encrypted form is transmitted by a transmitter to a receiver. The received encrypted data is then decrypted, validated by a control unit, and then further processed according to the requirements of the application. Various methods of data encryption are known in the art. In most methods, data is encrypted at the transmitter by combining it together with an encryption key according to a fixed algorithm. The encrypted data is decrypted at the receiver by applying a converse algorithm to the encrypted data together with the same encryption key. The security of such a communication system will obviously be compromised if the encryption key becomes known to unauthorised users. The security of encrypted data transmission may be increased in various ways. For example, the encryption key may be made to vary randomly and used only once. Such an encryption key is known as a "one time key". Alternatively, the encryption key may be fixed and the data to be combined with the key may be varied. This method of data encryption is known in the art as "code hopping". Both of these methods of data encryption will ensure that no two data transmissions are identical. This principle ensures that encrypted data which is intercepted during transmission and which is subsequently retransmitted by an unauthorised user, cannot be used to disable the alarm system or to bypass the access control system. Japanese Patent Number 63-155930 discloses a method of providing encrypted data for secure transmission across a public data network. The method comprises generating an encryption key, and the transmission of the key from the transmitter to the receiver, or vice-versa, across the public data network. Network processors at the transmitter and receiver then encrypt and decrypt data transmitted across the network by using the common encryption key. The network processors also format the encrypted data according to a fixed protocol suitable for transmission across the network. Further methods and apparatus for secure communication are disclosed in the following patent numbers: WO 89/10666 which relates to a protocol which is used for the transmission of encrypted data; GB 2 124 856 which relates to a multi-level encryption scheme applicable to the broadcasting of encrypted signals; and EP 0 300 824 which discloses a method of producing a continuous sequence of one-time encryption keys. Japanese Patent No 61-205048 relates to a communication apparatus which is configurable to receive or transmit data according to one of a number of different selectable communication protocols. The data is not encrypted prior to transmission by the communication apparatus. US-A-4 281 315 teaches a polling system for sequentially interrogating a plurality of different data terminals and receiving messages therefrom, in which communication with each data terminal may utilise a different communication protocol, the details of which are stored in a controller. The data communication between the data terminals and the common polling station is "in clear". A similar arrangement is disclosed in WO 87/01484 in which a host processor and a plurality of remote processing devices communicate over a local area network. A different communication protocol may be used to control the transfer of data between the host processor and each of the remote processing devices. The transfer of data takes place "in clear". An exposition of the use of smart cards in computer security applications is presented in "The Smart Card A High Security Tool in EDP". PTR Philips Telecommunication and Data Systems Review, Vol 47, No 3, September 1989. The application of smart cards in providing secure access to computing resources and in managing encryption keys in large computer networks is outlined. EP-A2-0,209,811 discloses an electronic coding device for encrypting and decrypting data signals. The device comprises processors for coding data in accordance with a predetermined decryption algorithm and in accordance with two predetermined encryption algorithms. Each processor has an input for receiving a digital input signal and an output for generating a coded digital output signal. The device also comprises a memory to store initial parameters such that the output of the device is compatible with hardware to which it is connected. EP- A2-0 282 992 ddiscloses an electronic coding device. The device comprises a processor and a memory. The processor selects from the memory the appropriate communication protocol according to a received classification code and then executes communication by using the selected communication protocol. The efficiency of data encryption using code hopping techniques is reduced when data encryption is performed using standard types of integrated circuits, because the word length of these integrated circuits is small. This is problematic in instances where more alarm systems or access control systems are manufactured than there are distinct codes available, as duplication is inevitable and security is thereby reduced. In one particular type of remote alarm system, the number of distinct codes is increased by widening the word length of the algorithms used for encryption and decryption. When this is done by using discrete standard types of integrated circuits, the resulting electronic circuits for encryption and decryption are large, complex, unnecessarily expensive and have large power consumptions. It is an object of this invention to provide a device which will enable the encryption or decryption of electrical signals. According to the present invention, there is provided an electronic coding device for selectively encrypting or decrypting data signals, comprising: a processor to code digital data in accordance with a selectable one of a predetermined encryption and a predetermined decryption algorithm, the processor having an input for receiving a digital input signal and an output for generating a coded digital output signal; and a configuration storage memory connected to the processor, characterised in that the configuration storage memory is instructable to select one of the predetermined encryption algorithm and predetermined decryption algorithm and to convert the coded digital output signal produced by the processor after encryption and after decryption to conform to any one of a number of predetermined protocols. The invention extends to provide a method of configuring an electronic coding device tor selectively encrypting or decrypting data signals, comprising the steps of: interfacing a programming means to a configuration storage memory connected to a processor for coding digital data in accordance with a selected one of a predetermined encryption and a predetermined decryption algorithm, the processor having an input for receiving a digital input signal and an output for generating a coded digital output signal; and instructing the configuration storage memory to select one of the number of predetermined algorithms, characterised in that it includes the further steps of instructing the configuration storage memory to select one of the predetermined encryption and predetermined decryption algorithm, and instructing the configuration storage memory to selectively convert the coded digital output signal produced by the processor after encryption and after decryption to conform to any one of a number of predetermined protocols. BRIEF DESCRIPTION OF THE DRAWINGS A preferred embodiment of the invention is described below, by way of example only, and with reference to the accompanying drawings, in which: Figure 1 is a perspective view of a packaged integrated circuit; Figure 2 is a schematic representation of the pin layout of the integrated circuit of Figure 1; Figure 3 is a schematic block diagram of the integrated circuit of Figure 1; Figure 4 is a block diagram of coding logic for encrypting digital signals; Figure 5 is a block diagram of coding logic for decrypting digital signals; and Figure 6 is a block diagram of a programmer for configuring the integrated circuit of Figure 1. DETAILED DESCRIPTION Of THE DRAWINGS Referring to Figure 1, an electronic coding device is represented generally by numeral (21) and is, in this embodiment, an integrated circuit. The integrated circuit comprises a small wafer of semiconductor material (not shown), such as silicon, on which an electrical circuit is produced by means any one of a number of lithographic techniques which are well known in the art. The semiconductor wafer is encapsulated in a rectangular block of insulating plastics or ceramic material (22) to provide a degree of structural and environmental protection. Electrical connection to the semiconductor wafer is provided by a number of metallic pins (23), each pin protruding from the encapsulating block (22) and being in electrical contact with the semiconductor wafer. The pins (23) are arranged in two rows on opposing sides of the encapsulating block (22). The configuration of the pins indicated in Figure 1 is utilised for surface-mounting the integrated circuit (21) to a printed circuit board (not shown). The pin configuration of the integrated circuit is indicated in Figure 2. The pins are arranged in a 20-pin dual-in-line (DIL) configuration and are individually indicated by numerals 1 to 20 in Figure 2. As indicated, only twelve of the pins are used, with the pins numbered 2, 3, 8, 9, 10, 11, 19 and 20 being unused. Referring now to Figure 3, a block diagram of the electrical circuit on the semiconductor wafer (not shown) of the integrated circuit of Figure 1, is indicated. The core of the electrical circuit is a microprocessor (24) such as the TMS370 8-bit microprocessor core available from Texas Instruments of Dallas, Texas in the USA. The microprocessor memory comprises 4 kilobytes of read-only memory (ROM) (25), 256 bytes of random-access memory (RAM) (26) and 256 bytes of electrically-erasable programmable read-only memory (EEPROM) (27). The ROM and EEPROM memories are non-volatile so that data stored in these memories is not lost when power is removed from the integrated circuit (21). A crystal oscillator and divide-by-2 clock generator (28) provides clock frequency for the micro-processor (24) while system control is provided by firmware (29). An input/output port (30) provides five general bidirectional input/output lines (31). The input/output lines are individually configurable under program control. A fuse (32) may be selectively blown to disable external read access to the ROM, RAM and EEPROM memories to protect any sensitive data which might be stored in these memories. The fuse (32) is usually blown only after the integrated circuit (21) has been tested for correct operation after it has been manufactured. For use in applications where power consumption is critical, the integrated circuit (21) has a stopped mode in which all of the circuit activity is stopped but data in the RAM memory (26) is maintained. Data in the non-volatile ROM (25) and EEPROM (27) memories will not be lost in any event. The integrated circuit (21) can only be released from the stopped mode by an externally supplied reset signal. In one particular application of this integrated circuit, related to its use in remote alarm systems, standard application software is masked into the ROM memory (25) by lithographic techniques at the time of manufacture of the integrated circuit. Referring to Figures 4 and 5, the application software consists of an encryption algorithm (33) and a decryption algorithm (40). The integrated circuit (21) may be configured to perform either encryption or decryption by enabling either the encryption algorithm (33) or the decryption algorithm (40) respectively. Configuration data representing the configuration of the integrated circuit is stored in the EEPROM memory (27). The configuration data relates to the mode of operation of the integrated circuit, that is whether the encryption algorithm (33) or the decryption algorithm (40) has been enabled. Further configuration data comprises a fixed, 56-bit key value, or encryption key (34) and a variable value, or counter value (35). An arbitrary fixed data byte (37) is also stored in the EEPROM memory (27). The operation of the application software in an integrated circuit (21) which has been configured for encryption is described below. When the encryption algorithm (33) is activated, the counter value (35) is incremented and the fixed byte (37) is appended to it. A checksum byte is computed from the counter value (35) and the fixed data byte (37) and is further appended to the counter value. The counter value (35) is 40-bits wide so that when the counter value is appended by the fixed byte (37) and the checksum byte (38), a 56-bit variable is obtained. Any algorithm may be used to compute the checksum, for example, a 16-bit cyclic redundancy check. The counter value, appended by the fixed and the checksum byte is encrypted together with the encryption key (34) by means of the encryption algorithm (33) to produce a unique 56-bit output value at (36). The output value from the encryption algorithm (33) is converted to serial form by a parallel-to-serial converter (39). The serial data stream produced at the output of the parallel-to-serial converter (39) is transmitted by means of a radio-frequency or an infra-red transmitter front-end (not shown). This output data stream is configurable to conform to the timing waveform requirements of the particular transmitter type which may be used in a given application. In use, up to four integrated circuits (21) configured for encryption may be linked to a single integrated circuit (21) configured for decryption, to form an operable set of devices. The configuration data of the decryption integrated circuit must provide for the decryption algonthm (40) to be enabled. Furthermore, each of the encryption integrated circuits must be configured with a unique encryption key (34) and with the same fixed data byte (37). The decryption integrated circuit is configured with the encryption key (34) of each of the linked encryption integrated circuits, up to a maximum of four such keys, and with the common fixed data byte (37). The decryption integrated circuit is further configured with a counter value for each of the linked encryption integrated circuits, up to a maximum of four. A radio-frequency of infra-red receiver (not shown) acts as a front-end to the integrated circuit (21) which is configured for decryption, to receive a data stream transmitted by any one of the encryption integrated circuits. The receiver type is selected to match the transmitters used with the encryption integrated circuits. The operation of the application software in an integrated circuit which has been configured for decryption is described in the discussion which follows. A serial data stream which is received by the receiver front-end (not shown) is converted into a received 56-bit data word by a serial-to-parallel converter (41). The data word is decrypted by applying the decryption algorithm (40) and a decryption key (42a). It will be obvious to a person skilled in the art that where the decryption algorithm (40) is the inverse of the encryption algorithm (33), and where the decryption key (42a) is the same as the encryption key (34), then the decrypted data word will be a 56-bit data word made up of the counter value (35), followed by the fixed byte (37) and the checksum byte (38) which was transmitted in encrypted form as described above. An additional checksum byte is computed from the decrypted counter value and the decrypted fixed byte using an identical algorithm to the checksum algorithm that was used prior to encryption to compute the checksum byte (38). The received checksum byte and the computed checksum byte are compared at (43) and, if they are not the same, then either data corruption has occurred during transmission, or an incorrect decryption key has been used in the decryption process. If the received and computed checksum bytes do not match, the received data word is again decrypted using another decryption key (42b) stored in the EEPROM memory (27) of the decryption integrated circuit and a checksum byte is computed and compared with the received checksum byte as above. The process is repeated until either all the stored decryption keys (42a), (42b), (42c) and (42d) have been used for decryption, or a computed checksum byte is found which matches the received, decrypted checksum byte. If no matching checksum bytes are found in this manner, the received data is discarded and the receiver continues to listen for other transmitted streams of data. When matching checksum bytes are found, the received, decrypted fixed byte is compared at (44) against the fixed byte stored in the EEPROM (27) of the decryption integrated circuit. If the received and the stored fixed bytes do not match, the received data is discarded. Lastly, the received, decrypted counter value is tested at (45) for validity against the stored counter value corresponding to the encryption key (42a), (42b), (42c) or (42d) which produced matching checksum bytes. For the received, decrypted counter value to be valid, it must be greater than the corresponding counter value stored in the decryption integrated circuit, since the counter value (35) in the encryption integrated circuit is incremented, prior to encryption and transmission. In addition the received counter value must be less than the stored counter value plus a deadband of 2047, to allow for accidental or deliberate activation of the encryption integrated circuit when it is out of transmission range of the decryption integrated circuit. Once the received counter value has been tested and found to be valid, an output signal is generated by the integrated circuit, at (46), according to the requirements of the application. The output (46) of the decryption integrated circuit (21) may be configured to toggle between two states, equivalent to an "on" or an "off" state, or to be a pulse of selectable duration between 0,1 and 2,5 seconds. Alternatively, the output (46) may be configured to emulate the protocol of other known types of integrated circuits. An output signal (46) conforming to the emulated protocol is generated each time the decryption integrated circuit (21) receives a valid data stream from an encryption integrated circuit. Some of the protocols which may be emulated are the MC145026/VD5026 data format from Motorola of the USA, the MM53200/MM57C200 data format from National Semiconductor of the USA, or the TEA5500/1 data format from Philips of the Netherlands. Turning now to Figure 6, the EEPROM memory (27) in which the configuration of the integrated circuit (21) is stored, is configured by means of a programming unit (50) which may, optionally, be connected to a computer (51) such as an IBM-compatible personal computer (PC). The programming unit (50) comprises a micro-processor (52), a power supply (53), a keypad (54) for data entry, a liquid crystal display (LCD) (55) and a programming socket (56) to receive the integrated circuit (21). The programming unit (50) may be connected, at (57), to a parallel expansion socket (not shown) for external programming of additional integrated circuits (21). The programming unit (50) is connectable to the computer (51) through an RS232C communication port (58). The programming unit may be used in a stand-alone mode, in which case connection to the PC (51) is not necessary, and all configuration is performed via the keypad (54). Each integrated circuit (21) which is configured for encryption is configured with its own fixed unique encryption key (34) by generating a 56-bit random number in the programmer (50) and downloading this value to the EEPROM memory (27) of the integrated circuit. A single integrated circuit (21) configured for decryption is linked with up to four integrated circuits configured for encryption, by configuring its EEPROM memory (27) with the respective encryption keys (42a), (42b), (42c) and (42d) of the encryption integrated circuits to which it is to be linked. The output of an integrated circuit (21) configured for encryption may be used to cause a light-emitting-diode (LED) (not shown) to flash intermittently to provide an indication of low supply voltage. When a low supply voltage is detected, a warning code is transmitted by the encryption integrated circuit to the integrated circuit (21) configured for decryption, to which it is linked, and an output of the decryption integrated circuit will then be set, and this output may be used to illuminate an LED or to sound a buzzer to provide audible and visual warning of the low supply voltage. A similar warning code may be transmitted when an encryption integrated circuit is unable to write data to the EEPROM memory (27) due to a malfunction. When integrated circuits (21) are used in a motor vehicle alarm system, for example, one or more encryption integrated circuits must be linked with a single integrated circuit configured for decryption in the manner outlined above, that is, the encryption key of each encryption integrated circuit is loaded into the configuration memory of the decryption integrated circuit where it is then available for use by the decryption algorithm (40). To ensure security, the encryption integrated circuit can be made to flash an LED (not shown) to enable the optical recovery of the encryption key in an encrypted form. The encrypted flashes of light may be detected by a receiver and decrypted and down-loaded to a decryption integrated circuit (21). In this manner, a service station may quickly and easily reconfigure the alarm system on a motor vehicle. To ensure synchronisation between the encryption and decryption integrated circuits, in an operable set, all counter values stored in the respective memories of these devices are initialised to have zero values. This embodiment of the invention has been described with particular reference to a remote alarm system, but the scope of the invention is clearly not limited to this application. The invention therefore provides a low-cost, configurable application oriented controller suitable for use in applications requiring secure data transmission.

Claims: An electronic coding device (21) for selectively encrypting or decrypting data signals, comprising: a processor (24) to code digital data in accordance with a selectable one of a predetermined encryption and a predetermined decryption algorithm (33,40), the processor (24) having an input for receiving a digital input signal and an output tor generating a coded digital output signal; and a configuration storage memory (27) connected to the processor (24), characterised in that the configuration storage memory (27) is instructable to select one of the predetermined encryption algorithm and predetermined decryption algorithm and to convert the coded digital output signal produced by the processor (24) after encryption and after decryption to conform to any one of a number of predetermined protocols. An electronic coding device as claimed in claim 1 characterised in that the configuration storage memory (27) is instructable by means of configuration data stored in the configuration storage memory. An electronic coding device as claimed in claim 2 characterised in that the configuration storage memory (27) also contains a number of key values (34, 42a, 42b, 42c, 42d) and a number of variable values (35). An electronic coding device as claimed in claim 3 characterised in that the predetermined encryption algorithm (33) encrypts a key value (34) and a variable value (35) contained in the configuration storage memory (27), to produce an encrypted value (36). An electronic coding device as claimed in claim 4 characterised in that the predetermined decryption algorithm (40) decrypts a previously encrypted value (36) by using a key value (42a, 42b, 42c, 42d) contained in the configuration storage memory (27). An electronic coding device as claimed in any one of claims 2 to 5 characterised in that the configuration storage memory (27) is connectable to a programming means (50) for accessing and altering any of the configuration data, the key values and the variable values in the configuration storage memory. An electronic coding device as claimed in any one of the preceding claims characterised in that the configuration storage memory (27) is a non-volatile, electrically-erasable, programmable, read-only memory. An electronic coding device as claimed in claim 5 characterised in that one of the predetermined protocols is the conversion of the coded digital output signal (36) produced by the processor, to a binary signal which alternates between an "off" state and an "on" state at a selectable frequency. An electronic coding device as claimed in claim 5 characterised in that another one of the predetermined protocols is the conversion of the coded digital output signal (36) produced by the processor to a pulse of selectable duration. An electronic coding device as claimed in claim 5 characterised in that yet another one of the predetermined protocols is the conversion of the coded digital output signal (36) produced by the processor to a pulse train emulating any one of a number of different data format standards. An electronic coding device as claimed in any one of the preceding claims characterised in that it includes a means for indicating a low supply voltage to the device. An electronic coding device as claimed in claim 7 characterised in that it includes a means for indicating a malfunction of the non-volatile electrically-erasable, programmable, read-only memory. An electronic coding device as claimed in any one of claims 3 to 12 characterised in that it includes a display means (55) for displaying, in encrypted form, any of the key values contained in the configuration storage memory. An electronic coding device as claimed in claim 13 characterised in that the display means (55) is a light-emitting diode. A method of configuring an electronic coding device for selectively encrypting or decrypting data signals, compnsing the step of: interfacing a programming means (50) to a configuration storage memory (27) connected to a processor (24) for coding digital data in accordance with a selected one of a predetermined encryption and a predetermined decryption algorithm (33,40), the processor (24) having an input for receiving a digital input signal and an output for generating a coded digital output signal; and characterised in that it includes the further steps of instructing the configuration storage memory (27 to select one of the predetermined encryption algorithm and predetermined decryption algorithm; and instructing the configuration storage memory (27) to selectively convert the coded digital output signal produced by the processor (24) after encryption and after decryption to conform to any one of a number of predetermined protocols. A method of configuring an electronic coding device as claimed in claim 15, characterised in that the configuration storage memory (27) is instructed by storing configuration data in the configuration storage memory. A method of configuring an electronic coding device as claimed in claim 16 characterised in that it includes the further step of storing a number of key values (34, 42a, 42b, 42c, 42d) and a number of variable values (35) in the configuration storage memory. A method of configuring an electronic coding device as claimed in claim 17 characterised in that the predetermined encryption algorithm (33, 40) is encrypting a key value (34) and a variable value (35) contained in the configuration storage memory (27), to produce an encrypted value (36). A method of configuring an electronic coding device as claimed in claim 18 characterised in that the predetermined decryption algorithm (33, 40) is decrypting a previously encrypted value (36) by using a key value (42a, 42b, 42c, 42d) contained in the configuration storage memory (27). A method of configuring an electronic coding device as claimed in claim 19 characterised in that it includes the further step of linking one electronic coding device (21) configured for decryption to a number of electronic coding devices (21) configured for encryption, to form an operable set of electronic coding devices, by storing a different key value (34) into the configuration storage memory (27) of each of the encryption electronic coding devices, and storing all of the different key values (42a, 42b, 42c, 42d) into the configuration storage memory (27) of the decryption electronic coding device. A method of configuring an electronic coding device as claimed in claim 20 characterised in that it includes the further step of synchronising the operable set of coding devices (21) by initialising the variable value (35) stored in the configuration storage memory (27) of each of the electronic devices, to be a known, preselected value. A method of configuring an electronic coding device as claimed in claim 21 characterised in that the need for resynchronising an operable set of electronic coding devices (21) is avoided, when power is removed from any electronic coding device in the set, by storing the configuration data, key values (34, 42a, 42b, 42c, 42d) and variable values (35) associated with each electronic coding device in a respective non-volatile configuration storage memory (27) in each coding device.

Inventors: CELINE DAVID HARRY, GANI ABDUL REHMAN, MOORE DAVID THOMAS, PUCCI FRANCO GIOVANNI, CELINE, DAVID HARRY, GANI, ABDUL REHMAN, MOORE, DAVID THOMAS, PUCCI, FRANCO GIOVANNI
Applicants: CONTROL LOGIC PTY LTD, MERLIN GERIN S A PROPRIETARY L, CONTROL LOGIC (PROPRIETARY) LIMITED, MERLIN GERIN S.A. (PROPRIETARY) LIMITED
Application year: 1992
Main classification: H04L29
IPC codes: H04L29