JP2006215280A - Encryption processing circuit - Google Patents

Encryption processing circuit Download PDF

Info

Publication number
JP2006215280A
JP2006215280A JP2005028115A JP2005028115A JP2006215280A JP 2006215280 A JP2006215280 A JP 2006215280A JP 2005028115 A JP2005028115 A JP 2005028115A JP 2005028115 A JP2005028115 A JP 2005028115A JP 2006215280 A JP2006215280 A JP 2006215280A
Authority
JP
Japan
Prior art keywords
bit
data
input
transposition
processing circuit
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
JP2005028115A
Other languages
Japanese (ja)
Inventor
Shizuka Ishimura
静 石村
Akira Iketani
昭 池谷
Kazumasa Chiaki
一雅 千明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2005028115A priority Critical patent/JP2006215280A/en
Priority to CN 200610006999 priority patent/CN1815528A/en
Priority to TW095103544A priority patent/TWI290426B/en
Priority to US11/275,880 priority patent/US20060171532A1/en
Priority to KR1020060010144A priority patent/KR100828272B1/en
Publication of JP2006215280A publication Critical patent/JP2006215280A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To perform processing for encryption and decryption in a common key block encryption system with low power consumption and at high speed. <P>SOLUTION: An encryption processing circuit for performing permutation under a common key block encryption system wherein multiple-bit input data are permuted in accordance with a correspondence rule for every bit and outputted comprises: a data input section which receives the input data and includes an output port for performing parallel output of the received multiple-bit input data; a data output section which includes an input port to which parallel input of multiple-bit data is performed and outputs the data inputted to the input port; and a permutation section which connects the output port and the input port in accordance with the correspondence rule for every bit. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、共通鍵ブロック暗号方式に用いられる暗号処理回路に関する。   The present invention relates to an encryption processing circuit used for a common key block encryption method.

近年、キーレスエントリーシステムのように、無線等の通信手段によりデータを送受信することが広く行われている。キーレスエントリーシステムの場合、第三者にデータが不正に解読されることのないよう、データは暗号化された上で送受信される。   In recent years, as in a keyless entry system, data transmission / reception is widely performed by wireless communication means. In the case of a keyless entry system, data is transmitted after being encrypted so that the data cannot be illegally decrypted by a third party.

データの暗号化方式は多種多様であるが、DES(Data Encryption Standard)やAES(Advanced Encryption Standard)等の標準規格を用いることが望ましい。これらの標準規格の暗号化方式の場合、不正に解読されるリスクの算出が容易であり、不正に解読された場合の保険料をこのリスクに基づいて算定することができるからである。逆に、標準規格以外の独自規格等の暗号化方式を用いる場合、不正に解読されるリスクの算出が難しく、概して、保険料が高くなることが多い。   There are various data encryption methods, but it is desirable to use a standard such as DES (Data Encryption Standard) or AES (Advanced Encryption Standard). This is because, in the case of these standard encryption schemes, it is easy to calculate the risk of fraudulent decryption, and the insurance premium for fraudulent decryption can be calculated based on this risk. On the other hand, when using an encryption method such as a proprietary standard other than the standard, it is difficult to calculate the risk of illegal decryption, and the insurance premium is often high in general.

このようなDESやAES等の共通鍵ブロック暗号化方式では、データをいくつかのブロックに分割し、そのブロックごとに転置や換字等の処理が行われる。この転置や換字の処理は、入力データと出力データとの対応を示す対応表をメモリに記憶しておき、与えられた入力データに対応する出力データを対応表に基づいて求めることにより実現することができる(例えば、特許文献1)。
特開2004−120307号公報
In such a common key block encryption method such as DES and AES, data is divided into several blocks, and processing such as transposition and substitution is performed for each block. This transposition and substitution processing is realized by storing a correspondence table indicating correspondence between input data and output data in a memory, and obtaining output data corresponding to given input data based on the correspondence table. (For example, Patent Document 1).
JP 2004-120307 A

しかしながら、転置や換字をソフトウェアで実現する場合、メモリに記憶された対応表の参照等を繰り返し行うため、処理負荷が高く、消費電力が大きい。そのため、キーレスエントリーシステムに、転置や換字がソフトウェアで実現された共通鍵ブロック暗号方式を採用すると、利用者が施錠・解錠の操作を行う子機の電池消耗が早くなってしまうという問題があった。また、キーレスエントリーシステムでは、施錠や解錠等の操作に対するレスポンスを良くするため、暗号化及び復号の処理速度を向上させる必要がある。   However, when transposition and substitution are realized by software, since the correspondence table stored in the memory is repeatedly referred to, the processing load is high and the power consumption is large. For this reason, if a common key block encryption method in which transposition and substitution are realized by software is adopted in the keyless entry system, there is a problem that the battery of the slave unit for which the user performs the locking / unlocking operation becomes fast. It was. In the keyless entry system, it is necessary to improve the processing speed of encryption and decryption in order to improve the response to operations such as locking and unlocking.

本発明は上記課題を鑑みてなされたものであり、共通鍵ブロック暗号方式における暗号化及び復号の処理を低消費電力で、かつ、高速に行う暗号処理回路を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide an encryption processing circuit that performs encryption and decryption processing in a common key block encryption method at low power consumption and at high speed.

上記目的を達成するため、本発明の暗号処理回路は、複数ビットの入力データをビット毎の対応規則に基づいて並べ替えて出力する共通鍵ブロック暗号方式の転置処理を行う暗号処理回路であって、前記複数ビットの入力データを受信し、受信した前記複数ビットの入力データを並列出力する出力ポートを有するデータ入力部と、複数ビットのデータが並列入力される入力ポートを有し、前記入力ポートに入力された前記複数ビットのデータを出力するデータ出力部と、前記出力ポートと前記入力ポートとを、前記ビット毎の対応規則に基づいて接続する転置部と、を備えることとする。   In order to achieve the above object, a cryptographic processing circuit of the present invention is a cryptographic processing circuit that performs transposition processing of a common key block cipher system that rearranges and outputs a plurality of bits of input data based on a corresponding rule for each bit. A data input unit having an output port for receiving the plurality of bits of input data and outputting the received plurality of bits of input data in parallel; and an input port for inputting the plurality of bits of data in parallel; A data output unit that outputs the data of the plurality of bits input to the input port, and a transposition unit that connects the output port and the input port based on a correspondence rule for each bit.

また、前記共通鍵ブロック暗号方式がDESであり、前記入力データが、初期転置(Initial Permutation)における入力データであり、前記ビット毎の対応規則が、前記初期転置におけるビット毎の対応規則であることとすることができる。   Further, the common key block encryption method is DES, the input data is input data in initial permutation, and the correspondence rule for each bit is a correspondence rule for each bit in the initial transposition. It can be.

また、前記入力データが、DESの最終転置(Inverse Initial Permutation)における入力データであり、前記ビット毎の対応規則が、前記最終転置におけるビット毎の対応規則であることとすることができる。   The input data may be input data in DES final transposition (Inverse Initial Permutation), and the correspondence rule for each bit may be a correspondence rule for each bit in the final transposition.

また、前記入力データが、DESのF関数の拡大型転置における入力データであり、前記ビット毎の対応規則が、前記F関数の拡大型転置におけるビット毎の対応規則であることとすることができる。   The input data may be input data in an expanded transposition of the DES F function, and the correspondence rule for each bit may be a correspondence rule for each bit in the expanded transposition of the F function. .

また、前記入力データが、DESのF関数のS−BOXから出力されるデータであり、前記ビット毎の対応規則が、前記F関数の当該入力データが入力される転置におけるビット毎の対応規則であることとすることができる。   Further, the input data is data output from the S-BOX of the F function of DES, and the correspondence rule for each bit is a correspondence rule for each bit in transposition to which the input data of the F function is input. Can be.

また、前記入力データが、DESの縮約型転置(Permuted Choice 1)に入力される共通鍵であり、前記ビット毎の対応規則が、前記縮約型転置におけるビット毎の対応規則であることとすることができる。   Further, the input data is a common key input to a DES contracted transposition (Permuted Choice 1), and the correspondence rule for each bit is a correspondence rule for each bit in the contracted transposition. can do.

また、前記入力データが、DESの縮約型転置(Permuted Choice 2)における入力データであり、前記ビット毎の対応規則が、前記縮約型転置におけるビット毎の対応規則であることとすることができる。   The input data may be input data in DES contracted transposition (Permuted Choice 2), and the correspondence rule for each bit may be a correspondence rule for each bit in the contracted transposition. it can.

また、前記入力データが、DESの共通鍵を縮約型転置(Permuted Choice 1)により転置して得られたデータであり、前記ビット毎の対応規則が、当該入力データと、縮約型転置(Permuted Choice 2)に入力されるデータと、のビット毎の対応規則であることとすることができる。   Further, the input data is data obtained by transposing a DES common key by contracted transposition (Permuted Choice 1), and the correspondence rule for each bit includes the input data and the contracted transposition ( This can be a bit-by-bit correspondence rule with data input to Permuted Choice 2).

また、前記ビット毎の対応規則が異なる前記転置部を複数備え、前記複数の転置部のうちの何れの転置部を用いるかを示す選択データを受信し、前記データ入力部から出力される前記入力データを前記選択データによって示される前記転置部に入力する選択部を更に備えることとしてもよい。   A plurality of the transposition units having different correspondence rules for each bit, the selection data indicating which one of the transposition units to use is received, and the input that is output from the data input unit It is good also as providing the selection part which inputs data into the said transposition part shown with the said selection data.

また、前記転置部を複数備える場合において、前記共通鍵ブロック暗号方式がDESであり、前記複数の転置部の前記ビット毎の対応規則が、夫々、初期転置におけるビット毎の対応規則、最終転置におけるビット毎の対応規則、F関数の拡大型転置におけるビット毎の対応規則、F関数のS−BOXから出力されるデータが入力される転置におけるビット毎の対応規則、縮約型転置(Permuted Choice 1)におけるビット毎の対応規則、縮約型転置(Permuted Choice 2)におけるビット毎の対応規則、前記縮約型転置(Permuted Choice 1)から出力されるデータと、前記縮約型転置(Permuted Choice 2)に入力されるデータと、のビット毎の対応規則の何れかであることとすることができる。   In the case where a plurality of transposition units are provided, the common key block encryption method is DES, and the correspondence rule for each bit of the plurality of transposition units is a correspondence rule for each bit in the initial transposition and a final transposition, respectively. Bit-by-bit correspondence rules, bit-by-bit correspondence rules in F-type expanded transposition, bits-by-bit correspondence rules in transposition to which data output from the F-function S-BOX is input, reduced type transposition (Permuted Choice 1 ), A bit-by-bit correspondence rule, a bit-by-bit correspondence rule in Permuted Choice 2, the data output from the contracted transposition (Permuted Choice 1), and the contracted transposition (Permuted Choice 2). ) And the input rule for each bit.

また、前記転置部を複数備える場合において、前記データ入力部から並列出力される前記複数ビットの入力データを対応規則に基づいて変換して前記データ出力部の前記入力ポートに並列出力する論理回路である換字部を更に備え、前記選択データは、前記複数の転置部または前記換字部のうちの何れを用いるかを示すデータであり、前記選択部は、前記データ入力部から出力される前記入力データを前記選択データによって示される前記転置部または前記換字部に入力することとしてもよい。   In the case where a plurality of transposition units are provided, a logic circuit that converts the plurality of bits of input data output in parallel from the data input unit based on a corresponding rule and outputs the converted data to the input port of the data output unit A substitution part is further provided, and the selection data is data indicating which one of the plurality of transposition parts or the substitution part is used, and the selection part is the input data output from the data input part. It is good also as inputting into the said transposition part or the said substitution part shown by the said selection data.

また、前記複数の転置部と前記換字部とを備える場合において、前記共通鍵ブロック暗号方式がDESであり、前記複数の転置部の前記ビット毎の対応規則が、夫々、初期転置におけるビット毎の対応規則、最終転置におけるビット毎の対応規則、F関数の拡大型転置におけるビット毎の対応規則、F関数のS−BOXから出力されるデータが入力される転置におけるビット毎の対応規則、縮約型転置(Permuted Choice 1)におけるビット毎の対応規則、縮約型転置(Permuted Choice 2)におけるビット毎の対応規則、前記縮約型転置(Permuted Choice 1)から出力されるデータと、前記縮約型転置(Permuted Choice 2)に入力されるデータと、のビット毎の対応規則の何れかであり、前記換字部の前記対応規則が、前記S−BOXに入力されるデータと前記S−BOXから出力されるデータとの対応規則であることとすることができる。   Further, in the case where the plurality of transposing units and the substitution unit are provided, the common key block encryption method is DES, and the correspondence rule for each bit of the plurality of transposing units is for each bit in the initial transposition, respectively. Corresponding rule, Corresponding rule for each bit in the final transposition, Corresponding rule for each bit in the expanded transposition of the F function, Corresponding rule for each bit in the transposition to which the data output from the S-BOX of the F function is input, Reduction Corresponding rule for each bit in type transposition (Permuted Choice 1), Corresponding rule for each bit in contracted transposition (Permuted Choice 2), data output from the contracted transposition (Permuted Choice 1), and the contraction The data input to the permuted choice 2 is a bit-by-bit correspondence rule, and the correspondence rule of the substitution part is the data input to the S-BOX and the S May be that the corresponding rules for the data output from the BOX.

また、前記選択部がマルチプレクサであることとすることができる。   The selection unit can be a multiplexer.

また、本発明の暗号処理回路は、複数ビットの入力データを対応規則に基づいて変換して出力する共通鍵ブロック暗号方式の換字処理を行う暗号処理回路であって、前記複数ビットの入力データを受信し、受信した前記複数ビットの入力データを並列出力する出力ポートを有するデータ入力部と、前記データ入力部から並列出力される前記複数ビットの入力データを前記対応規則に基づいて変換して出力する論理回路である換字部と、前記換字部から出力される複数ビットのデータが並列入力される入力ポートを有し、前記入力ポートに入力された前記複数ビットのデータを出力するデータ出力部と、を備えることとする。   Further, the cryptographic processing circuit of the present invention is a cryptographic processing circuit that performs substitution processing of a common key block cryptosystem that converts and outputs a plurality of bits of input data based on a corresponding rule. A data input unit having an output port for receiving and receiving the received multi-bit input data in parallel; and converting and outputting the multi-bit input data output in parallel from the data input unit based on the correspondence rule And a data output unit that outputs the plurality of bits of data input to the input port, and includes a substitution unit that is a logic circuit that performs input and a plurality of bits of data output from the substitution unit. .

また、前記換字処理を行う暗号処理回路において、前記共通鍵ブロック暗号方式がDESであり、前記入力データが、F関数のS−BOXに入力されるデータであり、前記対応規則が、前記入力データと前記S−BOXから出力されるデータとの対応規則であることとしてもよい。   In the cryptographic processing circuit that performs the substitution processing, the common key block encryption method is DES, the input data is data input to an S-BOX of an F function, and the correspondence rule is the input data And the data output from the S-BOX.

また、前記データ入力部が複数のD型フリップフロップで構成され、前記出力ポートが当該複数のD型フリップフロップの出力端子であり、前記データ出力部がトライステートバッファであることとすることができる。   The data input unit may be composed of a plurality of D-type flip-flops, the output port may be an output terminal of the plurality of D-type flip-flops, and the data output unit may be a tri-state buffer. .

また、前記データ入力部への書き込みアドレスと前記データ出力部からの読み出しアドレスとが同一であることとすることができる。   The write address to the data input unit and the read address from the data output unit can be the same.

共通鍵ブロック暗号方式における暗号化及び復号の処理を低消費電力で、かつ、高速に行うことができる。   Encryption and decryption processing in the common key block encryption method can be performed at low power consumption and at high speed.

==全体構成==
図1は、本発明の暗号処理回路を用いる一実施形態である自動車の錠の施錠・解錠を行うキーレスエントリーシステム1の全体構成を示す図である。キーレスエントリーシステム1は、携帯型の子機2と自動車等に搭載される親機3とを含んで構成されている。子機2は、例えば、自動車のドアロックやステアリングロックの鍵穴に差し込むキーのハンドル部等に設けられている。また、親機3は、自動車側に設けられている。
== Overall structure ==
FIG. 1 is a diagram showing an overall configuration of a keyless entry system 1 that locks and unlocks a car lock, which is an embodiment using the cryptographic processing circuit of the present invention. The keyless entry system 1 includes a portable child device 2 and a parent device 3 mounted on an automobile or the like. The subunit | mobile_unit 2 is provided in the handle | steering-wheel part of the key etc. which are inserted in the keyhole of a door lock of a motor vehicle, or a steering lock, for example. Moreover, the main | base station 3 is provided in the motor vehicle side.

子機2は、電池11、操作スイッチ12、データ処理回路13、及び送受信回路14を備えている。電池11は、子機2の各部の動作に必要な電力を供給するためのものである。操作スイッチ12は、利用者からの施錠・解錠の指示を受け付けるスイッチである。データ処理回路13は、施錠・解錠の際に必要となる認証用のデータの生成等を行う。送受信回路14は、データ処理回路13から出力されるデジタルデータをアナログデータに変換し、これを増幅して電磁波として送出する回路である。また、送受信回路14は、親機3から送出された電磁波を受信し、これをデジタルデータに変換してデータ処理回路13に入力することもできる。なお、電磁波としては、電波や赤外線が用いられる。   The subunit | mobile_unit 2 is provided with the battery 11, the operation switch 12, the data processing circuit 13, and the transmission / reception circuit 14. FIG. The battery 11 is for supplying electric power necessary for the operation of each part of the child device 2. The operation switch 12 is a switch that receives a locking / unlocking instruction from a user. The data processing circuit 13 generates authentication data necessary for locking / unlocking. The transmission / reception circuit 14 is a circuit that converts the digital data output from the data processing circuit 13 into analog data, amplifies it, and sends it as electromagnetic waves. In addition, the transmission / reception circuit 14 can receive an electromagnetic wave transmitted from the parent device 3, convert it into digital data, and input the digital data to the data processing circuit 13. Note that radio waves and infrared rays are used as the electromagnetic waves.

親機3は、データ処理回路21、送受信回路22、及び駆動回路23を備えている。データ処理回路21は、子機2から受信する認証用のデータに基づいた認証処理等を行う。送受信回路22は、子機2から送出された電磁波を受信し、これをデジタルデータに変換してデータ処理回路22に入力する回路である。また、送受信回路22は、データ処理回路21から出力されるデジタルデータをアナログデータに変換し、これを増幅して電磁波として送出することもできる。駆動回路23は、自動車の錠を施錠・解錠するロック機構を作動させるアクチュエータ24に駆動信号を送信する回路である。なお、親機2の各部21〜23には、自動車のバッテリ25から電力が供給されている。   The base unit 3 includes a data processing circuit 21, a transmission / reception circuit 22, and a drive circuit 23. The data processing circuit 21 performs an authentication process based on the authentication data received from the slave unit 2. The transmission / reception circuit 22 is a circuit that receives the electromagnetic wave transmitted from the slave unit 2, converts it into digital data, and inputs the digital data to the data processing circuit 22. The transmission / reception circuit 22 can also convert the digital data output from the data processing circuit 21 into analog data, amplify it, and send it out as electromagnetic waves. The drive circuit 23 is a circuit that transmits a drive signal to an actuator 24 that operates a lock mechanism that locks and unlocks the lock of the automobile. In addition, electric power is supplied to each part 21-23 of the main | base station 2 from the battery 25 of a motor vehicle.

==データ処理回路の構成==
図2は、データ処理回路13の構成を示す図である。データ処理回路13は、CPU51A、RAM(Random Access Memory)52A、EEPROM(Electrically Erasable Programmable Read-Only Memory)53A、乱数生成回路54A、暗号処理回路55A、及び入出力ポート56Aを備えている。そして、各部51A〜56Aはバス57Aにより互いに通信可能に接続されている。
== Configuration of Data Processing Circuit ==
FIG. 2 is a diagram illustrating a configuration of the data processing circuit 13. The data processing circuit 13 includes a CPU 51A, a RAM (Random Access Memory) 52A, an EEPROM (Electrically Erasable Programmable Read-Only Memory) 53A, a random number generation circuit 54A, an encryption processing circuit 55A, and an input / output port 56A. And each part 51A-56A is mutually connected by the bus | bath 57A so that communication is possible.

CPU51Aは、データ処理回路13の全体を制御するものである。RAM52Aには、CPU51Aが使用する作業用データ等が記憶される。EEPROM53Aは書き換え可能な不揮発性メモリであり、プログラムや保存用のデータ等が記憶されている。乱数生成回路54Aは、暗号化の処理において用いられる疑似乱数又は物理乱数を生成する回路である。暗号処理回路55Aは、共通鍵ブロック暗号方式における転置又は換字の処理を行う回路である。入出力ポート56Aは、データ処理回路13の外部にある操作スイッチ12や送受信回路14等とデータの送受信を行うためのインタフェースである。   The CPU 51A controls the entire data processing circuit 13. The RAM 52A stores work data used by the CPU 51A. The EEPROM 53A is a rewritable nonvolatile memory, and stores a program, data for storage, and the like. The random number generation circuit 54A is a circuit that generates a pseudo random number or a physical random number used in the encryption process. The encryption processing circuit 55A is a circuit that performs transposition or substitution processing in the common key block encryption method. The input / output port 56 </ b> A is an interface for transmitting / receiving data to / from the operation switch 12, the transmission / reception circuit 14, and the like outside the data processing circuit 13.

なお、本実施形態では、共通鍵ブロック暗号方式としてDES(Data Encryption Standard)を用いることとする。このようなデータ処理回路13では、プログラムの実行や暗号処理回路55Aの制御等により、DESの暗号化又は復号の処理が行われる。なお、データ処理回路21も同様の構成であり、CPU51B、RAM52B、EEPROM53B、乱数生成回路54B、暗号処理回路55B、入出力ポート56B、及び各部51B〜56Bを互いに通信可能に接続するバス57Bを備えている。   In this embodiment, DES (Data Encryption Standard) is used as the common key block encryption method. In such a data processing circuit 13, DES encryption or decryption processing is performed by executing a program or controlling the encryption processing circuit 55A. The data processing circuit 21 has the same configuration, and includes a CPU 51B, a RAM 52B, an EEPROM 53B, a random number generation circuit 54B, an encryption processing circuit 55B, an input / output port 56B, and a bus 57B that connects the units 51B to 56B so that they can communicate with each other. ing.

==通信手順==
図3は、キーレスエントリーシステム1の子機2と親機3との間における通信手順を示すフローチャートである。まず、子機2の操作スイッチ12の操作等により送信処理が起動される(S301)。子機2のデータ処理回路13は、EEPROM53Aに記憶されている車番(車体番号)を親機3に送信する(S302)。親機3のデータ処理回路21は、子機2から車番が送信されてくるのを待機しており(S303)、子機2から送信されてくる車番を受信すると、当該車番をEEPROM53Bに記憶されている車番と比較する(S304)。
== Communication procedure ==
FIG. 3 is a flowchart showing a communication procedure between the slave unit 2 and the master unit 3 of the keyless entry system 1. First, a transmission process is started by operating the operation switch 12 of the slave unit 2 (S301). The data processing circuit 13 of the subunit | mobile_unit 2 transmits the vehicle number (body number) memorize | stored in EEPROM53A to the main | base station 3 (S302). The data processing circuit 21 of the master unit 3 waits for the vehicle number to be transmitted from the slave unit 2 (S303). When the vehicle number transmitted from the slave unit 2 is received, the vehicle number is stored in the EEPROM 53B. (S304).

車番が一致しない場合(S304:NG)、親機3のデータ処理回路21は、別の自動車の車番が送信されてきたと判断し、受信待機処理に戻る(S303)。車番が一致すると(S304:OK)、データ処理回路21は、乱数生成回路54Bを用いて64ビットの一時鍵R0を生成する(S305)。そして、データ処理回路21は、この一時鍵R0を、EEPROM53Bに記憶されている共通鍵Kを用いてDESで暗号化して子機2に送信する(S306)。   If the vehicle numbers do not match (S304: NG), the data processing circuit 21 of the parent device 3 determines that the vehicle number of another vehicle has been transmitted, and returns to the reception standby process (S303). When the vehicle numbers match (S304: OK), the data processing circuit 21 generates a 64-bit temporary key R0 using the random number generation circuit 54B (S305). Then, the data processing circuit 21 encrypts this temporary key R0 with DES using the common key K stored in the EEPROM 53B and transmits it to the slave unit 2 (S306).

子機2のデータ処理回路13は、親機3から送信されてくる暗号化された一時鍵R0を受信すると、EEPROM53Aに記憶されている共通鍵Kを用いて一時鍵R0を復号する(S307)。続いて、データ処理回路13は、乱数生成回路54Aを用いて64ビットの一時鍵R1を生成する(S308)。そして、データ処理回路13は、この一時鍵R1を親機3から受信した一時鍵R0を用いてDESで暗号化して親機3に送信する(S309)。親機3のデータ処理回路21は、子機2から送信されてくる暗号化された一時鍵R1を受信すると、一時鍵R0を用いて一時鍵R1を復号する(S310)。   Upon receiving the encrypted temporary key R0 transmitted from the parent device 3, the data processing circuit 13 of the child device 2 decrypts the temporary key R0 using the common key K stored in the EEPROM 53A (S307). . Subsequently, the data processing circuit 13 generates a 64-bit temporary key R1 using the random number generation circuit 54A (S308). Then, the data processing circuit 13 encrypts this temporary key R1 with DES using the temporary key R0 received from the parent device 3 and transmits it to the parent device 3 (S309). When receiving the encrypted temporary key R1 transmitted from the child device 2, the data processing circuit 21 of the parent device 3 decrypts the temporary key R1 using the temporary key R0 (S310).

その後、子機2のデータ処理回路13は、施錠・解錠指示等の情報データを、一時鍵R1を用いてDESで暗号化して親機3に送信する(S311)。親機3のデータ処理回路21は、子機2から送信されてくる暗号化された情報データを受信すると、一時鍵R1を用いて情報データを復号する(S312)。そして、データ処理回路21は、情報データに基づいて、例えば、駆動回路23を介してアクチュエータ24に施錠・解錠指示信号を送信する。   Thereafter, the data processing circuit 13 of the slave unit 2 encrypts information data such as a lock / unlock instruction with DES using the temporary key R1 and transmits it to the master unit 3 (S311). When receiving the encrypted information data transmitted from the child device 2, the data processing circuit 21 of the parent device 3 decrypts the information data using the temporary key R1 (S312). Then, the data processing circuit 21 transmits a locking / unlocking instruction signal to the actuator 24 via the drive circuit 23 based on the information data, for example.

このように、キーレスエントリーシステム1においては、子機2及び親機3において乱数生成回路54A,54Bを用いて一時鍵を生成し、DESによる暗号化及び復号の処理を繰り返し行うことにより、セキュリティ強度を高めている。   As described above, in the keyless entry system 1, the slave unit 2 and the master unit 3 generate temporary keys using the random number generation circuits 54A and 54B, and repeat the encryption and decryption processing by DES, thereby increasing the security strength. Is increasing.

==DESの暗号化・復号の処理==
図4は、DESの暗号化の処理の流れを示すフローチャートである。DESの暗号化処理は、第1段から第16段までの処理で構成されている。まず、暗号化の対象となる64ビットの平文を初期転置(Initial Permutation)により並べ替え、第1段の入力データとなる左側の32ビット(L)及び右側の32ビット(R)を生成する(S401)。そして、第2段の入力データとなるL及びRは次式(1,2)により求められる。

Figure 2006215280
== DES Encryption / Decryption Processing ==
FIG. 4 is a flowchart showing a flow of DES encryption processing. The DES encryption process includes processes from the first stage to the 16th stage. First, the 64-bit plaintext to be encrypted is rearranged by initial permutation to generate the left 32 bits (L 0 ) and the right 32 bits (R 0 ) as the first stage input data. (S401). Then, L 1 and R 1 as the second stage input data are obtained by the following equations (1, 2).
Figure 2006215280

ここで、Kは64ビットの共通鍵から生成された鍵である。まず、64ビットの共通鍵を縮約型転置(Permuted Choice 1:以後「PC1転置」と称する)により56ビットに変換し、左側の28ビット(C)及び右側の28ビット(D)を生成する(S402)。さらに、C及びDを左ローテートシフトして、C及びDを生成する(S403,S404)。そして、C及びDを縮約型転置(Permuted Choice 2:以後「PC2転置」と称する)により48ビットに変換することにより、Kが得られる(S405)。また、C及びDをさらに左ローテートシフトし、PC2転置を行うことにより、第2段以降で用いられる鍵K〜K16を生成することができる。 Here, K 1 is a key generated from the 64-bit common key. First, a 64-bit common key is converted to 56 bits by contraction-type transposition (Permuted Choice 1: hereinafter referred to as “PC1 transposition”), and the left 28 bits (C 0 ) and the right 28 bits (D 0 ) Generate (S402). Further, C 0 and D 0 are left-shifted to generate C 1 and D 1 (S403, S404). Then, C 1 and D 1 are converted into 48 bits by contraction type transposition (Permuted Choice 2: hereinafter referred to as “PC2 transposition”), thereby obtaining K 1 (S405). Further, the keys K 2 to K 16 used in the second and subsequent stages can be generated by further left-shifting C 1 and D 1 and performing PC2 transposition.

このようにして求められたL及びRが第2段の入力データとなり、第16段まで繰り返し処理が実行される。つまり、L及びRは、次式(3,4)により求められる。

Figure 2006215280
L 1 and R 1 obtained in this way become the second stage input data, and the process is repeated up to the 16th stage. That, L n and R n is obtained by the following equation (3, 4).
Figure 2006215280

そして、第16段の出力データであるL16及びR16に対して最終転置(Inverse Initial Permutation)を行うことにより、平文を暗号化した暗号文を得ることができる(S406)。 Then, by performing the final transposition (Inverse Initial Permutation) on L 16 and R 16 as the output data of the 16th stage, it is possible to obtain a ciphertext obtained by encrypting the plaintext (S406).

図5は、F関数(F(R,K))の処理の流れを示す図である。まず、32ビットのデータRを拡大型転置により48ビットに変換し、R’を生成する(S501)。次に、R’と48ビットの鍵Kとをビット毎に排他的論理和することにより得られる48ビットのデータを6ビットずつに分割し、S1〜S8のS−BOXに入力する。そして、各S−BOXから出力される4ビットを合わせて構成される32ビットのデータを転置(以後「P転置」と称する)により並べ替えたデータがF関数の出力データとなる(S502)。   FIG. 5 is a diagram showing a flow of processing of the F function (F (R, K)). First, the 32-bit data R is converted into 48 bits by the expanded transposition to generate R ′ (S501). Next, the 48-bit data obtained by exclusive ORing R ′ and the 48-bit key K for each bit is divided into 6 bits and input to the S-BOX of S1 to S8. Then, the data obtained by rearranging the 32-bit data composed of the 4 bits output from each S-BOX by transposition (hereinafter referred to as “P transposition”) becomes the output data of the F function (S502).

図6は、DESの復号の処理の流れを示すフローチャートである。DESの復号処理は、暗号化処理と同様に第1段から第16のまでの処理で構成されている。まず、復号の対象となる64ビットの暗号文を初期転置により並べ替え、第1段の入力データとなる左側の32ビット(R16)及び右側の32ビット(L16)を生成する(S601)。そして、第2段の入力データとなるR15及びL15は次式(5)及び(6)により求められる。

Figure 2006215280
FIG. 6 is a flowchart showing the flow of the DES decoding process. The DES decryption process is composed of the processes from the first stage to the 16th stage as in the encryption process. First, the 64-bit ciphertext to be decrypted is rearranged by initial transposition to generate the left 32 bits (R 16 ) and the right 32 bits (L 16 ) as the first stage input data (S601). . Then, R 15 and L 15 as the second stage input data are obtained by the following equations (5) and (6).
Figure 2006215280

ここで、K16は、64ビットの共通鍵から生成された鍵である。まず、64ビットの共通鍵をPC1転置により56ビットに変換し、左側の28ビット(C16)及び右側の28ビット(D16)を生成する(S602)。そして、C16及びD16をPC2転置により48ビットに変換することにより、K16が得られる(S603)。また、C16及びD16を右ローテートシフトし、PC2転置を行うことにより、第2段以降で用いられる鍵K15〜Kを生成することができる。 Here, K 16 is a key generated from a 64-bit common key. First, the 64-bit common key is converted to 56 bits by PC1 transposition to generate the left 28 bits (C 16 ) and the right 28 bits (D 16 ) (S602). K 16 is obtained by converting C 16 and D 16 into 48 bits by PC2 transposition (S603). Also, keys K 15 to K 1 used in the second and subsequent stages can be generated by rotating C 16 and D 16 to the right and performing PC2 transposition.

このようにして求められたR15及びL15が第2段の入力データとなり、第16段まで繰り返し処理が実行される。つまり、RおよびLは、次式(7)及び(8)により求められることとなる。

Figure 2006215280
R 15 and L 15 obtained in this way become the second stage input data, and the process is repeated up to the 16th stage. That is, R n and L n are obtained by the following equations (7) and (8).
Figure 2006215280

そして、第16段の出力データであるR及びLに対して最終転置を行うことにより、暗号文を復号した平文を得ることができる(S604)。なお、復号処理におけるL、R、C、D、Kは、暗号化処理におけるL、R、C、D、Kと同一のものである。また、C=C16、D=D16である。 By performing the final permutation against R 0 and L 0 is the output data of the 16-stage, it is possible to obtain a plaintext decrypted ciphertext (S604). Incidentally, L n in the decoding process, R n, C n, D n, K n are those L n, R n, C n , D n, identical to the K n in the encryption process. Further, C 0 = C 16 and D 0 = D 16 are satisfied.

==暗号処理回路の構成==
本実施形態では、図4〜図6で説明した暗号化及び復号の処理における転置・換字処理が暗号処理回路55A,55Bを用いて実現されている。暗号処理回路55A及び暗号処理回路55Bは同様の構成であるため、以後、暗号処理回路55Aについて説明する。図7は、暗号処理回路55Aの構成を示す図である。暗号処理回路55Aは、入力レジスタ(データ入力部)61、転置・換字部62、出力バッファ(データ出力部)63、選択レジスタ64、マルチプレクサ65,66、及びアドレスデコーダ67を備えている。
== Configuration of Cryptographic Processing Circuit ==
In the present embodiment, transposition / substitution processing in the encryption and decryption processing described with reference to FIGS. 4 to 6 is implemented using the encryption processing circuits 55A and 55B. Since the cryptographic processing circuit 55A and the cryptographic processing circuit 55B have the same configuration, the cryptographic processing circuit 55A will be described below. FIG. 7 is a diagram showing the configuration of the cryptographic processing circuit 55A. The cryptographic processing circuit 55A includes an input register (data input unit) 61, a transposition / substitution unit 62, an output buffer (data output unit) 63, a selection register 64, multiplexers 65 and 66, and an address decoder 67.

入力レジスタ61は、複数のD型フリップフロップ(以後「D−FF」と称する)を用いて構成された64ビットのレジスタであり、D−FFの入力端子Dがバス57Aのデータバスに接続され、D−FFの出力端子Q(出力ポート)がマルチプレクサ65を介して転置・換字部62に接続されている。また、入力レジスタ61を構成するD−FFのクロック入力端子には、書き込み信号(WRITE)が入力される。なお、例えば、データバスが8ビットである場合には、入力レジスタ61は、8ビットのレジスタを8つ用いた構成とすることができる。   The input register 61 is a 64-bit register configured using a plurality of D-type flip-flops (hereinafter referred to as “D-FF”), and the input terminal D of the D-FF is connected to the data bus of the bus 57A. The output terminal Q (output port) of the D-FF is connected to the transposition / substitution unit 62 via the multiplexer 65. A write signal (WRITE) is input to the clock input terminal of the D-FF constituting the input register 61. For example, when the data bus is 8 bits, the input register 61 can be configured to use eight 8-bit registers.

転置・換字部62は、初期転置部71、最終転置部72、拡大型転置部73、S−BOX部74、P転置部75、PC1転置部76、ローテートシフト部77、及びPC2転置部78の8つのモジュールを備えている。転置・換字部62の各モジュール71〜78は、入力レジスタ61から入力されるデータに対して転置又は換字処理を行い、マルチプレクサ66を介して出力バッファ63に出力する。   The transposition / substitution unit 62 includes an initial transposition unit 71, a final transposition unit 72, an enlarged transposition unit 73, an S-BOX unit 74, a P transposition unit 75, a PC1 transposition unit 76, a rotate shift unit 77, and a PC2 transposition unit 78. Eight modules are provided. Each of the modules 71 to 78 of the transposition / substitution unit 62 performs transposition or substitution processing on the data input from the input register 61 and outputs the data to the output buffer 63 via the multiplexer 66.

なお、S−BOX部74が本発明の換字部に該当し、その他の各部71,72,73,75,76,77,78が本発明の転置部に該当する。また、選択レジスタ64、マルチプレクサ65、及びマルチプレクサ66が本発明の選択部に該当する。   The S-BOX part 74 corresponds to the substitution part of the present invention, and the other parts 71, 72, 73, 75, 76, 77, 78 correspond to the transposition part of the present invention. The selection register 64, the multiplexer 65, and the multiplexer 66 correspond to the selection unit of the present invention.

出力バッファ63は、64ビットのトライステートバッファであり、その64ビットの入力端子(入力ポート)にマルチプレクサ66を介して転置・換字部62が接続されており、出力端子がバス57Aのデータバスに接続されている。なお、例えば、データバスが8ビットである場合には、出力バッファ63は、8ビットのトライステートバッファを8つ用いた構成とすることができる。   The output buffer 63 is a 64-bit tri-state buffer. A transposition / substitution unit 62 is connected to the 64-bit input terminal (input port) via the multiplexer 66, and the output terminal is connected to the data bus of the bus 57A. It is connected. For example, when the data bus is 8 bits, the output buffer 63 can be configured to use eight 8-bit tristate buffers.

選択レジスタ64は、複数のD−FFを用いて構成された、例えば8ビットのレジスタであり、D−FFの入力端子Dがバス57Aのデータバスに接続され、D−FFの出力端子Qがマルチプレクサ65,66に接続されている。また、選択レジスタ64を構成するD−FFのクロック入力端子には、書き込み信号(WRITE)が入力される。選択レジスタ64には、転置・換字部62のうちの何れのモジュールを選択するかを示す選択データが書き込まれる。マルチプレクサ65は、選択レジスタ64から出力される選択データに基づいて、入力レジスタ61から出力されるデータを該当のモジュールに出力する。また、マルチプレクサ66は、選択レジスタ64から出力される選択データに基づいて、該当のモジュールから出力されるデータを出力バッファ63に出力する。   The selection register 64 is, for example, an 8-bit register configured by using a plurality of D-FFs. The input terminal D of the D-FF is connected to the data bus of the bus 57A, and the output terminal Q of the D-FF is The multiplexers 65 and 66 are connected. A write signal (WRITE) is input to the clock input terminal of the D-FF constituting the selection register 64. In the selection register 64, selection data indicating which module of the transposition / substitution unit 62 is selected is written. Based on the selection data output from the selection register 64, the multiplexer 65 outputs the data output from the input register 61 to the corresponding module. Further, the multiplexer 66 outputs the data output from the corresponding module to the output buffer 63 based on the selection data output from the selection register 64.

アドレスデコーダ67は、バス57Aのアドレスバスに接続されており、アドレスバスで指定されたアドレスに該当する回路を選択する。なお、本実施形態においては、入力レジスタ61への書き込みアドレスと、出力バッファ63からの読み出しアドレスは同一であることとする。   The address decoder 67 is connected to the address bus of the bus 57A and selects a circuit corresponding to the address specified by the address bus. In this embodiment, the write address to the input register 61 and the read address from the output buffer 63 are the same.

データ処理回路13において、暗号処理回路55Aを用いて転置又は換字処理を行う流れについて説明する。まず、CPU51Aは、アドレスバスに選択レジスタ64のアドレスを出力し、データバスに転置・換字部62の所望のモジュールを示す選択データを出力し、書き込み信号(WRITE)を出力することにより、選択レジスタに選択データを書き込む。続いて、CPU51Aは、アドレスバスに入力レジスタ61のアドレスを出力し、データバスに転置又は換字処理の入力データを出力し、書き込み信号(WRITE)を出力することにより、入力レジスタ61に当該入力データを書き込む。これにより、入力レジスタ61に入力されたデータがマルチプレクサ65を介して所望のモジュールに入力され、転置又は換字処理の結果がマルチプレクサ66を介して出力バッファ63に出力される。   A flow of performing transposition or substitution processing using the encryption processing circuit 55A in the data processing circuit 13 will be described. First, the CPU 51A outputs the address of the selection register 64 to the address bus, outputs selection data indicating a desired module of the transposition / substitution unit 62 to the data bus, and outputs a write signal (WRITE), thereby selecting the selection register. Write selection data to. Subsequently, the CPU 51A outputs the address of the input register 61 to the address bus, outputs the input data for transposition or substitution processing to the data bus, and outputs the write signal (WRITE), thereby inputting the input data to the input register 61. Write. As a result, the data input to the input register 61 is input to a desired module via the multiplexer 65, and the result of the transposition or substitution process is output to the output buffer 63 via the multiplexer 66.

その後、CPU51Aは、入力レジスタ61と同一のアドレスである出力バッファ63のアドレスをアドレスバスに出力し、出力バッファ63に読み出し信号(READ)を入力する。これにより、入力データに対して転置又は換字処理を行ったデータが出力バッファ63からデータバスに出力される。このように、CPU51Aは、入力レジスタ61にデータを書き込み、出力バッファ63からデータを読み出すだけで、転置又は換字処理を行うことができる。   Thereafter, the CPU 51A outputs the address of the output buffer 63, which is the same address as the input register 61, to the address bus, and inputs a read signal (READ) to the output buffer 63. As a result, data obtained by transposing or transposing the input data is output from the output buffer 63 to the data bus. As described above, the CPU 51A can perform transposition or substitution processing only by writing data to the input register 61 and reading data from the output buffer 63.

==転置・換字部の構成==
次に、転置・換字部62の各モジュール71〜78の構成について説明する。
== Configuration of transposition / substitution part ==
Next, the configuration of the modules 71 to 78 of the transposition / substitution unit 62 will be described.

(1)初期転置
図8は、初期転置におけるビット毎の対応規則91を示す図である。この対応規則91は、例えば、初期転置部71に入力される64ビットの入力データの58ビット目が出力データの1ビット目となり、入力データの50ビット目が出力データの2ビット目となるというような、64ビットの入力データと64ビットの出力データとのビット毎の対応を示すものである。
(1) Initial transposition FIG. 8 is a diagram showing a correspondence rule 91 for each bit in the initial transposition. According to the correspondence rule 91, for example, the 58th bit of the 64-bit input data input to the initial transposing unit 71 is the first bit of the output data, and the 50th bit of the input data is the second bit of the output data. This shows the correspondence for each bit of 64-bit input data and 64-bit output data.

図9は、初期転置部71の構成を示す図である。図に示すように、初期転置部71の入力側と出力側とが、対応規則91に基づいて結線されている。例えば、入力側の58ビット目が出力側の1ビット目となるように結線され、入力側の50ビット目が出力側の2ビット目となるように結線されている。つまり、初期転置部71は、マルチプレクサ65,66を介して、入力レジスタ61の出力端子Qと出力バッファ63の入力端子とを対応規則91に基づいて接続していることとなる。   FIG. 9 is a diagram illustrating a configuration of the initial transposition unit 71. As shown in the figure, the input side and the output side of the initial transposition unit 71 are connected based on the correspondence rule 91. For example, connection is made so that the 58th bit on the input side becomes the 1st bit on the output side, and the 50th bit on the input side becomes the 2nd bit on the output side. That is, the initial transposition unit 71 connects the output terminal Q of the input register 61 and the input terminal of the output buffer 63 via the multiplexers 65 and 66 based on the correspondence rule 91.

(2)最終転置
図10は、最終転置におけるビット毎の対応規則92を示す図である。この対応規則92は、例えば、最終転置部72に入力される64ビットの入力データの40ビット目が出力データの1ビット目となり、入力データの8ビット目が出力データの2ビット目となるというような、64ビットの入力データと64ビットの出力データとのビット毎の対応を示すものである。
(2) Final transposition FIG. 10 is a diagram showing a correspondence rule 92 for each bit in the final transposition. According to the correspondence rule 92, for example, the 40th bit of the 64-bit input data input to the final transposition unit 72 is the first bit of the output data, and the eighth bit of the input data is the second bit of the output data. This shows the correspondence for each bit of 64-bit input data and 64-bit output data.

図11は、最終転置部72の構成を示す図である。図に示すように、最終転置部72の入力側と出力側とが、対応規則92に基づいて結線されている。例えば、入力側の40ビット目が出力側の1ビット目となるように結線され、入力側の8ビット目が出力側の2ビット目となるように結線されている。つまり、最終転置部72は、マルチプレクサ65,66を介して、入力レジスタ61の出力端子Qと出力バッファ63の入力端子とを対応規則92に基づいて接続していることとなる。   FIG. 11 is a diagram illustrating a configuration of the final transposition unit 72. As shown in the figure, the input side and the output side of the final transposition unit 72 are connected based on the correspondence rule 92. For example, the connection is made so that the 40th bit on the input side becomes the 1st bit on the output side, and the 8th bit on the input side becomes the 2nd bit on the output side. That is, the final transposition unit 72 connects the output terminal Q of the input register 61 and the input terminal of the output buffer 63 via the multiplexers 65 and 66 based on the correspondence rule 92.

(3)拡大型転置
図12は、拡大型転置におけるビット毎の対応規則93を示す図である。この対応規則93は、例えば、拡大型転置部73に入力される32ビットの入力データの32ビット目が出力データの1ビット目となり、入力データの1ビット目が出力データの2ビット目となるというような、32ビットの入力データと48ビットの出力データとのビット毎の対応を示すものである。なお、拡大型転置においては、32ビットの入力データを48ビットの出力データに拡大するため、入力データのうちの16ビットは、出力データの2ビットに出力される。例えば、入力データの1ビット目は、出力データの2ビット目及び48ビット目の2ビットに出力される。
(3) Enlarged transposition FIG. 12 is a diagram showing a correspondence rule 93 for each bit in the expanded transposition. In the correspondence rule 93, for example, the 32nd bit of the 32-bit input data input to the expansion transposition unit 73 is the first bit of the output data, and the first bit of the input data is the second bit of the output data. The correspondence between each bit of 32-bit input data and 48-bit output data is shown. In the expanded transposition, since 32-bit input data is expanded to 48-bit output data, 16 bits of the input data are output as 2 bits of the output data. For example, the first bit of the input data is output to the second bit of the second bit and the 48th bit of the output data.

図13は、拡大型転置部73の構成を示す図である。図に示すように、拡大型転置部73の入力側と出力側とが、対応規則93に基づいて結線されている。例えば、入力側の32ビット目が出力側の1ビット目となるように結線され、入力側の1ビット目が出力側の2ビット目となるように結線されている。つまり、拡大型転置部73は、マルチプレクサ65,66を介して、入力レジスタ61の出力端子Qと出力バッファ63の入力端子とを対応規則93に基づいて接続していることとなる。   FIG. 13 is a diagram illustrating a configuration of the enlarged transposition unit 73. As shown in the figure, the input side and the output side of the enlarged transposition unit 73 are connected based on the correspondence rule 93. For example, the connection is made so that the 32nd bit on the input side becomes the 1st bit on the output side, and the 1st bit on the input side becomes the 2nd bit on the output side. That is, the enlarged transposition unit 73 connects the output terminal Q of the input register 61 and the input terminal of the output buffer 63 via the multiplexers 65 and 66 based on the correspondence rule 93.

(4)S−BOX
図14は、S−BOX部74の構成を示す図である。図に示すように、S−BOX部74は、S1〜S8で構成されており、48ビットの入力データの先頭から6ビットごとに分割したデータがS1〜S8に入力される。そして、例えば、S1においては、6ビットの入力データが対応規則に基づいて4ビットに変換されて出力される。同様に、S2〜S8においても、6ビットの入力データが夫々の対応規則に基づいて4ビットに変換されて出力される。
(4) S-BOX
FIG. 14 is a diagram illustrating a configuration of the S-BOX unit 74. As shown in the figure, the S-BOX unit 74 is composed of S1 to S8, and data divided every 6 bits from the head of the 48-bit input data is input to S1 to S8. Then, for example, in S1, 6-bit input data is converted into 4 bits based on the correspondence rule and output. Similarly, also in S2 to S8, 6-bit input data is converted into 4 bits based on the corresponding rules and output.

図15は、S−BOX(S1)における対応規則94を示す図である。この対応規則94では、S1に入力される6ビットの入力データの1ビット目と6ビット目(B1・B6)が行となり、入力データの2ビット目から5ビット目(B2〜B5)が列となり、その交差する箇所にあるデータが出力データとなる。例えば、入力データ“110000”がS1に入力されたとする。この場合、B1・B6は“10”となり、3行目が選択される。そして、B2〜B5は“1000”となり、これを10進で表した8列目が選択される。これにより、3行目の8列目にある10進の“15”を2進で表した“1111”が出力される。同様に、S2〜S8に対しても対応規則が定められている。   FIG. 15 is a diagram showing the correspondence rule 94 in the S-BOX (S1). In this correspondence rule 94, the first bit and the sixth bit (B1 and B6) of the 6-bit input data input to S1 are rows, and the second to fifth bits (B2 to B5) of the input data are columns. Thus, the data at the intersection is output data. For example, it is assumed that input data “110000” is input to S1. In this case, B1 and B6 are “10”, and the third row is selected. B2 to B5 are “1000”, and the eighth column representing this in decimal is selected. As a result, “1111” representing the decimal “15” in the eighth column of the third row in binary is output. Similarly, correspondence rules are defined for S2 to S8.

図16は、S−BOX部74のS1の構成を示す図である。図に示すように、S1は、セレクタ95及び置換回路96を備えている。また、S1〜S8共通で用いられる選択レジスタ97が設けられている。セレクタ95には、B1・B6が入力され、その入力に従い、対応規則94のどの行が選択されるかを示す信号を置換回路96に出力する。置換回路96には、B2〜B5を対応規則94の各行の値に変換する論理回路が構成されており、B2〜B5を、セレクタ95からの信号に基づいて変換して出力する。   FIG. 16 is a diagram showing the configuration of S1 of the S-BOX unit 74. As shown in FIG. As shown in the figure, S 1 includes a selector 95 and a replacement circuit 96. Further, a selection register 97 used in common for S1 to S8 is provided. B1 and B6 are input to the selector 95, and a signal indicating which row of the correspondence rule 94 is selected is output to the replacement circuit 96 in accordance with the input. The replacement circuit 96 includes a logic circuit that converts B2 to B5 into values of each row of the correspondence rule 94, and converts B2 to B5 based on a signal from the selector 95 and outputs the converted signal.

選択レジスタ97は、複数のD−FFを用いて構成された、例えば8ビットのレジスタであり、D−FFの入力端子Dがバス57Aのデータバスに接続され、D−FFの出力端子Qがセレクタ95に接続されている。そして、セレクタ95は、選択レジスタ97から出力される選択データに従って、B1とB6とを入れ替えることができる。例えば、セレクタ95は、選択レジスタ97から選択データ“0”が出力されている場合、B1・B6により対応規則94の行を選択する信号を置換回路96に出力し、選択レジスタ97から選択データ“1”が出力されている場合、B6・B1により対応規則94の行を選択する信号を置換回路96に出力するようにすることができる。   The selection register 97 is, for example, an 8-bit register configured using a plurality of D-FFs. The input terminal D of the D-FF is connected to the data bus of the bus 57A, and the output terminal Q of the D-FF is It is connected to the selector 95. The selector 95 can exchange B1 and B6 in accordance with the selection data output from the selection register 97. For example, when the selection data “0” is output from the selection register 97, the selector 95 outputs a signal for selecting the row of the correspondence rule 94 by B 1 and B 6 to the replacement circuit 96, and the selection data “0” is output from the selection register 97. When 1 ″ is output, a signal for selecting the row of the correspondence rule 94 can be output to the replacement circuit 96 by B6 and B1.

つまり、前述した入力データ“110000”の場合、選択レジスタ97から選択データ“1”が出力されている場合、B6・B1は“01”となり2行目が選択され、2行目の8列目にある10進の“10”を2進で表した“1010”が出力される。このように、選択レジスタ97に選択データを書き込むことにより、S1の対応規則94を変化させることができる。   In other words, in the case of the input data “110000” described above, when the selection data “1” is output from the selection register 97, B6 and B1 are “01”, the second row is selected, and the second column is in the eighth column. “1010”, which is a binary representation of “10” in decimal, is output. Thus, by writing the selection data into the selection register 97, the correspondence rule 94 of S1 can be changed.

また、S2〜S8についても、S1と同様に構成されている。つまり、S1〜S8で構成されるS−BOX部74は、マルチプレクサ65,66を介して、入力レジスタ61の出力端子Qから並列出力される入力データをS1〜S8の対応規則に基づいて変換して出力バッファ63の入力端子に出力する論理回路であると言うことができる。   Further, S2 to S8 are configured similarly to S1. That is, the S-BOX unit 74 composed of S1 to S8 converts the input data output in parallel from the output terminal Q of the input register 61 via the multiplexers 65 and 66 based on the correspondence rule of S1 to S8. It can be said that this is a logic circuit that outputs to the input terminal of the output buffer 63.

なお、本実施形態においては、最上位と最下位の2ビットをセレクタ95に入力し、残りの4ビットを置換回路96に入力する構成としたが、S−BOX部74の構成はこれに限られず、入力される6ビット(B1〜B6)から対応規則に基づいて4ビットを生成する論理回路であればよい。この場合においても、選択レジスタ97から出力される選択データに従って、入力される6ビット(B1〜B6)の並びを入れ替えるように構成することができる。   In the present embodiment, the most significant and least significant 2 bits are input to the selector 95 and the remaining 4 bits are input to the replacement circuit 96. However, the configuration of the S-BOX unit 74 is not limited to this. However, any logic circuit that generates 4 bits from the input 6 bits (B1 to B6) based on the correspondence rule may be used. Even in this case, the arrangement of the 6-bit (B1 to B6) input can be changed according to the selection data output from the selection register 97.

(5)P転置
図17は、P転置におけるビット毎の対応規則101を示す図である。この対応規則101は、例えば、最終転置部75に入力される32ビットの入力データの16ビット目が出力データの1ビット目となり、入力データの7ビット目が出力データの2ビット目となるというような、32ビットの入力データと32ビットの出力データとのビット毎の対応を示すものである。
(5) P transposition FIG. 17 is a diagram showing a correspondence rule 101 for each bit in P transposition. According to the correspondence rule 101, for example, the 16th bit of the 32-bit input data input to the final transposition unit 75 is the first bit of the output data, and the seventh bit of the input data is the second bit of the output data. This shows the correspondence of 32-bit input data and 32-bit output data for each bit.

図18は、P転置部75の構成を示す図である。図に示すように、P転置部75の入力側と出力側とが、対応規則101に基づいて結線されている。例えば、入力側の16ビット目が出力側の1ビット目となるように結線され、入力側の7ビット目が出力側の2ビット目となるように結線されている。つまり、P転置部75は、マルチプレクサ65,66を介して、入力レジスタ61の出力端子Qと出力バッファ63の入力端子とを対応規則101に基づいて接続していることとなる。   FIG. 18 is a diagram illustrating a configuration of the P transposition unit 75. As shown in the figure, the input side and the output side of the P transposition unit 75 are connected based on the correspondence rule 101. For example, wiring is made so that the 16th bit on the input side becomes the 1st bit on the output side, and the 7th bit on the input side becomes the 2nd bit on the output side. That is, the P transposition unit 75 connects the output terminal Q of the input register 61 and the input terminal of the output buffer 63 via the multiplexers 65 and 66 based on the correspondence rule 101.

(6)PC1転置
図19は、PC1転置におけるビット毎の対応規則102を示す図である。この対応規則102は、例えば、PC1転置部76に入力される64ビットの入力データの57ビット目が出力データの1ビット目となり、入力データの49ビット目が出力データの2ビット目となるというような、64ビットの入力データと56ビットの出力データとのビット毎の対応を示すものである。なお、PC1転置においては、64ビットの入力データを56ビットの出力データに縮約するため、入力データのうちの8ビットは出力データに出力されない。
(6) PC1 transposition FIG. 19 is a diagram showing the correspondence rule 102 for each bit in the PC1 transposition. According to the correspondence rule 102, for example, the 57th bit of the 64-bit input data input to the PC1 transposition unit 76 is the first bit of the output data, and the 49th bit of the input data is the second bit of the output data. This shows the correspondence for each bit of 64-bit input data and 56-bit output data. In the PC1 transposition, since 64-bit input data is reduced to 56-bit output data, 8 bits of the input data are not output to the output data.

図20は、PC1転置部76の構成を示す図である。図に示すように、PC1転置部76の入力側と出力側とが、対応規則102に基づいて結線されている。例えば、入力側の57ビット目が出力側の1ビット目となるように結線され、入力側の49ビット目が出力側の2ビット目となるように結線されている。つまり、PC1転置部76は、マルチプレクサ65,66を介して、入力レジスタ61の出力端子Qと出力バッファ63の入力端子とを対応規則102に基づいて接続していることとなる。   FIG. 20 is a diagram illustrating a configuration of the PC1 transposing unit 76. As shown in the figure, the input side and the output side of the PC1 transposing unit 76 are connected based on the correspondence rule 102. For example, the 57th bit on the input side is wired to be the first bit on the output side, and the 49th bit on the input side is wired to be the second bit on the output side. That is, the PC1 transposition unit 76 connects the output terminal Q of the input register 61 and the input terminal of the output buffer 63 via the multiplexers 65 and 66 based on the correspondence rule 102.

(7)ローテートシフト
図21は、ローテートシフトにおける入力データと出力データとの対応規則103を示す図である。つまり、対応規則103は、28ビットのC及び28ビットのDは、28ビットのC及び28ビットのDを1ビット左ローテートシフトすることにより得られ、C及びDは、C及びDを1ビット左ローテートシフトすることにより得られ、C及びDは、C及びDを2ビット左ローテートシフトすることにより得られることを示している。このように、対応規則103においては、C〜C16及びD〜D16までのローテート数が示されている。なお、左ローテートシフトの処理は入力データの各ビットと出力データの各ビットとが1対1で対応したものであり、他の転置処理と同様にビット毎の対応規則であると言うことができる。
(7) Rotate Shift FIG. 21 is a diagram showing the correspondence rule 103 between input data and output data in the rotate shift. In other words, the correspondence rule 103 is obtained by rotating the 28-bit C 1 and the 28-bit D 1 to the left by rotating the 28-bit C 0 and the 28-bit D 0 by 1 bit, and C 2 and D 2 are C 1 and D 1 are obtained by 1-bit left rotate shift, and C 3 and D 3 indicate that C 2 and D 2 are obtained by 2-bit left rotate shift. Thus, in the correspondence rule 103, the rotation numbers from C 1 to C 16 and D 1 to D 16 are shown. Note that the left rotate shift process is a one-to-one correspondence between each bit of the input data and each bit of the output data, and it can be said that it is a correspondence rule for each bit as in the other transposition processes. .

図22は、ローテートシフト部77の構成を示す図である。図は、ローテートシフト部77のうち、C及びDからC及びDを生成する部分を示すものであり、入力側のC及びDを夫々1ビット左ローテートシフトして出力側にC及びDとして出力されるように結線されている。また、C及びDからC〜C16及びD〜D16を生成する部分についても、同様に構成されている。つまり、ローテートシフト部77は、マルチプレクサ65,66を介して、入力レジスタ61の出力端子Qと出力バッファ63の入力端子とを対応規則103に基づいて接続していることとなる。 FIG. 22 is a diagram illustrating a configuration of the rotate shift unit 77. Figure, of the rotate shift unit 77, which shows a portion for generating a C 1 and D 1 from C 0 and D 0, the C 0 and D 0 of the input side each 1-bit left rotate shift to the output side Are connected so as to be output as C 1 and D 1 . As for the portion where the C 0 and D 0 to generate a C 2 -C 16 and D 2 to D 16, and is configured similarly. That is, the rotate shift unit 77 connects the output terminal Q of the input register 61 and the input terminal of the output buffer 63 via the multiplexers 65 and 66 based on the correspondence rule 103.

なお、C〜C16及びD〜D16を生成するローテートシフト部77を、例えば、C及びDを生成する回路、C及びDを生成する回路、というように夫々別々に構成することも可能であるが、これらをまとめて構成することも可能である。つまり、ローテートシフト部77は、入力レジスタ61から出力されるC及びDから、C〜C16及びD〜D16を一度に生成し、出力バッファ63に出力するようにすることも可能である。この場合、出力バッファ63は56ビット(7バイト)を16倍した112バイト以上の容量が必要である。このように、C〜C16及びD〜D16を一度に生成するようにすることで、鍵K〜K16を生成するためのローテートシフトを一度の処理で行うことができるため、暗号化及び復号の処理の処理速度を向上させることができる。 It should be noted that the rotation shift unit 77 that generates C 1 to C 16 and D 1 to D 16 is separately provided, for example, a circuit that generates C 1 and D 1, and a circuit that generates C 2 and D 2. Although it is possible to configure, it is also possible to configure these together. In other words, the rotate shift unit 77 may generate C 1 to C 16 and D 1 to D 16 at a time from C 0 and D 0 output from the input register 61 and output them to the output buffer 63. Is possible. In this case, the output buffer 63 needs to have a capacity of 112 bytes or more obtained by multiplying 56 bits (7 bytes) by 16. In this way, by generating C 1 to C 16 and D 1 to D 16 at a time, the rotation shift for generating the keys K 1 to K 16 can be performed in a single process. The processing speed of the encryption and decryption processes can be improved.

(8)PC2転置
図23は、PC2転置におけるビット毎の対応規則104を示す図である。この対応規則104は、例えば、PC2転置部78に入力される56ビットの入力データの14ビット目が出力データの1ビット目となり、入力データの17ビット目が出力データの2ビット目となるというような、56ビットの入力データと48ビットの出力データとのビット毎の対応を示すものである。なお、PC2転置においては、56ビットの入力データを48ビットの出力データに縮約するため、入力データのうちの8ビットは出力データに出力されない。
(8) PC2 transposition FIG. 23 is a diagram showing the correspondence rule 104 for each bit in the PC2 transposition. According to this correspondence rule 104, for example, the 14th bit of the 56-bit input data input to the PC2 transposition unit 78 is the first bit of the output data, and the 17th bit of the input data is the second bit of the output data. This shows the bit-by-bit correspondence between 56-bit input data and 48-bit output data. In PC2 transposition, since 56-bit input data is reduced to 48-bit output data, 8 bits of the input data are not output to the output data.

図24は、PC2転置部78の構成を示す図である。図に示すように、PC2転置部78の入力側と出力側とが、対応規則104に基づいて結線されている。例えば、入力側の14ビット目が出力側の1ビット目となるように結線され、入力側の17ビット目が出力側の2ビット目となるように結線されている。つまり、PC2転置部78は、マルチプレクサ65,66を介して、入力レジスタ61の出力端子Qと出力バッファ63の入力端子とを対応規則104に基づいて接続していることとなる。   FIG. 24 is a diagram illustrating a configuration of the PC2 transposing unit 78. As shown in the figure, the input side and the output side of the PC2 transposition unit 78 are connected based on the correspondence rule 104. For example, wiring is made so that the 14th bit on the input side becomes the 1st bit on the output side, and the 17th bit on the input side becomes the 2nd bit on the output side. In other words, the PC2 transposing unit 78 connects the output terminal Q of the input register 61 and the input terminal of the output buffer 63 via the multiplexers 65 and 66 based on the correspondence rule 104.

以上、本発明の一実施形態である暗号処理回路55A,55Bを適用したキーレスエントリーシステム1について説明した。前述したように、暗号処理回路55A,55Bは、共通鍵ブロック暗号方式であるDESの転置処理を行う回路であり、転置が必要な入力データを入力レジスタ61に書き込むだけで、転置・換字部62によって対応規則に基づいて接続された出力バッファ63から、転置された結果のデータを得ることができる。つまり、当該暗号処理回路55A,55Bにおいては、ソフトウェアによる対応表の参照等の処理を行うことなく転置が可能であり、低消費電力で、かつ、高速に暗号化及び復号を行うことができる。   The keyless entry system 1 to which the cryptographic processing circuits 55A and 55B according to the embodiment of the present invention are applied has been described above. As described above, the cryptographic processing circuits 55A and 55B are circuits that perform transposition processing of DES, which is a common key block cipher system, and by simply writing input data that requires transposition to the input register 61, the transposition / substitution unit 62 Thus, the transposed result data can be obtained from the output buffer 63 connected based on the correspondence rule. That is, the encryption processing circuits 55A and 55B can be transposed without performing processing such as referring to the correspondence table by software, and can perform encryption and decryption with low power consumption and high speed.

なお、暗号処理回路55A,55Bには、DESの転置処理を行う初期転置部71、最終転置部72、拡大型転置部73、P転置部75、PC1転置部76、ローテートシフト部77、及びPC2転置部78が設けられており、これらの各部によって実行される転置処理を低消費電力で、かつ、高速に行うことができる。   The cryptographic processing circuits 55A and 55B include an initial transposition unit 71, a final transposition unit 72, an enlarged transposition unit 73, a P transposition unit 75, a PC1 transposition unit 76, a rotate shift unit 77, and PC2 that perform DES transposition processing. A transposition unit 78 is provided, and transposition processing executed by these units can be performed at low power consumption and at high speed.

また、暗号処理回路55A,55Bでは、転置処理を行う各モジュール71,72,73,75,76,77,78において入力レジスタ61が共有されており、選択レジスタ64及びマルチプレクサ65によって、所望のモジュールにデータが入力される。このように、入力レジスタ61を共有することにより、モジュールごとに入力レジスタを設ける場合と比較して部品数を削減することができ、回路全体の消費電力を削減することができる。   Further, in the cryptographic processing circuits 55A and 55B, the input register 61 is shared by the modules 71, 72, 73, 75, 76, 77, and 78 that perform the transposition processing, and a desired module is obtained by the selection register 64 and the multiplexer 65. Data is input to. Thus, by sharing the input register 61, the number of components can be reduced as compared with the case where an input register is provided for each module, and the power consumption of the entire circuit can be reduced.

また、さらに、暗号処理回路55A,55Bは、DESの換字処理であるS−BOXの処理を行うS−BOX部74を備えており、換字が必要な入力データを入力レジスタ61に書き込むだけで、対応規則に基づいて換字された結果のデータを得ることができる。つまり、当該暗号処理回路55A,55Bにおいては、ソフトウェアによる対応表の参照等の処理を行うことなく換字が可能であり、低消費電力で、かつ、高速に暗号化及び復号を行うことができる。   Furthermore, the cryptographic processing circuits 55A and 55B are provided with an S-BOX unit 74 that performs S-BOX processing, which is DES substitution processing, and only writes input data that requires substitution into the input register 61. Data obtained as a result of substitution according to the correspondence rule can be obtained. That is, in the encryption processing circuits 55A and 55B, substitution is possible without performing processing such as referring to the correspondence table by software, and encryption and decryption can be performed at low speed with low power consumption.

なお、本実施形態の暗号処理回路55A,55Bにおいては、転置または換字を行う複数のモジュール71〜78を備え、選択レジスタ64及びマルチプレクサ65,66を用いて使用するモジュール71〜78を切り替えることとしたが、各モジュール71〜78を個別に構成することとしてもよい。例えば、初期転置のみを行う暗号処理回路を構成することも可能である。   Note that the cryptographic processing circuits 55A and 55B according to the present embodiment include a plurality of modules 71 to 78 that perform transposition or substitution, and the modules 71 to 78 to be used are switched using the selection register 64 and the multiplexers 65 and 66. However, the modules 71 to 78 may be configured individually. For example, it is possible to configure a cryptographic processing circuit that performs only initial transposition.

また、暗号処理回路55A,55Bにおいては、入力レジスタ61からの出力データを転置・換字部62に振り分ける回路として、マルチプレクサ65が用いられている。データを振り分ける回路としては、マルチプレクサ65以外にもトライステートバッファを用いることも可能である。しかし、一般的に、トライステートバッファよりもマルチプレクサの方が、出力の指示を受けてから対象のデータが出力されるまでの時間が短い。そのため、暗号処理回路55A,55Bに、トライステートバッファよりも動作の速いマルチプレクサ65を用いることにより、暗号化及び復号の処理速度を向上させることができる。   In the cryptographic processing circuits 55A and 55B, a multiplexer 65 is used as a circuit that distributes output data from the input register 61 to the transposition / substitution unit 62. In addition to the multiplexer 65, a tristate buffer can be used as a circuit for distributing data. However, in general, a multiplexer takes less time to receive target data after receiving an output instruction than a tri-state buffer. Therefore, by using the multiplexer 65 that operates faster than the tristate buffer in the encryption processing circuits 55A and 55B, the processing speed of encryption and decryption can be improved.

また、暗号処理回路55A,55Bでは、複数のD−FFで構成された入力レジスタ61によりデータ入力部が実現され、トライステートバッファで構成された出力バッファ63によりデータ出力部が実現されている。これ以外にも、データ入力部には、書き込まれたデータを記憶しておくメモリ等を用いることも可能である。しかし、メモリを用いる場合、書き込まれたデータを転置・換字部62の各モジュールに読み出す動作(クロック)が必要となる。そこで、本実施形態の暗号処理回路55A,55Bの構成とすることにより、入力レジスタ61にデータが書き込まれると同時に、転置または換字された結果のデータが出力バッファ63に入力され、出力バッファ63から当該データを読み出すことが可能となる。つまり、転置・換字処理に必要なクロック数が削減され、低消費電力で、かつ、高速に暗号化及び復号を行うことができる。   In the cryptographic processing circuits 55A and 55B, a data input unit is realized by an input register 61 configured by a plurality of D-FFs, and a data output unit is realized by an output buffer 63 configured by a tristate buffer. In addition to this, it is also possible to use a memory or the like for storing written data in the data input unit. However, when a memory is used, an operation (clock) for reading the written data to each module of the transposition / substitution unit 62 is required. Therefore, by adopting the configuration of the cryptographic processing circuits 55A and 55B of this embodiment, data is written into the input register 61, and at the same time, the data resulting from transposition or substitution is input to the output buffer 63, and is output from the output buffer 63. The data can be read out. That is, the number of clocks required for transposition / substitution processing is reduced, and low-power consumption and high-speed encryption and decryption can be performed.

また、暗号処理回路55A,55Bにおいては、入力レジスタ61への書き込みアドレスと出力バッファ63からの読み出しアドレスとが同一である。これにより、転置または換字を行う際には、あるアドレスにデータを書き込み、そのアドレスからデータを読み出せばよいため、プログラムにおいてアドレス変換等の処理が不要であり、処理ステップを削減することができる。したがって、暗号化及び復号の処理における消費電力を低減し、かつ、処理速度を向上させることができる。   In the cryptographic processing circuits 55A and 55B, the write address to the input register 61 and the read address from the output buffer 63 are the same. As a result, when transposition or substitution is performed, it is only necessary to write data to a certain address and read data from the address, so that processing such as address conversion in the program is unnecessary, and processing steps can be reduced. . Therefore, it is possible to reduce power consumption in the encryption and decryption processes and to improve the processing speed.

このように、消費電力を低減し、かつ、処理速度を向上させた暗号処理回路55A,55Bをキーレスエントリーシステム1に適用することにより、子機2の電池11の消費や親機3のバッテリ25の消費を抑えることができる。また、暗号化及び復号の処理が高速に行われることにより、施錠や解錠等の操作に対するレスポンスを向上させることができる。   Thus, by applying the cryptographic processing circuits 55A and 55B with reduced power consumption and improved processing speed to the keyless entry system 1, the battery 11 of the slave unit 2 and the battery 25 of the master unit 3 are consumed. Consumption can be reduced. In addition, since the encryption and decryption processes are performed at high speed, the response to operations such as locking and unlocking can be improved.

以上、本発明の実施形態について説明したが、上記実施形態は本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物も含まれる。   As mentioned above, although embodiment of this invention was described, the said embodiment is for making an understanding of this invention easy, and is not for limiting and interpreting this invention. The present invention can be changed and improved without departing from the gist thereof, and the present invention includes equivalents thereof.

例えば、本実施形態では、暗号処理回路55A,55Bを用いてDESの暗号化及び復号を行うことができることを説明したが、DESに限らず、トリプルDESの暗号化及び復号においても、暗号処理回路55A,55Bを用いることが可能である。また、共通鍵ブロック暗号方式であるAES(Advanced Encryption Standard)についても、同様の構成により転置または換字の処理を行う暗号処理回路を実現することができる。   For example, in the present embodiment, it has been described that encryption and decryption of DES can be performed using the encryption processing circuits 55A and 55B. However, the encryption processing circuit is not limited to DES but also in encryption and decryption of triple DES. 55A and 55B can be used. Also, with respect to AES (Advanced Encryption Standard), which is a common key block encryption method, it is possible to realize an encryption processing circuit that performs transposition or substitution processing with the same configuration.

また、本実施形態においては、暗号処理回路55A,55Bの適用例としてキーレスエントリーシステム1をあげたが、キーレスエントリーシステム1に限らず、例えばICカードを用いた自動改札システムや入退室管理システム等、データの暗号化が必要な様々なシステムに適用することが可能である。   In the present embodiment, the keyless entry system 1 is given as an application example of the cryptographic processing circuits 55A and 55B. However, the keyless entry system 1 is not limited to the keyless entry system 1. For example, an automatic ticket gate system using an IC card, an entrance / exit management system, etc. The present invention can be applied to various systems that require data encryption.

本発明の暗号処理回路を用いる一実施形態である自動車の錠の施錠・解錠を行うキーレスエントリーシステムの全体構成を示す図である。1 is a diagram showing an overall configuration of a keyless entry system that locks and unlocks a car lock, which is an embodiment using the cryptographic processing circuit of the present invention. FIG. データ処理回路の構成を示す図である。It is a figure which shows the structure of a data processing circuit. キーレスエントリーシステムの子機と親機との間における通信手順を示すフローチャートである。It is a flowchart which shows the communication procedure between the subunit | mobile_unit and parent | base_device of a keyless entry system. DESの暗号化の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of DES encryption. F関数(F(R,K))の処理の流れを示す図である。It is a figure which shows the flow of a process of F function (F (R, K)). DESの復号の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of DES decoding. 暗号処理回路の構成を示す図である。It is a figure which shows the structure of a cryptographic processing circuit. 初期転置におけるビット毎の対応規則を示す図である。It is a figure which shows the correspondence rule for every bit in initial transposition. 初期転置部の構成を示す図である。It is a figure which shows the structure of an initial transposition part. 最終転置におけるビット毎の対応規則を示す図である。It is a figure which shows the correspondence rule for every bit in final transposition. 最終転置部の構成を示す図である。It is a figure which shows the structure of the last transposition part. 拡大型転置におけるビット毎の対応規則を示す図である。It is a figure which shows the correspondence rule for every bit in expansion type transposition. 拡大型転置部の構成を示す図である。It is a figure which shows the structure of an expansion type transposition part. S−BOX部の構成を示す図である。It is a figure which shows the structure of a S-BOX part. S−BOX(S1)における対応規則を示す図である。It is a figure which shows the corresponding | compatible rule in S-BOX (S1). S−BOX部のS1の構成を示す図である。It is a figure which shows the structure of S1 of an S-BOX part. P転置におけるビット毎の対応規則を示す図である。It is a figure which shows the correspondence rule for every bit in P transposition. P転置部の構成を示す図である。It is a figure which shows the structure of P transposition part. PC1転置におけるビット毎の対応規則を示す図である。It is a figure which shows the correspondence rule for every bit in PC1 transposition. PC1転置部の構成を示す図である。It is a figure which shows the structure of PC1 transposition part. ローテートシフトにおけるローテート数を示す図である。It is a figure which shows the number of rotations in a rotation shift. ローテートシフト部の構成を示す図である。It is a figure which shows the structure of a rotation shift part. PC2転置におけるビット毎の対応規則を示す図である。It is a figure which shows the correspondence rule for every bit in PC2 transposition. PC2転置部の構成を示す図である。It is a figure which shows the structure of PC2 transposition part.

符号の説明Explanation of symbols

1 キーレスエントリーシステム 2 子機
3 親機 11 電池
12 操作スイッチ 13,21 データ処理回路
14,22 送受信回路 23 駆動回路
24 アクチュエータ 25 バッテリ
51A,51B CPU 52A,52B RAM
53A,53B EEPROM 54A,54B 乱数生成回路
55A,55B 暗号処理回路 56A,56B 入出力ポート
61 入力レジスタ 62 転置・換字部
63 出力バッファ 64 選択レジスタ
65,66 マルチプレクサ 67 アドレスデコーダ
71 初期転置部 72 最終転置部
73 拡大型転置部 74 S−BOX部
75 P転置部 76 PC1転置部
77 ローテートシフト部 78 PC2転置部
95 セレクタ 96 置換回路
97 選択レジスタ
DESCRIPTION OF SYMBOLS 1 Keyless entry system 2 Slave unit 3 Master unit 11 Battery 12 Operation switch 13, 21 Data processing circuit 14, 22 Transmission / reception circuit 23 Drive circuit 24 Actuator 25 Battery 51A, 51B CPU 52A, 52B RAM
53A, 53B EEPROM 54A, 54B Random number generation circuit 55A, 55B Cryptographic processing circuit 56A, 56B I / O port 61 Input register 62 Transposition / substitution unit 63 Output buffer 64 Selection register 65, 66 Multiplexer 67 Address decoder 71 Initial transposition unit 72 Final transposition Part 73 expansion type transposition part 74 S-BOX part 75 P transposition part 76 PC1 transposition part 77 rotate shift part 78 PC2 transposition part 95 selector 96 replacement circuit 97 selection register

Claims (17)

複数ビットの入力データをビット毎の対応規則に基づいて並べ替えて出力する共通鍵ブロック暗号方式の転置処理を行う暗号処理回路であって、
前記複数ビットの入力データを受信し、受信した前記複数ビットの入力データを並列出力する出力ポートを有するデータ入力部と、
複数ビットのデータが並列入力される入力ポートを有し、前記入力ポートに入力された前記複数ビットのデータを出力するデータ出力部と、
前記出力ポートと前記入力ポートとを、前記ビット毎の対応規則に基づいて接続する転置部と、
を備えることを特徴とする暗号処理回路。
A cipher processing circuit that performs transposition processing of a common key block cipher scheme that rearranges and outputs a plurality of bits of input data based on a bit-by-bit correspondence rule,
A data input unit having an output port for receiving the multi-bit input data and outputting the received multi-bit input data in parallel;
A data output unit having an input port to which a plurality of bits of data are input in parallel, and outputting the plurality of bits of data input to the input port;
A transposition unit for connecting the output port and the input port based on the correspondence rule for each bit;
A cryptographic processing circuit comprising:
請求項1に記載の暗号処理回路であって、
前記共通鍵ブロック暗号方式がDESであり、
前記入力データが、初期転置(Initial Permutation)における入力データであり、
前記ビット毎の対応規則が、前記初期転置におけるビット毎の対応規則であることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 1,
The common key block encryption method is DES,
The input data is input data in initial permutation,
The cryptographic processing circuit, wherein the correspondence rule for each bit is a correspondence rule for each bit in the initial transposition.
請求項1に記載の暗号処理回路であって、
前記共通鍵ブロック暗号方式がDESであり、
前記入力データが、最終転置(Inverse Initial Permutation)における入力データであり、
前記ビット毎の対応規則が、前記最終転置におけるビット毎の対応規則であることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 1,
The common key block encryption method is DES,
The input data is input data in the last transposition (Inverse Initial Permutation),
The cryptographic processing circuit, wherein the correspondence rule for each bit is a correspondence rule for each bit in the final transposition.
請求項1に記載の暗号処理回路であって、
前記共通鍵ブロック暗号方式がDESであり、
前記入力データが、F関数の拡大型転置における入力データであり、
前記ビット毎の対応規則が、前記F関数の拡大型転置におけるビット毎の対応規則であることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 1,
The common key block encryption method is DES,
The input data is input data in an expanded transposition of the F function,
The cryptographic processing circuit, wherein the correspondence rule for each bit is a correspondence rule for each bit in the expanded transposition of the F function.
請求項1に記載の暗号処理回路であって、
前記共通鍵ブロック暗号方式がDESであり、
前記入力データが、F関数のS−BOXから出力されるデータであり、
前記ビット毎の対応規則が、前記F関数の当該入力データが入力される転置におけるビット毎の対応規則であることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 1,
The common key block encryption method is DES,
The input data is data output from the S-BOX of the F function,
The cryptographic processing circuit, wherein the correspondence rule for each bit is a correspondence rule for each bit in transposition to which the input data of the F function is input.
請求項1に記載の暗号処理回路であって、
前記共通鍵ブロック暗号方式がDESであり、
前記入力データが、縮約型転置(Permuted Choice 1)に入力される共通鍵であり、
前記ビット毎の対応規則が、前記縮約型転置におけるビット毎の対応規則であることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 1,
The common key block encryption method is DES,
The input data is a common key input to a contracted transposition (Permuted Choice 1),
The cryptographic processing circuit, wherein the correspondence rule for each bit is a correspondence rule for each bit in the reduced transpose.
請求項1に記載の暗号処理回路であって、
前記共通鍵ブロック暗号方式がDESであり、
前記入力データが、縮約型転置(Permuted Choice 2)における入力データであり、
前記ビット毎の対応規則が、前記縮約型転置におけるビット毎の対応規則であることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 1,
The common key block encryption method is DES,
The input data is input data in a contracted transposition (Permuted Choice 2),
The cryptographic processing circuit, wherein the correspondence rule for each bit is a correspondence rule for each bit in the reduced transpose.
請求項1に記載の暗号処理回路であって、
前記共通鍵ブロック暗号方式がDESであり、
前記入力データが、共通鍵を縮約型転置(Permuted Choice 1)により転置して得られたデータであり、
前記ビット毎の対応規則が、当該入力データと、縮約型転置(Permuted Choice 2)に入力されるデータと、のビット毎の対応規則であることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 1,
The common key block encryption method is DES,
The input data is data obtained by transposing a common key by contracted transposition (Permuted Choice 1),
The cryptographic processing circuit, wherein the correspondence rule for each bit is a correspondence rule for each bit of the input data and data input to a contracted transposition (Permuted Choice 2).
請求項1に記載の暗号処理回路であって、
前記ビット毎の対応規則が異なる前記転置部を複数備え、
前記複数の転置部のうちの何れの転置部を用いるかを示す選択データを受信し、前記データ入力部から出力される前記入力データを前記選択データによって示される前記転置部に入力する選択部を更に備えることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 1,
A plurality of the transposition units having different correspondence rules for each bit,
A selection unit that receives selection data indicating which of the plurality of transposition units is to be used, and that inputs the input data output from the data input unit to the transposition unit indicated by the selection data; An encryption processing circuit further comprising:
請求項9に記載の暗号処理回路であって、
前記共通鍵ブロック暗号方式がDESであり、
前記複数の転置部の前記ビット毎の対応規則が、夫々、
初期転置におけるビット毎の対応規則、
最終転置におけるビット毎の対応規則、
F関数の拡大型転置におけるビット毎の対応規則、
F関数のS−BOXから出力されるデータが入力される転置におけるビット毎の対応規則、
縮約型転置(Permuted Choice 1)におけるビット毎の対応規則、
縮約型転置(Permuted Choice 2)におけるビット毎の対応規則、
前記縮約型転置(Permuted Choice 1)から出力されるデータと、前記縮約型転置(Permuted Choice 2)に入力されるデータと、のビット毎の対応規則 の何れかであることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 9,
The common key block encryption method is DES,
The correspondence rule for each bit of the plurality of transposition units is respectively
Bit-by-bit correspondence rules for initial transposition,
Bit-by-bit correspondence rules in the final transposition,
Bit-by-bit correspondence rules in the expanded transposition of the F function,
A bit-by-bit correspondence rule in transposition to which data output from the S-BOX of the F function is input,
Bit-by-bit correspondence rules in contracted transposition (Permuted Choice 1),
Bit-by-bit correspondence rules in contracted transposition (Permuted Choice 2),
Any one of the bitwise correspondence rules between the data output from the contracted transpose (Permuted Choice 1) and the data input to the contracted transpose (Permuted Choice 2) Cryptographic processing circuit.
請求項9に記載の暗号処理回路であって、
前記データ入力部から並列出力される前記複数ビットの入力データを対応規則に基づいて変換して前記データ出力部の前記入力ポートに並列出力する論理回路である換字部を更に備え、
前記選択データは、前記複数の転置部または前記換字部のうちの何れを用いるかを示すデータであり、
前記選択部は、前記データ入力部から出力される前記入力データを前記選択データによって示される前記転置部または前記換字部に入力すること、
を特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 9,
Further comprising a substitution unit that is a logic circuit that converts the multi-bit input data output in parallel from the data input unit based on a corresponding rule and outputs the converted data to the input port of the data output unit in parallel.
The selection data is data indicating which one of the plurality of transposition parts or the substitution part is used,
The selection unit inputs the input data output from the data input unit to the transposition unit or the substitution unit indicated by the selection data;
A cryptographic processing circuit characterized by the above.
請求項11に記載の暗号処理回路であって、
前記共通鍵ブロック暗号方式がDESであり、
前記複数の転置部の前記ビット毎の対応規則が、夫々、
初期転置におけるビット毎の対応規則、
最終転置におけるビット毎の対応規則、
F関数の拡大型転置におけるビット毎の対応規則、
F関数のS−BOXから出力されるデータが入力される転置におけるビット毎の対応規則、
縮約型転置(Permuted Choice 1)におけるビット毎の対応規則、
縮約型転置(Permuted Choice 2)におけるビット毎の対応規則、
前記縮約型転置(Permuted Choice 1)から出力されるデータと、前記縮約型転置(Permuted Choice 2)に入力されるデータと、のビット毎の対応規則 の何れかであり、
前記換字部の前記対応規則が、前記S−BOXに入力されるデータと前記S−BOXから出力されるデータとの対応規則であることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 11,
The common key block encryption method is DES,
The correspondence rule for each bit of the plurality of transposition units is respectively
Bit-by-bit correspondence rules for initial transposition,
Bit-by-bit correspondence rules in the final transposition,
Bit-by-bit correspondence rules in the expanded transposition of the F function,
A bit-by-bit correspondence rule in transposition to which data output from the S-BOX of the F function is input,
Bit-by-bit correspondence rules in contracted transposition (Permuted Choice 1),
Bit-by-bit correspondence rules in contracted transposition (Permuted Choice 2),
The data output from the contracted transposition (Permuted Choice 1) and the data input to the contracted transposition (Permuted Choice 2) are any one of the correspondence rules for each bit.
The cryptographic processing circuit, wherein the correspondence rule of the substitution part is a correspondence rule between data input to the S-BOX and data output from the S-BOX.
請求項9〜12の何れか一項に記載の暗号処理回路であって、
前記選択部がマルチプレクサであることを特徴とする暗号処理回路。
The cryptographic processing circuit according to any one of claims 9 to 12,
The encryption processing circuit, wherein the selection unit is a multiplexer.
複数ビットの入力データを対応規則に基づいて変換して出力する共通鍵ブロック暗号方式の換字処理を行う暗号処理回路であって、
前記複数ビットの入力データを受信し、受信した前記複数ビットの入力データを並列出力する出力ポートを有するデータ入力部と、
前記データ入力部から並列出力される前記複数ビットの入力データを前記対応規則に基づいて変換して出力する論理回路である換字部と、
前記換字部から出力される複数ビットのデータが並列入力される入力ポートを有し、前記入力ポートに入力された前記複数ビットのデータを出力するデータ出力部と、
を備えることを特徴とする暗号処理回路。
A cryptographic processing circuit that performs a substitution process of a common key block cryptosystem that converts and outputs multi-bit input data based on a corresponding rule,
A data input unit having an output port for receiving the multi-bit input data and outputting the received multi-bit input data in parallel;
A substitution unit that is a logic circuit that converts the multi-bit input data output in parallel from the data input unit based on the correspondence rule and outputs the converted data;
A data output unit that has an input port to which a plurality of bits of data output from the substitution unit are input in parallel, and that outputs the plurality of bits of data input to the input port;
A cryptographic processing circuit comprising:
請求項14に記載の暗号処理回路であって、
前記共通鍵ブロック暗号方式がDESであり
前記入力データが、F関数のS−BOXに入力されるデータであり、
前記対応規則が、前記入力データと前記S−BOXから出力されるデータとの対応規則であることを特徴とする暗号処理回路。
The cryptographic processing circuit according to claim 14,
The common key block encryption method is DES, and the input data is data input to an S-BOX of an F function,
The cryptographic processing circuit, wherein the correspondence rule is a correspondence rule between the input data and data output from the S-BOX.
請求項1〜15の何れか一項に記載の暗号処理回路であって、
前記データ入力部が複数のD型フリップフロップで構成され、前記出力ポートが当該複数のD型フリップフロップの出力端子であり、
前記データ出力部がトライステートバッファであることを特徴とする暗号処理回路。
The cryptographic processing circuit according to any one of claims 1 to 15,
The data input unit is composed of a plurality of D-type flip-flops, and the output port is an output terminal of the plurality of D-type flip-flops;
An encryption processing circuit, wherein the data output unit is a tristate buffer.
請求項1〜15の何れか一項に記載の暗号処理回路であって、
前記データ入力部への書き込みアドレスと前記データ出力部からの読み出しアドレスとが同一であることを特徴とする暗号処理回路。

The cryptographic processing circuit according to any one of claims 1 to 15,
A cryptographic processing circuit, wherein a write address to the data input unit and a read address from the data output unit are the same.

JP2005028115A 2005-02-03 2005-02-03 Encryption processing circuit Withdrawn JP2006215280A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2005028115A JP2006215280A (en) 2005-02-03 2005-02-03 Encryption processing circuit
CN 200610006999 CN1815528A (en) 2005-02-03 2006-01-25 Encryption processing circuit
TW095103544A TWI290426B (en) 2005-02-03 2006-01-27 Encryption processing circuit
US11/275,880 US20060171532A1 (en) 2005-02-03 2006-02-01 Encryption Processing Circuit
KR1020060010144A KR100828272B1 (en) 2005-02-03 2006-02-02 Cryptographic processing circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005028115A JP2006215280A (en) 2005-02-03 2005-02-03 Encryption processing circuit

Publications (1)

Publication Number Publication Date
JP2006215280A true JP2006215280A (en) 2006-08-17

Family

ID=36907715

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005028115A Withdrawn JP2006215280A (en) 2005-02-03 2005-02-03 Encryption processing circuit

Country Status (2)

Country Link
JP (1) JP2006215280A (en)
CN (1) CN1815528A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101092026B1 (en) * 2009-12-23 2011-12-12 한국수력원자력 주식회사 Method for cryptography

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014154270A1 (en) 2013-03-27 2014-10-02 Irdeto B.V. Tamper resistant cryptographic algorithm implementation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101092026B1 (en) * 2009-12-23 2011-12-12 한국수력원자력 주식회사 Method for cryptography

Also Published As

Publication number Publication date
CN1815528A (en) 2006-08-09

Similar Documents

Publication Publication Date Title
AU767323B2 (en) Block encryption device using auxiliary conversion
KR100828272B1 (en) Cryptographic processing circuit
US7280657B2 (en) Data encryption and decryption system and method using merged ciphers
US8457306B2 (en) Cryptographic module and IC card
EP0802653A2 (en) Multi-cycle non-parallel data encryption engine
US20070067374A1 (en) Random Number Generating Circuit
JP2006215824A (en) Random number generation circuit
US6466669B1 (en) Cipher processor, IC card and cipher processing method
EP0982895A2 (en) Cryptographic data processor, communication system and recording medium
JP2006215280A (en) Encryption processing circuit
US20030235298A1 (en) Shifting an encryption key in either a first or second direction via a uni-directional shifting unit
JP5541277B2 (en) Data processing apparatus and data processing method
JP4326482B2 (en) Cryptographic processing circuit
JP2014240921A (en) Encryption device, encryption processing method and encryption processing program
US20040096059A1 (en) Encryption apparatus with parallel Data Encryption Standard (DES) structure
US20070140482A1 (en) Method for storing data in a random access memory and encryption and decryption device
JP4515716B2 (en) Extended key generation device, encryption device, and encryption system
JP2006215825A (en) Random number generation circuit
KR100403820B1 (en) Apparatus for encrypting plane data and method thereof
US20030231766A1 (en) Shared control and information bit representing encryption key position selection or new encryption key value
US20090097638A1 (en) Information processing apparatus
EP1403840B1 (en) Arithmetic device and encryption/decryption device
WO2004105306A1 (en) Method and apparatus for a low memory hardware implementation of the key expansion function
JPH0744375A (en) Ciphered data processor
US20240187402A1 (en) AES-GCM Engine Optimized for Execute-in-Place Authenticated Decryption

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20071228

Free format text: JAPANESE INTERMEDIATE CODE: A621

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20090706