JP3841008B2 - Cryptographic device and data transfer control device - Google Patents
Cryptographic device and data transfer control device Download PDFInfo
- Publication number
- JP3841008B2 JP3841008B2 JP2002091964A JP2002091964A JP3841008B2 JP 3841008 B2 JP3841008 B2 JP 3841008B2 JP 2002091964 A JP2002091964 A JP 2002091964A JP 2002091964 A JP2002091964 A JP 2002091964A JP 3841008 B2 JP3841008 B2 JP 3841008B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- processing
- encryption
- key
- 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.)
- Expired - Fee Related
Links
- 238000006243 chemical reaction Methods 0.000 claims description 109
- 238000000034 method Methods 0.000 claims description 102
- 230000008569 process Effects 0.000 claims description 82
- 238000004364 calculation method Methods 0.000 claims description 15
- 230000002441 reversible effect Effects 0.000 claims description 9
- 238000013478 data encryption standard Methods 0.000 description 134
- 230000017105 transposition Effects 0.000 description 51
- 238000010586 diagram Methods 0.000 description 42
- 230000009466 transformation Effects 0.000 description 12
- 230000006835 compression Effects 0.000 description 8
- 238000007906 compression Methods 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 7
- 125000004122 cyclic group Chemical group 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000013500 data storage Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000010365 information processing Effects 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 230000009467 reduction Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- PCTMTFRHKVHKIS-BMFZQQSSSA-N (1s,3r,4e,6e,8e,10e,12e,14e,16e,18s,19r,20r,21s,25r,27r,30r,31r,33s,35r,37s,38r)-3-[(2r,3s,4s,5s,6r)-4-amino-3,5-dihydroxy-6-methyloxan-2-yl]oxy-19,25,27,30,31,33,35,37-octahydroxy-18,20,21-trimethyl-23-oxo-22,39-dioxabicyclo[33.3.1]nonatriaconta-4,6,8,10 Chemical compound C1C=C2C[C@@H](OS(O)(=O)=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H]([C@H](C)CCCC(C)C)[C@@]1(C)CC2.O[C@H]1[C@@H](N)[C@H](O)[C@@H](C)O[C@H]1O[C@H]1/C=C/C=C/C=C/C=C/C=C/C=C/C=C/[C@H](C)[C@@H](O)[C@@H](C)[C@H](C)OC(=O)C[C@H](O)C[C@H](O)CC[C@@H](O)[C@H](O)C[C@H](O)C[C@](O)(C[C@H](O)[C@H]2C(O)=O)O[C@H]2C1 PCTMTFRHKVHKIS-BMFZQQSSSA-N 0.000 description 1
- 239000000872 buffer Substances 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Description
【0001】
【発明の属する技術分野】
本発明は、暗号装置及びデータ転送制御装置に関する。
【0002】
【背景技術及び発明が解決しようとする課題】
近年、映像や音楽等各種データのディジタル化が進み、映像等のデータをハードディスク装置等の大容量記憶媒体に保存して利用することができる。そのため、ハードディスク装置等へのアクセスを制御するインタフェースIC(Integrated Circuit)(広義には、データ転送制御装置)に対し、データの機密保護の要求が高まっている。
【0003】
インタフェースICにおけるデータの機密保護は、暗号化により実現することができる。この場合、インタフェースICに採用する暗号方式は、その安全性に加え、処理の高速化や低コスト化が重要な要素となる。
【0004】
これまで金融業界等の分野で、共通鍵暗号化方式が幅広く用いられている。共通鍵暗号化方式は、暗号化と復号化において同一の鍵を用いる。共通鍵暗号化方式の中でも、DES(Data Encryption Standard)は、1977年に米国情報処理標準規格(FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION:FIPS−PUB)46−3として規定され、最も広く利用されている方式の1つである。
【0005】
しかしながら、近年の情報処理能力の飛躍的な向上により、DESの暗号強度が、従来ほど強固なものではなくなっている。このため、DESに代えてトリプルDESが利用されることがある。
【0006】
以下では、DESとトリプルDESと区別するために、DESをSDES(Single DES)、トリプルDESをTDES(Triple DES)という。
【0007】
TDESは、SDESのアルゴリズムを3回繰り返す暗号化方式であり、SDESのアルゴリズムを流用することができる。更に、暗号鍵の鍵長を拡張するのと同様の効果を得ることができ、比較的容易に暗号強度を高めることができる。
【0008】
しかしながら、TDESの暗号化方式をインタフェースICに実装する場合、それだけ回路規模が大きくなるという問題がある。一方、ユーザによっては、TDESによる暗号強度を必要とせず、SDESの暗号強度を維持したまま高速な暗号処理を必要とする場合がある。したがって、インタフェースICにSDESとTDESとを共存させて、対象とするデータに応じて切り替えできるように構成することが望ましい。
【0009】
本発明は、以上のような技術的課題に鑑みてなされたものであり、その目的とするところは、最適な回路規模と処理速度で、例えばSDESとTDESのような複数の暗号化方式の提供を両立させることができる暗号装置及びデータ転送制御装置を提供することにある。
【0010】
【課題を解決するための手段】
上記課題を解決するために本発明は、複数のデータブロックに分割された入力データに対し、共通鍵暗号化方式により生成された鍵をその都度変えて所与の演算処理を(M+N)(M、Nは正の整数)回行い、データブロックごとに変換データを生成する処理を含む暗号処理を行う暗号装置であって、第n(nは2以上の整数)のデータブロックの入力データに基づいて、前記所与の演算処理をM回行って第nの中間変換データを生成する第1の暗号処理回路と、前記第nの中間変換データに基づいて、前記所与の演算処理をN回行って第nの変換データを生成する第2の暗号処理回路とを含み、第1のタイミングでは、前記第1の暗号処理回路は前記第nのデータブロックの入力データに基づいて前記第nの中間変換データを生成すると共に、前記第2の暗号処理回路は第(n−1)の中間変換データに基づいて第(n−1)の変換データを生成し、前記第1のタイミングの次の第2のタイミングでは、前記第1の暗号処理回路は第(n+1)のデータブロックの入力データに基づいて第(n+1)の中間変換データを生成すると共に、前記第2の暗号処理回路は前記第nの中間変換データに基づいて前記第nの変換データを生成する暗号装置に関係する。
【0011】
本発明においては、データブロックごとに、共通鍵暗号化方式により生成された鍵をその都度変えて所与の演算処理を(M+N)回行って暗号処理又は復号処理を行って変換データを生成する場合に、それぞれ上記演算処理を行う第1及び第2の暗号処理回路を用いる。第1のデータブロックから順に入力されるものとすると、第1のタイミングでは、第1の暗号処理回路は第nのデータブロックの入力データに基づいて、上記演算処理をM回行って第nの中間変換データを生成し、第2の暗号処理回路は第(n−1)の中間変換データに基づいて、上記演算処理をN回行って第(n−1)の変換データを生成するようにする。そして第1のタイミングの次の第2のタイミングでは、第1の暗号処理回路は第(n+1)のデータブロックの入力データに基づいて第(n+1)の中間変換データを生成すると共に、第2の暗号処理回路は第nの中間変換データに基づいて第nの変換データを生成するようにする。これにより、順次入力されるデータブロックについて、パイプライン動作により高速に処理結果を得ることができる。
【0012】
また本発明に係る暗号装置では、前記第1の暗号処理回路は、所与の第1のモードにおいて暗号処理を行う場合には、前記第(n−1)の中間変換データと前記第nのデータブロックの入力データとに基づいて第nの中間変換データを生成することができる。
【0013】
本発明によれば、第nのデータブロックの入力データを第1の暗号処理回路に入力する場合に、1つ前のデータブロックについての第(n−1)の中間変換データと関連付けて入力させることができる。したがって、第1の暗号処理回路で処理される入力データが、連続するデータブロックで同じ内容であるために最終的に生成される変換データも同じデータになることがなくなり、簡素な構成で鍵の特定を困難にすることができる。
【0014】
また、第2の暗号処理回路で生成された第(n−1)の変換データを用いるのではなく、第1の暗号処理回路で生成された第(n−1)の中間変換データを用いるようにしたので、第(n−1)の変換データが生成されるのを待つ必要がなくなり、パイプライン動作による処理速度の高速化を図ることができるようになる。
【0015】
また本発明に係る暗号装置は、前記第nの中間変換データは、前記第(n−1)の中間変換データと前記第nのデータブロックの入力データとの間で排他的論理和演算された演算データに基づいて生成されてもよい。
【0016】
本発明によれば、構成を大幅に簡素化して、上記した効果を得ることができるようになる。
【0017】
また本発明に係る暗号装置は、所与の第1のモードにおいて復号処理を行う場合には、前記第nの変換データと前記第(n−1)の中間変換データとに基づいて生成された演算データを、復号化された信号として出力することができる。
【0018】
本発明によれば、上記した所与の第1のモードにおいて、鍵の特定を困難にするために、第nのデータブロックの入力データと1つ前のデータブロックについての第(n−1)の中間変換データとを関連付けて暗号処理を行った入力データについても、簡素な構成で復号処理を行うことができる。
【0019】
また本発明に係る暗号装置は、前記演算データは、前記第nの変換データと前記第(n−1)の中間変換データとの間で排他的論理輪演算されたデータであってもよい。
【0020】
本発明によれば、構成を大幅に簡素化して、上記した効果を得ることができるようになる。
【0021】
また本発明に係る暗号装置では、所与の第2のモードにおいて暗号処理を行う場合には、1又は複数回、前記第1及び第2の暗号処理回路による処理をループさせて得られた第nの変換データと、第(n+1)のデータブロックの入力データとに基づいて、第(n+1)の変換データを生成することができる。
【0022】
本発明によれば、第1及び第2の暗号処理回路による処理を1又は複数回ループさせて得られた第nの変換データと第(n+1)のデータブロックの入力データとに基づいてについて暗号処理を行うようにしたので、回路規模を増大することなく鍵長を実質的に拡張することができ、機密性を大幅に向上させることができるようになる。
【0023】
また本発明に係る暗号装置は、前記第(n+1)のデータブロックの入力データは、前記第nの変換データとの間で排他的論理和演算された演算データであってもよい。
【0024】
本発明によれば、上記した所与の第2のモードにおいて、簡素な構成で第(n+1)のデータブロックの入力データを第nの変換データとに関連付けて暗号処理を行うことができるので、簡素な構成で鍵の特定をより困難にさせることができる。
【0025】
また本発明に係る暗号装置は、所与の第2のモードにおいて復号処理を行う場合には、1又は複数回、前記第1及び第2の暗号処理回路にループさせて生成した第nの変換データと、前記第(n−1)のデータブロックの入力データとに基づいて生成された演算データを、復号化された信号として出力することができる。
【0026】
本発明によれば、上記した所与の第2のモードにおいて、鍵の特定を困難にするために前後のデータブロックに関連付けられて暗号処理が行われた入力データについても、簡素な構成で復号処理を行うことができる。
【0027】
また本発明に係る暗号装置では、前記演算データは、第nの変換データに基づいて生成されたデータと、前記第(n−1)のデータブロックの入力データとの排他的論理和演算結果であってもよい。
【0028】
本発明によれば、上記した所与の第2のモードにおいて、第(n+1)のデータブロックの入力データを第nの変換データとに関連付けて暗号処理が行われた場合でも、簡素な構成で復号処理を行うことができる。
【0029】
また本発明に係る暗号装置では、前記第1の暗号処理回路は、DESの各段の暗号処理を8回繰り返して行い、前記第2の暗号処理回路は、DESの各段の暗号処理を8回繰り返して行うことができる。
【0030】
本発明によれば、DESの暗号処理及び復号処理に適用することができ、回路規模の増大を招くことなく、一定の機密性が保証された暗号処理及び復号処理を高速化することができる。
【0031】
また本発明に係る暗号装置は、前記第1の暗号処理回路で行われるDESの各段に対応した鍵を出力する第1の鍵出力回路と、前記第2の暗号処理回路で行われるDESの各段に対応した鍵を出力する第2の鍵出力回路とを含み、暗号処理においては、前記第1の鍵出力回路は、8個の鍵を1つずつ、前記第1の暗号処理回路で行われるDESの各段の処理のために出力し、前記第2の鍵出力回路は、8個の鍵を1つずつ、前記第2の暗号処理回路で行われるDESの各段の処理のために出力し、復号処理においては、前記第1の鍵出力回路は、暗号処理の場合と逆順に8個の鍵を1つずつ、前記第2の暗号処理回路で行われるDESの各段の処理のために出力し、前記第2の鍵出力回路は、暗号処理の場合と逆順に8個の鍵を1つずつ、前記第1の暗号処理回路で行われるDESの各段の処理のために出力することができる。
【0032】
本発明によれば、DESの暗号処理又は復号処理に適用する鍵については、鍵の適用順序を切り替えるだけでよいため、第1及び第2の鍵出力回路によりDESの各段に適用する鍵を保持させておき、第1及び第2の暗号処理回路に供給する鍵を切り替えることで、簡素な構成で暗号処理と復号処理を切り替えることができる。
【0033】
また本発明に係る暗号装置は、DESの鍵を複数セット保持し、所与の鍵選択信号に基づいていずれか1つのセットを選択する鍵選択回路を含み、前記第1及び第2の鍵出力回路は、前記所与の鍵選択信号に基づいて選択されたセットのDESの鍵を出力することができる。
【0034】
本発明によれば、複数セットの鍵の中から選ばれた1つのセットの鍵を供給するようにしたので、鍵の特定をより困難にすることができる。しかも、適用する鍵のセットを切り替えるようにすることで、鍵の特定はより困難となる。また、1つのセットの鍵が特定された場合であっても、残りの鍵を適用することができるので機密性を維持することができる。
【0035】
また本発明は、複数のデータブロックに分割された入力データに対し、共通鍵暗号化方式により生成された鍵をその都度変えて所与の演算処理を複数回行う処理を含む暗号処理を行う暗号装置であって、前記所与の演算処理を1又は複数回行う第1〜第L(Lは2以上の整数)の暗号処理回路を含み、第1のタイミングにおいて、前記第k(1≦k≦L−1、kは整数)の暗号処理回路は、第n(nは2以上の整数)のデータブロックについて処理すると共に、前記第(k+1)の暗号処理回路は、第(n−1)のデータブロックについて処理し、前記第1のタイミングの次の第2のタイミングでは、前記第kの暗号処理回路は、第(n+1)のデータブロックについて処理すると共に、前記第(k+1)の暗号処理回路は、前記第1のタイミングにおける前記第kの暗号処理回路の処理結果を用いて処理する暗号装置に関係する。
【0036】
本発明においては、共通鍵暗号化方式により所与の演算処理を複数回行う処理を含む暗号処理を行う場合に、所与の演算処理を1又は複数回行う第1〜第Lの暗号処理回路を用いる。そして、そのうちの第k及び第(k+1)の暗号処理回路については、パイプライン動作を行うように構成する。すなわち、第1のタイミングにおいて第kの暗号処理回路が処理した第nのデータブロックについての処理結果を、第1のタイミングの次の第2のタイミングにおいて第(k+1)の暗号処理回路が用いて演算処理を行う。
【0037】
これにより、上述の演算処理の処理回数分だけ暗号処理回路を設ける必要がなくなり、回路規模を抑えて、パイプライン動作により高速に処理結果を得ることができる。
【0038】
また本発明に係るデータ転送制御装置は、アイソクロナスデータを記憶するメモリと、外部に接続された所与の記憶装置にアクセスするためのインタフェース回路と、前記メモリと前記インタフェース回路との間で転送されるアイソクロナスデータに対し、暗号処理又は復号処理を行う上記いずれか記載の暗号装置とを含むことができる。
【0039】
本発明によれば、リアルタイム性を有するアイソクロナスデータを保存する記憶装置に対して、高速な暗号処理又は復号処理を行って、アイソクロナスデータの機密性を向上させることができるデータ転送制御装置を提供することができる。
【0040】
【発明の実施の形態】
以下、本発明の好適な実施の形態について図面を用いて詳細に説明する。なお、以下に説明する実施の形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また以下で説明される構成の全てが本発明の必須構成要件であるとは限らない。
【0041】
本実施形態に係る暗号装置は、入力データに対し、共通鍵暗号化方式により生成された鍵を用いた複数段の演算処理を行って変換データを生成する。本実施形態における暗号装置は、鍵の適用順序を切り替えることで、暗号処理及び復号処理を行うことができるようになっている。以下では、暗号装置の共通鍵暗号化方式がDESである場合について説明する。
【0042】
1. SDESの概要
まず、SDES(Single DES)の処理内容の概要について説明する。
【0043】
図1に、SDESによる暗号処理を行う暗号装置の機能ブロック構成の概要を示す。
【0044】
暗号装置10は、暗号処理部12と、鍵生成処理部14とを含む。
【0045】
暗号処理部12は、1データブロック当たり64ビットの入力データ(平文)に対して、非線形変換と転置処理等を16段繰り返し、変換データ(暗号文)を出力する。鍵生成処理部14は、64ビットの共通秘密鍵を用いて、暗号処理部12の各段の処理で使用される48ビットの(サブ)鍵K1〜K16を生成する。
【0046】
図2に、暗号処理部12の処理のフロー図を示す。
【0047】
暗号処理部12に、1データブロック単位で64ビットの入力データMが入力されると、該入力データMに対し、初期転置(Initial Permutation:IP)を行ってランダム化する(ステップS10)。初期転置は、図3に示すように、入力ビット位置に応じて、出力させるビット位置を変えて出力する。例えば、入力ビットの第58ビットを出力の第1ビットに転置し、また入力の第1ビットを出力の第40ビットに転置する。
【0048】
初期転置が行われた初期転置データは、ビット分割され、上位32ビットを第1段入力データL0、下位32ビットを第1段入力データR0とする(ステップS11、S12)。
【0049】
第1段入力データR0は、第1段の鍵K1を用いた非線形変換fにより非線形変換データf(R0,K1)に変換される(ステップS20−1)。
【0050】
図4に、非線形変換fの機能ブロック図を示す。
【0051】
ここでは、第i(1≦i≦16、iは整数)段の非線形変換fの機能ブロック図を示している。
【0052】
第i段入力データRi-1は、拡大転置(E)により、拡大転置データERi-1に変換される(ステップS50)。拡大転置(E)は、図5に示すように、所定のビットを重複させて、32ビットの第i段入力データRi-1を48ビットの拡大転置データERi-1に変換する。図5では、例えば入力の第1ビットを出力の第2ビット及び第48ビットから出力させ、入力の第32ビットを出力の第1ビット及び第47ビットから出力させることを示している。
【0053】
拡大転置データERi-1は、第i段用の鍵Kiとの間で排他的論理和演算(XOR)が行われ(ステップS51)、それぞれ6ビットずつSBOX0〜7に入力される。ここで、第i段用の鍵Kiは、図1に示すように暗号処理部12に対応して設けられた鍵生成処理部14により生成された第1段〜第16段の鍵K1〜K16のうちの第i段用のものである。
【0054】
SBOX0〜7は、それぞれ入力された6ビットに対して、圧縮換字変換を行う(ステップS52−0〜S52−7)。
【0055】
図6に、SBOX0において行われる圧縮換字変換について説明するための図を示す。
【0056】
SBOX0では、ロウ番号及びカラム番号により4ビットデータが特定される。ロウ番号は、入力される6ビットのうち最初(最も左端)の1ビットと最後(最も右端)の1ビットとにより特定される。カラム番号は、入力される6ビットのうち残りの4ビットにより特定される。そして、これらロウ番号及びカラム番号により特定される4ビットデータを、入力された6ビットに対応させて変換する。
【0057】
例えば、拡大転置データERi-1と第i段用の鍵Kiとの間で排他的論理和演算の結果が、6ビットの「101000」とすると、ロウ番号は(10)2であるため2行目が特定され、カラム番号は(0100)2であるため4行目が特定される。したがって、SBOX0に入力された6ビットの「101000」は、4ビットの「1101(=13)」に変換される。
【0058】
ここではSBOX0について説明したが、SBOX1〜SBOX7についてもそれぞれロウ番号及びカラム番号により同様の変換が行われる。
【0059】
このようにしてSBOX0〜7から出力された4ビットの変換データは、転置処理(P)が行われる(ステップS53)。転置処理は、図7に示すように、入力ビット位置に応じて、出力させるビット位置を変えて出力する。例えば、入力ビットの第16ビットを出力の第1ビットに転置し、また入力の第1ビットを出力の第9ビットに転置する。
【0060】
この転置処理(P)の結果、32ビットの非線形変換データERi-1(=f(Ri-1,Ki))が生成される。
【0061】
図2において、第1段入力データR0に基づいて生成された非線形変換データf(R0,K1)は、第1段入力データL0との間で排他的論理和演算が行われ(ステップS21−1)、その演算結果が第2段入力データR1になる(ステップS22−1)。
【0062】
一方、第2段入力データL1は、第1段入力データR0になる(ステップS23−1)。
【0063】
以上のように第1段入力データL0、R0から第2段入力データL1、R1が生成されるまでの処理をSDESの暗号処理の第1段の処理(所与の演算処理)とすると、同様の処理が第16段まで行われる。各段の非線形変換においては、段ごとに適用される鍵が変更される。
【0064】
その結果、第16段で生成された第16段入力データL16、R16は、以下のようになる(ステップS23−16、S22−16)。
【0065】
L16=R15 ・・・(1)
R16=L15(+)f(R15,K16) ・・・(2)
ここで、(+)は排他的論理和演算であることを示す。
【0066】
そして、最後に上位32ビットと下位32ビットとを入れ替えて、入替データL16´を第16段入力データR16にし(ステップS24)、入替データR16´を第16段入力データL16にして(ステップS25)、64ビットデータとして最終転置(IP-1)を行う(ステップS26)。
【0067】
最終転置(IP-1)は初期転置(IP)に対応しており、図8に示すように初期転置でビット位置を入れ替えたデータを、元に戻す。例えば入力の第1ビットを出力の第58ビットに転置し、また入力の第40ビットを出力の第1ビットに転置する。
【0068】
その結果、変換データPが生成される。
【0069】
次に、このような暗号処理部12の各段に、非線形変換を行うための鍵の生成フローについて説明する。各段に供給される鍵は、鍵生成処理部14において生成される。
【0070】
図9に、鍵生成処理部14の処理のフロー図を示す。
【0071】
鍵生成処理部14に、64ビットの共通秘密鍵K0が入力されると、該共通秘密鍵K0に対し、選択転置(PC−1)を行ってランダム化する(ステップS60)。選択転置は、図10に示すように、入力ビット位置に応じて、出力させるビット位置を変えて出力し、64ビットの共通秘密鍵K0からパリティが除去された56ビットの選択転置データを出力する。例えば、入力の第57ビットを出力の第1ビットに転置し、また入力の第1ビットを出力の第8ビットに転置する。
【0072】
選択転置が行われた選択転置データは、ビット分割され、上位28ビットを第1段入力データC0、下位28ビットを第1段入力データD0とする(ステップS61、S62)。
【0073】
第1段入力データC0は左方向に巡回シフトが行われて、第2段入力データC1となる(ステップS63−1、S64−1)。また、第1段入力データD0は左方向に巡回シフトが行われて、第2段入力データD1となる(ステップS65−1、S66−1)。ここで、巡回シフトを行うビット数は、図11に示すようにDESの処理段ごとに決められている。例えば、第1段の場合は1ビット、第3段の場合は2ビットだけ、巡回シフトが行われることを示している。
【0074】
更に第1段では、巡回シフトされた結果生成された第2段入力データC1、D1に対して圧縮転置(PC−2)を行い(ステップS67−1)、第1段の鍵K1が生成される。
【0075】
圧縮転置(PC−2)では、それぞれ28ビットの第2段入力データC1、D1からなる56ビットのデータを48ビットのデータに変換する。この圧縮転置は、図12に示すように、入力ビット位置に応じて、出力させるビット位置を変えて出力する。例えば、入力の第14ビットを出力の第1ビットに転置し、また入力の第1ビットを出力の第5ビットに転置する。
【0076】
この圧縮転置が行われた48ビットのデータが、第1段の鍵K1として、暗号処理部12の第1段の非線形変換に用いられる。
【0077】
以上のように第1段入力データC0、D0から第2段入力データC1、D1が生成されるまでの処理をSDESの鍵生成の第1段の処理とすると、同様の処理が第16段まで行われる。このように、各段において生成された鍵K1〜K16は、暗号処理部12の暗号処理の各段に適用される。
【0078】
図13に、SDESによる復号処理を行う復号装置の機能ブロック構成の概要を示す。
【0079】
復号装置70は、復号処理部72と、鍵生成処理部74とを含む。
【0080】
復号処理部72は、1ブロック64ビットの入力データ(暗号文)に対して、非線形変換と転置処理等を16段繰り返し、変換データ(平文)を出力する。鍵生成処理部74は、64ビットの共通秘密鍵から、復号処理部72の各段の処理で用いる48ビットの(サブ)鍵K1〜K16を生成する。
【0081】
復号処理部72は、上述の暗号処理部12と逆の手順をとることで実現することができる。この場合、復号処理部72の各段の鍵は、暗号処理とは逆に鍵K16、K15、・・・、K1の順に適用される。
【0082】
鍵生成処理部74は、上述した鍵生成処理部14の左巡回シフトを右巡回シフトに変更することで、各段ごとに鍵K16、K15、・・・、K1の順で生成される。
【0083】
このように復号処理は、各段の処理内容に着目すれば、暗号処理の各段の処理内容と共通させることができる。本実施形態における暗号装置は、暗号処理を行う回路を共通化し、該回路を用いて復号処理を行うように構成している。
【0084】
2. 暗号化モード
SDESでは、入力データとしての平文又は暗号文が複数のブロックに分割され、ブロックデータ単位で暗号処理又は復号処理が行われる。したがって、同じブロックデータの場合には、変換データも同じになる可能性があり、鍵が特定されやすくなる。そのため、SDESでは、CBC(Cipher Block Chaining)モードやCFB(Cipher FeedBack)モード等の種々の暗号化モードが利用される。
【0085】
図14に、CBCモードの暗号処理と復号処理の機能ブロック図を示す。
【0086】
暗号処理部80では、DES演算部82により、ブロックデータ単位に暗号処理が行われて変換データが生成される。DES演算部82において暗号処理が行われる平文のj番目のデータブロックをMjとすると、該データブロックMjと1つ前のデータブロックの変換データCj-1との間で排他的論理和演算が行われ、その演算結果がDES演算部82に入力される。DES演算部82は、その演算結果について暗号処理を行って変換データCjを生成する。変換データCjは暗号文として出力されると共に、レジスタ84に保持される。平文の次のデータブロックが入力されたときには、レジスタ84に保持された前のブロックの変換データを用いて生成された演算データがDES演算部82に入力される。
【0087】
復号処理部90では、DES-1演算部92により、ブロックデータ単位に復号処理が行われて変換データ(復号データ、平文)が生成される。DES-1演算部92において復号処理が行われる暗号文のj番目のデータブロックをCjとすると、該データブロックCjがDES-1演算部92において復号化される。DES-1演算部92で復号化された変換データに対して、1つ前のデータブロックの変換データCj-1との間で排他的論理和演算を行った演算結果が、変換データ(復号データ)Mjとなる。変換データCjは、暗号文として復号処理部90に入力されると共に、レジスタ94に保持される。暗号文の次のデータブロックが入力されたときには、レジスタ94に保持された前のブロックの変換データを用いて生成された演算結果が復号文のデータブロックMjとして出力される。
【0088】
これにより、ブロックデータの内容が同じであっても、その前のデータブロックの内容に応じた演算結果に対して暗号処理が行われるため、複雑な構成をとることなく、鍵の特定を困難にすることができる。
【0089】
3. TDESの概要
ところでコンピュータ技術等の進歩を背景に、情報処理能力の向上が著しく、上述したSDESの安全性には限界がある。そのため更に安全性を高めるために、SDESを3回ループさせるTDESがある。
【0090】
図15に、TDESの処理フローの概要を示す。
【0091】
TDESによる暗号処理は、DES演算部100、102、104により、上述したSDESの暗号処理又は復号処理を行うことで実現される。DES演算部100は、64ビットの平文の入力データに対し、暗号処理の各段の鍵を有する鍵セットK0Aを適用したSDESの暗号処理を行う。DES演算部102は、DES演算部100から出力された変換データに対し、復号処理の各段の鍵を有する鍵セットK0Bを適用したSDESの復号処理(DES-1)を行う。DES演算部104は、DES演算部102から出力された変換データに対し、暗号処理の各段の鍵を有する鍵セットK0Cを適用したSDESの暗号処理を行い、変換データCを出力する。
【0092】
こうすることで、鍵セットK0A、K0B、K0Cが全て異なる場合、鍵長は192(=64×3)ビットとなり、更に暗号強度を高めることができる。
【0093】
なお、TDESの復号処理を行う場合には、図15に示した暗号処理とは逆に、復号処理、暗号処理、復号処理の順に行えばよい。
【0094】
4. 本実施形態における暗号装置
TDESの暗号処理及び復号処理は、上述のように機密性を十分に確保することができるが、SDESの回路に比べてその規模が増大し低コスト化を図ることができない。その一方で、SDESによる暗号化の強度でも機密性は十分保たれることから、対象とするデータの種類に応じて、SDESの暗号処理(復号処理)を行うSDESモード又はTDESの暗号処理(復号処理)を行うTDESモードを切り替え可能であることが望ましい。
【0095】
そこで本実施形態における暗号装置は、同様の構成の複数のDES演算回路により、SDESの16段分の処理をパイプライン動作で行うように構成している。すなわち、SDESの各段の処理を1又は複数回行う第1〜第L(Lは2以上の整数)のDES演算回路(広義には暗号処理回路)を有し、そのうち少なくとも第k(1≦k≦L−1、kは整数)及び第(k+1)のDES演算回路がパイプライン動作を行うことができる。
【0096】
更に本実施形態における暗号装置は、上述のパイプライン動作を行うSDESの処理を複数回ループさせることでTDESによる暗号処理又は復号処理を実現する。こうすることで、回路規模の増大を招くことなくTDESによる暗号処理及び復号処理を実現し、かつより高速なSDESによる処理を実現する。
【0097】
また本実施形態における暗号装置は、鍵生成処理を行わず、上述した鍵生成処理により予め生成した鍵を保持し、SDESの各段の処理に適用させるようにしている。これにより、パイプライン動作中に、鍵生成処理を行う必要がなくなるので、パイプライン処理の高速化を図ることができる。
【0098】
4.1 ブロック構成
以下では、2(L=2)段のDES演算回路で構成され、これらがパイプライン動作を行う暗号装置について説明するが、3段以上(L≧3)のDES演算回路を有し、これらがパイプライン動作を行うようにしてもよい。
【0099】
図16に、本実施形態における暗号装置のブロック構成図を示す。
【0100】
本実施形態における暗号装置200は、同様の構成のDES演算回路(第1及び第2の暗号処理回路)210、220を含む。DES演算回路210、220は、それぞれ図2に示したSDESの非線形変換や排他的論理和演算等の1段分の処理(所与の演算処理)を行う。暗号処理又は復号処理を(M+N)(M、Nは正の整数)段の演算処理を行う場合に、DES演算回路210、220は、それぞれM段分の演算処理、N段分の演算処理を行うことができる。なおSDESによる16段分の処理を行う場合は、パイプライン動作により高速処理を行うため8段ずつ(M=N=8)行うことが望ましい。暗号装置200では、8段ずつ行うものとして説明する。
【0101】
DES演算回路210には、プロローグ回路230が接続されている。DES演算回路210は、プロローグ回路230からの出力に基づいて、図2に示すSDESの第1段〜第8段の各段の処理を行い、中間変換データを出力する。プロローグ回路230には、入力ラッチ回路240が接続されている。入力ラッチ回路240には、データブロック単位に入力データがラッチされる。プロローグ回路230は、入力ラッチ回路240に入力された64ビットのデータに対して初期転置処理を行うことができる。或いはプロローグ回路は、入力ラッチ回路240に入力された64ビットのデータと、DES演算回路210によって生成された中間変換データ等との排他的論理和演算結果に対して、初期転置処理を行うことができる。
【0102】
DES演算回路220には、エピローグ回路250が接続されている。DES演算回路220は、DES演算回路210で生成された中間変換データに基づいて、図2に示すSDESの第9段〜第16段の各段の処理を行い、変換データ(最終変換データ)を出力する。エピローグ回路250は、DES演算回路220によって生成された変換データに対して最終転置処理を行うことができる。或いはエピローグ回路250は、DES演算回路220によって生成された変換データに対して、DES演算回路210により生成された中間変換データ等と排他的論理和演算を行うことができる。
【0103】
暗号装置200は、DES演算回路210、220に対して、SDESの各段の鍵を出力する第1及び第2の鍵出力回路260、270を含む。ここで、鍵出力回路は2つでなくてもよく、DES演算回路と同数でなくてもよい。
【0104】
暗号処理を行う場合、第1の鍵出力回路260は、DES演算回路210で処理される段数に応じて、図2に示すSDESの第1段〜第8段の各段の鍵K1〜K8を出力する。第2の鍵出力回路270は、DES演算回路220で処理される段数に応じて、図2に示すSDESの第9段〜第16段の各段の鍵K9〜K16を出力する。
【0105】
復号処理を行う場合、第1の鍵出力回路260は、DES演算回路220に対してSDESの第1段〜第8段の各段の鍵K1〜K8を、暗号処理とは逆順に出力する。第2の鍵出力回路270は、DES演算回路210に対してSDESの第9段〜第16段の各段の鍵K9〜K16を、暗号処理とは逆順に出力する。
【0106】
第1及び第2の鍵出力回路260、270がそれぞれ出力する鍵K1〜K16は、鍵セット選択回路280から供給される。
【0107】
鍵セット選択回路280は、TDES鍵ボックス282と、SDES鍵ボックス284とを含む。TDES鍵ボックス282は、上述した鍵生成処理により予め生成されたTDESの鍵を複数セット保持する。TDESの鍵は、ループさせる回数分のSDESの鍵を有する。SDESの鍵は、16段分の鍵を有する。SDES鍵ボックス284は、上述した鍵生成処理により予め生成されたSDESの鍵を複数セット保持する。
【0108】
TDESによる暗号処理又は復号処理を行う場合、鍵セット選択回路280は、TDES鍵ボックス282に保持された複数セットのTDESの鍵セットの中から1セットを選択し、SDESのループ回数に応じた16段分の鍵を、第1及び第2の鍵出力回路260、270に出力する。
【0109】
暗号装置200の各部は、制御回路290によって制御が行われる。制御回路290は、入力された各種制御信号により、上述した構成の暗号装置200において、暗号処理と復号処理の切り替え制御、CBCモードの制御、或いはSDESとTDESの切り替え制御を行うことができるようになっている。
【0110】
xRST信号は、リセット信号である。xRST信号がアクティブになると、暗号装置200を構成する各部の状態が初期状態になる。
【0111】
xCLR信号は、クリア信号である。xCLR信号がアクティブになると、例えばDES演算回路210、220のレジスタの状態がリセットされる。
【0112】
DES_WAIT信号は、ウェイト信号である。DES_WAIT信号がアクティブになると、DES演算回路210、220の処理が中断する。DES_WAIT信号は、例えばエピローグ回路250の出力をラッチするFIFOの状態に応じて生成される。
【0113】
EX_OR信号は、CBCモード制御信号である。EX_OR信号がアクティブになると、CBCモードにより暗号処理及び復号処理が行われる。そのためプロローグ回路230は、EX_OR信号に応じて、CBCモードで生成された演算データ又は入力ラッチ回路240からの入力データを、DES演算回路210に出力することができるようになっている。またエピローグ回路250は、EX_OR信号に応じてCBCモードで生成された演算データ又はDES演算回路220からの出力データを出力する。
【0114】
なおCBCモードにおいて、初期化状態のときには、プロローグ回路230は初期化ベクタIVを用いて入力データとの間で排他的論理和演算を行って、入力データの値がそのまま暗号処理又は復号処理が行われないようにしている。同様に、初期化状態のときには、エピローグ回路250は初期化ベクタIVを用いてDES演算回路220の出力データとの間で排他的論理和演算を行う。
【0115】
EN_xDE信号は、暗号−復号切替信号である。EN_xDE信号がアクティブになると、プロローグ回路230、DES演算回路210、220、エピローグ回路250において、図2に示す暗号処理の各処理が行われる。また第1及び第2の鍵出力回路260、270は、暗号処理の順序で各段の鍵を出力する。
【0116】
TRIPLE信号は、SDES−TDES切替信号である。TRIPLE信号がアクティブになると、TDESの暗号処理又は復号処理が行われる。TRIPLE信号は、例えば暗号処理又は復号処理の対象となるデータを保存するハードディスク装置のセクタ番号に基づいて切り替えることができる。この場合、セクタによってSDESにより暗号化されたデータとTDESにより暗号化されたデータとを混在させることができ、鍵の解読をより困難にし、機密性を大幅に高めることができる。
【0117】
TRI_COUNT信号は、TDESのループカウント信号である。TRI_COUNT信号により、TDESによるSDESのループ回数が指定される。TRI_COUNT信号に応じて、鍵セット選択回路280は保持されている複数セットの鍵から、1セットを選択する。このようなTRI_COUNT信号は、制御回路290において生成される。
【0118】
KEY_NUMBER信号は、SDESの段数カウント信号である。KEY_NUMBER信号により、SDESの段数が指定され、各段に対応した鍵が選択される。
【0119】
KEY_SEL信号は、鍵選択信号である。KEY_SEL信号により、鍵セット選択回路280に予めTDES鍵ボックス282又はSDES鍵ボックス284に記憶された複数セットの鍵の中から1セットが選択される。
【0120】
4.2 動作の概要
次に、本実施形態における暗号装置200の動作の概要を説明する。
【0121】
図17に、暗号装置200におけるSDESの暗号処理の流れを模式的に示す。ただし図16に示す暗号装置200と同一部分には同一符号を付し、適宜説明を省略する。
【0122】
この場合、DES演算回路210は、第nのデータブロックに対して図2に示すSDESの第1段の処理を行う。この処理結果は7回ループされ、DES演算回路210は、SDESの第1段〜第8段の処理を行う。このとき第1の鍵出力回路260は、KEY_NUMBER信号に応じて、各段に対応した鍵を供給する。その結果、DES演算回路210は、SDESの第8段までの結果を、第nの中間変換データとして出力する。
【0123】
DES演算回路220は、第nの中間変換データに対して、図2に示すSDESの第9段の処理を行う。この処理結果は7回ループされ、DES演算回路220は、SDESの第9段〜第16段の処理を行う。このとき第2の鍵出力回路270は、KEY_NUMBER信号に応じて、各段に対応した鍵を供給する。その結果、DES演算回路220は、SDESの第16段までの結果を、第nの変換データとして出力する。
【0124】
プロローグ回路230は、DES演算回路210に、第(n−1)の中間変換データと第nのデータブロックの入力データとに基づいて第nの中間変換データを生成させる。
【0125】
より具体的には、プロローグ回路230は、第nのデータブロックの入力データに対して初期転置処理を行った演算データを、DES演算回路210に対して出力する。ここで転置処理の対象となるのは、SDESのCBCモード(所与の第1のモード)ではない場合は入力ラッチ回路240の入力データであり、SDESのCBCモード(所与の第1のモード)の場合は該入力データと1つ前のデータブロックの第(n−1)の中間変換データとの排他的論理和演算結果である。なおCBCモードにおいて、入力データは、初期化時では初期化ベクタIVとの間の排他的論理和演算結果に対して転置処理が行われる。
【0126】
エピローグ回路250は、DES演算回路220から出力された第nの変換データに対して、プロローグ回路230で行われた初期転置処理に対応した最終転置処理を行う。
【0127】
このような本実施形態における暗号装置200は、(M+N)(M=N=8)段の処理により変換データを生成するために、DES演算回路210、220によるパイプライン動作を行う。
【0128】
図18に、パイプライン動作について説明するための図を示す。
【0129】
入力データがブロック単位に分割され、第1のデータブロックから順に暗号処理が行われるものとする。この場合、第1のタイミングでは、DES演算回路210は、第nのデータブロックについて第nの中間変換データを生成し、DES演算回路220は、1つ前のデータブロックである第(n−1)の中間変換データに基づいて第(n−1)の変換データを生成する。そして、次の第1のタイミングの次の第2のタイミングでは、DES演算回路210は第nのデータブロックの次のブロックである第(n+1)のデータブロックについて第(n+1)の中間変換データを生成し、DES演算回路220は第1のタイミングでDES演算回路210により生成された第nの中間変換データに基づいて第nの変換データを生成する。
【0130】
このようなパイプライン動作により、第1及び第2のタイミングを所与のクロックの1周期とすると、1クロックごとにSDESにより暗号化された変換データを生成することができる。したがって、回路規模の縮小化と、処理の高速化とを図ることができる。
【0131】
またCBCモードでは、SDESの第16段の処理結果を次のデータブロックの入力に反映させると、DES演算回路210の処理速度の低下を招く。そのため、SDESの第8段の処理結果(第(n−1)の中間変換データ)を用いることで、鍵の機密性を高めると共に処理速度の低下を防止することができる。
【0132】
図19に、暗号装置200におけるSDESの復号処理の流れを模式的に示す。ただし図17に示す暗号装置200と同一部分には同一符号を付し、適宜説明を省略する。
【0133】
この場合、DES演算回路210は、第nのデータブロックに対して図2に示すSDESの第1段の処理を行う。この処理結果は7回ループされ、DES演算回路210は、SDESの第1段〜第8段の処理を行う。このとき第2の鍵出力回路270が、KEY_NUMBER信号に応じて、暗号処理とは逆順に各段に対応した鍵を供給する。その結果、DES演算回路210は、SDESの第8段までの結果を、第nの中間変換データとして出力する。
【0134】
DES演算回路220は、第nの中間変換データに対して、図2に示すSDESの第9段の処理を行う。この処理結果は7回ループされ、DES演算回路220は、SDESの第9段〜第16段の処理を行う。このとき、第1の鍵出力回路260は、KEY_NUMBER信号に応じて、暗号処理とは逆順に各段に対応した鍵を供給する。その結果、DES演算回路220は、SDESの第16段までの結果を、第nの変換データとして出力する。
【0135】
プロローグ回路230は、入力ラッチ回路240から入力された第nのデータブロックの入力データに対して初期転置処理を行った演算データを、DES演算回路210に対して出力する。
【0136】
エピローグ回路250は、第nの変換データと、1つ前のデータブロックの第(n−1)の中間変換データとに基づいて生成された演算データを復号化された信号として出力させる。
【0137】
より具体的には、エピローグ回路250は、DES演算回路220から出力された第nの変換データに対して、プロローグ回路230で行われた初期転置処理に対応した最終転置処理を行う。ここで最終転置処理が行われたデータは、SDESのCBCモード(所与の第1のモード)ではない場合はそのまま変換データとして出力され、SDESのCBCモード(所与の第1のモード)の場合は1つ前のデータブロックの第(n−1)の中間変換データとの間で排他的論理和演算が行われて変換データとして出力される。なおCBCモードにおいて、転置処理が行われたデータは、初期化時には初期化ベクタIVとの間で排他的論理和演算が行われる。
【0138】
なお、この場合においても図18に示すようなパイプライン動作により、復号処理を行うことができる。
【0139】
図20に、暗号装置200におけるTDESの暗号処理の流れを模式的に示す。ただし図17に示す暗号装置200と同一部分には同一符号を付し、適宜説明を省略する。
【0140】
プロローグ回路230は、第nのデータブロックに対して初期転置処理を行った演算データを、DES演算回路210に対して出力する。このとき、次のデータブロックの第(n+1)のデータブロックについて出力するのに先立って、エピローグ回路250から出力された演算結果を用いて2回ループさせる。なおTDESのCBCモード(所与の第2のモード)の場合は、第nのデータブロックについてのSDESの1回目の入力のときに、1つ前の第(n−1)のデータブロックについての演算結果との間で行われた排他的論理和演算結果が転置処理対象となる。なお、TDESのCBCモードにおいても、初期化時には初期化ベクタIVが適用される。
【0141】
エピローグ回路250は、DES演算回路220から出力された第nの変換データに対して、プロローグ回路230で行われた初期転置処理に対応した最終転置処理を行う。
【0142】
図21に、暗号装置200におけるTDESの復号処理の流れを模式的に示す。ただし図20に示す暗号装置200と同一部分には同一符号を付し、適宜説明を省略する。
【0143】
プロローグ回路230は、第nのデータブロックに対して初期転置を行った演算データをDES演算回路210に対して出力する。このとき、次の第(n+1)のデータブロックについて出力するのに先立って、エピローグ回路250から出力された演算結果を用いて2回ループさせる。
【0144】
エピローグ回路250は、DES演算回路220から出力された第nの変換データに対して、プロローグ回路230で行われた初期転置処理に対応した最終転置処理を行う。転置処理が行われたデータは、SDESの3回目のループの出力の場合には、変換データとして出力される。その際、TDESのCBCモード(所与の第2のモード)ではない場合はそのまま変換データとして出力され、TDESのCBCモード(所与の第2のモード)の場合は1つ前のデータブロックの第(n−1)のデータブロックの入力データとの間で排他的論理和演算が行われて出力される。なおCBCモードにおいて、転置処理が行われたデータは、初期化時には初期化ベクタIVとの間で排他的論理和演算が行われる。
【0145】
このようにSDESの処理回路を流用してTDESによる暗号処理及び復号処理を行うことができ、回路規模の増大を回避することができる。
【0146】
なお、DES演算回路(暗号処理回路)を3段以上の構成で、SDESの暗号処理又は復号処理を行うように構成しても、同様にSDESの処理回路を流用してTDESによる暗号処理及び復号処理を行うことができる。
【0147】
例えば図22(A)に示す第1〜第3の暗号処理回路により、SDESのCBCモードの暗号処理を行う場合、図22(B)に示すようなパイプライン動作で変換データが生成される。また例えば図23(A)に示す第1〜第3の暗号処理回路により、SDESのCBCモードの復号処理を行う場合には、図23(B)に示すようなパイプライン動作で、暗号処理されたデータを復号することができる。
【0148】
また例えば図24(A)に示す第1〜第4の暗号処理回路により、SDESのCBCモードの暗号処理を行う場合、図24(B)に示すようなパイプライン動作で変換データが生成される。また例えば図25(A)に示す第1〜第4の暗号処理回路により、SDESのCBCモードの復号処理を行う場合には、図25(B)に示すようなパイプライン動作で、暗号処理されたデータを復号することができる。
【0149】
このような複数の暗号処理回路をパイプライン動作により高速処理を行うSDESの処理回路を上述のように3回繰り返すことで、TDESによる暗号処理及び復号処理を行うことができ、回路規模の増大を回避することができる。
【0150】
4.3 複数の鍵セット
暗号装置200は、予め鍵生成処理により生成された鍵を複数セット分、鍵ボックスに保持する。そして、鍵選択信号KEY_SELにより選択した1セットを用いて、SDESの暗号処理及び復号処理を行うことができる。またTDESの場合には、SDESの処理の各回ごとに鍵セットを選択することができる。
【0151】
図26に、鍵選択処理を行う暗号装置の構成の概要を示す。
【0152】
ただし、図16に示す暗号装置200と同一部分には同一符号を付し、適宜説明を省略する。
【0153】
暗号装置200において、DES演算回路210、220により、入力データに対して図2に示すSDESの第1段〜第16段の処理が行われ、変換データが生成される。DES演算回路210、220の各段の処理に必要な鍵は、鍵セット選択回路280から供給される。
【0154】
鍵セット選択回路280は、鍵生成部300により予め複数の共通秘密鍵KEY_A、KEY_B、・・・、KEY_Nから生成された16段分の鍵をそれぞれ保持する。そして、鍵選択信号KEY_SELにより、いずれか1つの鍵セットが選択され、DES演算回路210、220の各段に対して、選択鍵KEY_N1、KEY_N2、・・・、KEY_N16として供給される。
【0155】
このように、予め複数の鍵セットを保持しておき、鍵選択信号KEY_SELにより選択したいずれか1つの鍵セットから鍵を供給するようにしたので、たとえ1つの鍵が解読されたとしても他の鍵を用いることができるので暗号装置の暗号強度を維持することができる。しかも、鍵セットをセクタ番号等に基づいて切り替えるように構成することで、鍵の解読がより困難となり、アルゴリズムを変更することなく容易に機密性を向上させることができる。また本実施形態の場合、暗号処理(復号処理)と同時に鍵生成処理を行う場合に比べて、回路規模を抑えてパイプライン動作による処理の高速化を図ることができる。
【0156】
図27に、暗号装置200の鍵セット選択回路280について説明するための図を示す。
【0157】
ただし、図16に示す暗号装置200と同一部分には同一符号を付し、適宜説明を省略する。
【0158】
本実施形態における暗号装置200の鍵セット選択回路280は、TDES用の第1〜第p(pは2以上の整数)のTDES鍵セットを保持するTDES鍵ボックス282と、SDES用の第1〜第q(qは2以上の整数)複数の鍵セットを保持するSDES鍵ボックス284とを備え、TRIPLE信号、TRI_COUNT信号、鍵選択信号KEY_SELに応じて、各ボックスのいずれか1つの鍵セットを選択する。そして、暗号処理用の第1段〜第8段の鍵を第1の鍵出力回路260に出力し、第9段〜第16段の鍵を第2の鍵出力回路270に出力する。
【0159】
第1の鍵出力回路260は、EN_xDE信号により暗号処理を行う場合には、KEY_NUMBER信号により特定されるSDESの処理段に応じた鍵をDES演算回路210に供給する。また第1の鍵出力回路260は、復号処理を行う場合には、KEY_NUMBER信号により特定されるSDESの処理段に応じた鍵をDES演算回路220に供給する。
【0160】
第2の鍵出力回路260は、EN_xDE信号により暗号処理を行う場合には、KEY_NUMBER信号により特定されるSDESの処理段に応じた鍵をDES演算回路220に供給する。また第2の鍵出力回路260は、復号処理を行う場合には、KEY_NUMBER信号により特定されるSDESの処理段に応じた鍵をDES演算回路210に供給する。
【0161】
4.4 回路動作フローの一例
図28に、本実施形態における暗号装置200の回路動作フローの一例を示す。
【0162】
ここでは暗号処理及び復号処理の対象となるデータが、ハードディスク装置に記憶され、アクセスするデータブロックのカウント数に応じて、TDES又はSDESかを切り替えることができる場合について説明する。
【0163】
制御回路290では、入力ラッチ回路240から入力データを入力させると、アクセスするデータブロックのカウント数を管理するデータブロックカウント値data_cntがインクリメントされる(ステップS400)。そして、インクリメントされたデータブロックカウント値data_cntに応じて、DES演算回路210、220などが制御される(ステップS401)。より具体的には、データブロックカウント値data_cntが所与のエンド値ENDのとき、データブロックカウント値data_cntは「0」にリセットされる。またデータブロックカウント値data_cntが、TDESの開始データブロック値と一致したとき、TRIPLE信号をアクティブにする。更に、データブロックカウント値data_cntが、TDESの終了データブロック値と一致したときには、TIRPLE信号をインアクティブにする。
【0164】
次に、制御回路290は、TRI_COUNT信号を「0」に設定し(ステップS402)、KEY_NUMBER信号を「0」に設定する(ステップS403)。TRI_COUNT信号を「0」に設定した場合、TDESの処理においてSDESの1回目の処理であることを示す。またKEY_NUMBER信号を「0」に設定した場合、SDESの第1段の処理であることを示す。
【0165】
その後、KEY_NUMBER信号により示される段数に応じて、DES演算回路210又はDES演算回路220により、SDESの1段分の処理が行われる(ステップS404)。
【0166】
SDESの1段分の処理が終了すると、KEY_NUMBER信号が「16」になっているか否かを検出し、「16」になっていないとき(ステップS405:N)、KEY_NUMBER信号により指定されるSDESの段数をインクリメントし(ステップS406)、再びステップS404のDES演算を行う。一方、KEY_NUMBER信号が「16」のとき(ステップS405:Y)、TRIPLE信号が「0」で、かつTRI_COUNT信号が「2」であるか否かを検出する。そして、TRIPLE信号が「0」で、かつTRI_COUNT信号が「2」ではないとき(ステップS407:N)、TRI_COUNT信号で示されるSDESのループ回数をインクリメントし(ステップS408)、再びステップS403に戻って、次のループのSDESの処理を開始する。また、TRIPLE信号が「0」で、かつTRI_COUNT信号が「2」であるとき(ステップS407:Y)、TDESの処理が終了したと判断して、DES演算回路220の処理結果を用いて変換データを出力する。
【0167】
このような暗号処理(復号処理)に対して鍵を供給する鍵選択処理においては、鍵セット選択回路280により、鍵選択信号KEY_SELに基づいて鍵セットが選択される(ステップS450)。
【0168】
より具体的には、TRIPLE信号がアクティブのとき、鍵選択信号KEY_SELとTRI_COUNT信号とに基づいて、関数Function_Tにより、鍵選択値ksを求める。TRIPLE信号がインアクティブのとき、鍵選択信号KEY_SELに基づいて、関数Function_Sにより鍵選択値ksを求める。関数Function_Sは、例えば鍵選択信号KEY_SELを、所与のビット操作により鍵選択値ksを出力する。
【0169】
そして、関数Function_Rにより、鍵選択値ksに対応する鍵セットを選択する(ステップS451)。TDESの場合は、TDES鍵ボックス282に保持された複数の鍵セットの中から選択される。SDESの場合は、SDES鍵ボックス284に保持された複数の鍵セットの中から選択される。
【0170】
このようにして鍵セット選択回路280によって選択された鍵セットの中から、KEY_NUMBER信号により示されるSDESの処理段数に応じた鍵KEYが供給される(ステップS452)。
5. データ転送制御装置
図29に、本実施形態におけるインタフェースICの構成の概要を示す。
【0171】
本実施形態におけるインタフェースIC800は、DES処理回路810と、メモリ812と、インタフェース回路814と、鍵セット選択回路820とを含む。DES処理回路810は、上述した暗号装置200と同等の機能を有する。鍵セット選択回路820は、上述した暗号装置200の鍵セット選択回路280と同等の機能を有する。インタフェースIC800は、外部のハードディスク装置830へのアクセスデータの制御を行う。より具体的には、インタフェースIC800は、メモリ812に書き込まれたデジタルデータについてSDES又はTDESによる暗号処理を行って、インタフェース回路814を介し、ハードディスク装置830へのデジタルデータの書き込みを行う。またインタフェースIC800は、インタフェース回路814を介しハードディスク装置830から読み出された保存データを、SDES又はTDESによる復号処理を行ってデジタルデータに復号化し、メモリ812にバッファリングする。
【0172】
このようにハードディスク装置等の大容量記憶媒体にアクセスするためのインタフェースICに上述した暗号装置200を適用させることで、大容量のアクセスデータについても、高い機密性を維持したまま高速なアクセス処理を行わせることができる。
【0173】
図30に、本実施形態におけるインタフェースICの構成例を示す。
【0174】
インタフェースIC800は、汎用シリアルバスとしてのIEEE1394シリアルバスを介して転送されるデータのIDE(Integrated Device Electronics)ストレージ850に対するアクセス制御を行う。IEEE1394シリアルバス上では、アイソクロナス(Isochronous)転送又はアシンクロナス(Asynchronous)転送が行われる。アイソクロナス転送が行われるアイソクロナスデータは、例えばリアルタイム性が要求される画像データである。アシンクロナス転送が行われるアシンクロナスデータは、例えばコマンドデータである。
【0175】
IEEE1394シリアルバスを介して受信されたデータは、IEEE1394物理層回路862及びIEEE1394リンク層回路864を介し、第1のDMAC(Direct Memory Access Controller)866に入力される。第1のDMAC866は、DTCP処理回路868において、IEEE1394の暗号化規格であるDTCP(Digital Transmission Content Protection)により復号化し、パケットメモリインタフェース870を介してSRAM(Static Random Access Memory)で構成されたパケットメモリ872に転送する。パケットメモリ872では、アイソクロナスデータとアシンクロナスデータの記憶領域が区分され、更にそれぞれのデータについて送信データ領域と受信データ領域とを有している。パケットメモリインタフェース870は、格納するデータを仕分けして、対応する記憶領域に格納する。
【0176】
パケットメモリ872に記憶されたデータは、パケットメモリインタフェース870を介して、第2のDMAC874により読み出される。第2のDMAC874は、DES処理回路876でSDES又はTDESにより暗号化する。DES処理回路876は、本実施形態における暗号装置を採用することができ、例えばIDEストレージ850に書き込む際のセクタ番号に応じて、SDES又はTDESで暗号化する。なお暗号化するデータは、パケットメモリ872のアイソクロナス受信データ領域に記憶されるアイソクロナス受信データのみである。
【0177】
インタフェースIC800の外部には、SDRAM(Synchronous DRAM)により構成されたキャッシュメモリ880が接続されている。第2のDMAC874は、DES処理回路876により暗号化したデータを、キャッシュメモリインタフェース878を介して、キャッシュメモリ880に格納する。これにより、アイソクロナス受信データの機密性を維持することができる。
【0178】
一方、同様にしてパケットメモリ872のアシンクロナス受信データ領域に入っているアシンクロナス受信データは、図示しないホスト(例えばCPU)によりデコードされ、コマンドの解析が行われる。
【0179】
キャッシュメモリ880は、送信データ記憶領域と受信データ記憶領域とを有しており、第2のDMAC884により暗号化されたアイソクロナス受信データは受信データ記憶領域に書き込まれる。
【0180】
その後、第3のDMAC882が、キャッシュメモリ880からアイソクロナス受信データを読み出し、IDEインタフェース884を介してIDEストレージ850に書き込む。
【0181】
このようにキャッシュメモリ880を設けることで、アイソクロナスデータをバッファリングすることができるので、IDEストレージ850のアクセス時間があった場合でも、所定の転送レートで転送されるデータの連続性を保証することができる。
【0182】
これに対して、IEEE1394シリアルバスを介して送信する場合、まず第3のDMAC882により、IDEストレージ850からデータが読み出される。IDEストレージ850から読み出されたデータは、SDES又はTDESにより暗号化されており、キャッシュメモリインタフェース878を介して、キャッシュメモリ880の送信データ領域に格納される。第2のDMAC874は、キャッシュメモリ880の送信データ領域に記憶されたデータを読み出し、DES処理回路876で復号化して、パケットメモリ872のアイソクロナス送信データ領域に格納する。第1のDMAC866は、パケットメモリ872のアイソクロナス送信データ領域に記憶されたアイソクロナスデータを読み出す。読み出されたアイソクロナスデータは、DTCP処理回路868によりDTCPによる暗号化が行われ、アイソクロナスヘッダを付加してIEEE1394シリアルバスに出力される。
【0183】
メモリポインタ管理回路886は、第1及び第2のDMAC866、874の制御を行う。より具体的には、第1及び第2のDMAC866、874がそれぞれ読み出し用ポインタ及び書き込み用ポインタを有しており、メモリポインタ管理回路886は、両ポインタを管理して第1及び第2のDMAC866、874の動作制御を行う。
【0184】
このような構成のインタフェースIC800は、システムコントローラ888により制御される。
【0185】
6. その他
上述の実施形態では、暗号方式としてSDES又はTDESを採用した場合について説明したが、これらに限定されるものではない。例えば暗号方式は、AES(Advanced Encryption Standard)であってもよい。AESは、DESの後継共通鍵暗号化方式である。
【0186】
図31に、AESの暗号処理を行う暗号装置の機能ブロック図の一例を示す。
【0187】
入力データ長は、128ビット、192ビット或いは256ビットがサポートされる。入力データは、まずBYTE_SUB部900に入力される。BYTE_SUB部900は、SBOXを利用して8ビットワード単位でビット変換を行う。BYTE_SUB部900でビット変換されたデータは、SHIFTROW部902に入力される。SHIFTROW部902は、「ABCD」というデータを「DABC」というデータに変換するように、8ビットワード単位でローテンションを行う。ローテンションされたデータは、MIXCOL部904に入力される。MIXCOL部904は、8ビットワード単位で乗算を行う。ADDKEY部906は、MIXCOL部904から出力されたデータと共通秘密鍵を用いて生成された鍵との排他的論理和演算を行う。
【0188】
以上の処理を1段分行い、入力データ長と鍵長に応じて決まる段数分だけ、再びBYTE_SUB部900に戻る。なお、最終段では、MIXCOL部904の処理は省略される。
【0189】
一方、共通秘密鍵は、KEY_EXPANSION部908に入力され、各段の鍵が生成される。この各段の鍵が、ADDKEY部906に供給される。
【0190】
このようなAESについても、上述した実施形態と同様に、入力データに対して暗号処理を行う少なくとも2つの演算回路を設け、それぞれ所与の段数分だけループさせて、これらをパイプライン動作させることができる。なお、この場合も、共通秘密鍵から鍵を生成しておき、段数に応じて上述の演算回路に順次供給させることができる。
【0191】
なお、本発明は上述した実施の形態に限定されるものではなく、本発明の要旨の範囲内で種々の変形実施が可能である。
【0192】
また上述した実施の形態では、SDESを3回ループさせるTDESについて説明したが、適用する鍵を適宜切り替えてSDESを2回ループ又は4回以上ループさせるようにしてもよい。
【0193】
さらにまた上述のデータ転送制御装置は、IEEE1394規格のシリアルバスのインタフェースを例に説明したが、これに限定されるものではない。例えばUSB(USB1.1、USB2.0など)規格のシリアルバスのインタフェースにも適用することができる。
【図面の簡単な説明】
【図1】SDESによる暗号処理を行う暗号装置の機能ブロック図である。
【図2】暗号処理部の処理フロー図である。
【図3】初期転置について説明するための図である。
【図4】非線形変換の機能ブロック図である。
【図5】拡大転置について説明するための図である。
【図6】SBOXにおいて行われる圧縮換字変換について説明するための図である。
【図7】非線形変換において行われる転置について説明するための図である。
【図8】最終転置について説明するための図である。
【図9】鍵生成処理部の処理フロー図である。
【図10】選択転置について説明するための図である。
【図11】巡回シフト数について説明するための図である。
【図12】圧縮転置について説明するための図である。
【図13】SDESによる復号処理を行う復号装置の機能ブロック図である。
【図14】CBCモードの暗号処理と復号処理の機能ブロック図である。
【図15】TDESの処理フローの概要を示す機能ブロック図である。
【図16】本実施形態における暗号装置のブロック構成図である。
【図17】本実施形態における暗号装置におけるSDESの暗号処理の流れを模式的に示す説明図である。
【図18】本実施形態における暗号装置のパイプライン動作についての説明図である。
【図19】本実施形態における暗号装置のSDESの復号処理の流れを模式的に示す説明図である。
【図20】本実施形態における暗号装置におけるTDESの暗号処理の流れを模式的に示す説明図である。
【図21】本実施形態における暗号装置のTDESの復号処理の流れを模式的に示す説明図である。
【図22】図22(A)は、3段構成されたDES演算回路のブロック図である。図22(B)は、3段構成されたDES演算回路の暗号処理のパイプライン動作についての説明図である。
【図23】図23(A)は、3段構成されたDES演算回路のブロック図である。図23(B)は、3段構成されたDES演算回路の復号処理のパイプライン動作についての説明図である。
【図24】図24(A)は、4段構成されたDES演算回路のブロック図である。図24(B)は、4段構成されたDES演算回路の暗号処理のパイプライン動作についての説明図である。
【図25】図25(A)は、4段構成されたDES演算回路のブロック図である。図25(B)は、4段構成されたDES演算回路の復号処理のパイプライン動作についての説明図である。
【図26】鍵選択処理を行う暗号装置の構成の概要を示すブロック図である。
【図27】本実施形態における暗号装置の鍵セット選択回路についての説明図である。
【図28】本実施形態における暗号装置の回路動作フローの一例を示す図である。
【図29】本実施形態におけるインタフェースICの構成の概要を示すブロック図である。
【図30】本実施形態におけるインタフェースICの構成例を示す機能ブロック図である。
【図31】AESの暗号処理を行う暗号装置の構成の概要を示すブロック図である。
【符号の説明】
10 暗号装置
12 暗号処理部
14、74、80 鍵生成処理部
70 復号装置
72、90 復号処理部
82、100、102、104 DES演算部
84、94 レジスタ
92 DES-1演算部
200 暗号装置
210 DES演算回路(第1の暗号処理回路)
220 DES演算回路(第2の暗号処理回路)
230 プロローグ回路
240 入力ラッチ回路
250 エピローグ回路
260 第1の鍵出力回路
270 第2の鍵出力回路
280、820 鍵セット選択回路
282 TDES鍵ボックス
284 SDES鍵ボックス
290 制御回路
300 鍵生成部
810、876 DES処理回路
812 メモリ
814 インタフェース回路
830 ハードディスク装置
850 IDEストレージ
862 IEEE1394物理層回路
864 IEEE1394リンク層回路
866 第1のDMAC
868 DTCP処理回路
870 パケットメモリインタフェース
872 パケットメモリ
874 第2のDMAC
878 キャッシュメモリインタフェース
880 キャッシュメモリ
882 第3のDMAC
884 IDEインタフェース
886 メモリポインタ管理回路
888 システムコントローラ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an encryption device and a data transfer control device.
[0002]
[Background Art and Problems to be Solved by the Invention]
In recent years, various types of data such as video and music have been digitized, and data such as video can be stored and used in a large-capacity storage medium such as a hard disk device. Therefore, there is an increasing demand for data security for an interface IC (Integrated Circuit) (data transfer control device in a broad sense) that controls access to a hard disk device or the like.
[0003]
Data security in the interface IC can be realized by encryption. In this case, the encryption method employed for the interface IC is an important factor in addition to its security, speeding up of processing and cost reduction.
[0004]
Up to now, common key encryption methods have been widely used in fields such as the financial industry. The common key encryption method uses the same key for encryption and decryption. Among the common key encryption methods, DES (Data Encryption Standard) was defined as the US Information Processing Standards (FIPS-PUB) 46-3 in 1977 and is the most widely used method. One.
[0005]
However, due to the dramatic improvement in information processing capability in recent years, the encryption strength of DES is not as strong as before. For this reason, triple DES may be used instead of DES.
[0006]
Hereinafter, in order to distinguish between DES and triple DES, DES is referred to as SDES (Single DES), and triple DES is referred to as TDES (Triple DES).
[0007]
TDES is an encryption method that repeats the SDES algorithm three times, and can use the SDES algorithm. Further, the same effect as that of extending the key length of the encryption key can be obtained, and the encryption strength can be increased relatively easily.
[0008]
However, when the TDES encryption method is mounted on the interface IC, there is a problem that the circuit scale increases accordingly. On the other hand, some users do not need the encryption strength by TDES, and may require high-speed encryption processing while maintaining the SDES encryption strength. Therefore, it is desirable to configure the interface IC so that SDES and TDES coexist and can be switched according to the target data.
[0009]
The present invention has been made in view of the above technical problems, and an object of the present invention is to provide a plurality of encryption methods such as SDES and TDES at an optimum circuit scale and processing speed. It is an object of the present invention to provide an encryption device and a data transfer control device that can achieve both of the above.
[0010]
[Means for Solving the Problems]
In order to solve the above-described problems, the present invention changes a key generated by a common key encryption method to input data divided into a plurality of data blocks each time and performs a given arithmetic processing (M + N) (M , N is a positive integer) times, and performs encryption processing including processing for generating conversion data for each data block, based on input data of the nth (n is an integer of 2 or more) data block A first cryptographic processing circuit that generates the nth intermediate conversion data by performing the given arithmetic processing M times, and the given arithmetic processing is performed N times based on the nth intermediate conversion data. And a second cryptographic processing circuit that generates n-th converted data, and at a first timing, the first cryptographic processing circuit is configured to perform the n-th conversion based on input data of the n-th data block. When generating intermediate conversion data The second cryptographic processing circuit generates (n-1) th conversion data based on the (n-1) th intermediate conversion data, and at the second timing next to the first timing, The first encryption processing circuit generates (n + 1) th intermediate conversion data based on the input data of the (n + 1) th data block, and the second encryption processing circuit is based on the nth intermediate conversion data. And the encryption device for generating the nth conversion data.
[0011]
In the present invention, for each data block, the key generated by the common key encryption method is changed each time, and the given arithmetic processing is performed (M + N) times to perform the encryption processing or the decryption processing to generate the conversion data. In this case, the first and second cryptographic processing circuits that perform the above arithmetic processing are used. Assuming that the first data block is sequentially input, at the first timing, the first cryptographic processing circuit performs the above arithmetic processing M times based on the input data of the nth data block, and the nth The intermediate conversion data is generated, and the second cryptographic processing circuit performs the above arithmetic processing N times based on the (n−1) th intermediate conversion data to generate the (n−1) th conversion data. To do. At the second timing next to the first timing, the first encryption processing circuit generates (n + 1) th intermediate conversion data based on the input data of the (n + 1) th data block, and The cryptographic processing circuit generates the nth conversion data based on the nth intermediate conversion data. As a result, the processing result can be obtained at high speed by the pipeline operation for the sequentially input data blocks.
[0012]
In the cryptographic apparatus according to the present invention, the first cryptographic processing circuit, when performing cryptographic processing in a given first mode, includes the (n-1) th intermediate conversion data and the nth The nth intermediate conversion data can be generated based on the input data of the data block.
[0013]
According to the present invention, when the input data of the nth data block is input to the first encryption processing circuit, it is input in association with the (n−1) th intermediate conversion data of the previous data block. be able to. Accordingly, since the input data processed by the first cryptographic processing circuit has the same contents in successive data blocks, the converted data that is finally generated will not be the same data, and the key data can be obtained with a simple configuration. Identification can be difficult.
[0014]
Further, instead of using the (n−1) th conversion data generated by the second encryption processing circuit, the (n−1) th intermediate conversion data generated by the first encryption processing circuit is used. Therefore, it is not necessary to wait for the (n-1) th conversion data to be generated, and the processing speed can be increased by the pipeline operation.
[0015]
In the cryptographic apparatus according to the present invention, the nth intermediate conversion data is subjected to an exclusive OR operation between the (n-1) th intermediate conversion data and the input data of the nth data block. It may be generated based on the operation data.
[0016]
According to the present invention, the above-described effects can be obtained by greatly simplifying the configuration.
[0017]
The encryption device according to the present invention is generated based on the nth conversion data and the (n-1) th intermediate conversion data when performing decryption processing in a given first mode. Arithmetic data can be output as a decoded signal.
[0018]
According to the present invention, in the given first mode described above, in order to make it difficult to specify the key, the (n-1) th (n-1) th of the input data of the nth data block and the previous data block. Also, the input data subjected to the encryption process in association with the intermediate conversion data can be decrypted with a simple configuration.
[0019]
In the cryptographic apparatus according to the present invention, the operation data may be data obtained by performing an exclusive logical operation between the nth conversion data and the (n-1) th intermediate conversion data.
[0020]
According to the present invention, the above-described effects can be obtained by greatly simplifying the configuration.
[0021]
In the cryptographic apparatus according to the present invention, when cryptographic processing is performed in a given second mode, the first and second cryptographic processing circuits obtained by looping the processing by the first and second cryptographic processing circuits one or more times. The (n + 1) th conversion data can be generated based on the n conversion data and the input data of the (n + 1) th data block.
[0022]
According to the present invention, encryption is performed based on the nth conversion data obtained by looping the processing by the first and second encryption processing circuits one or more times and the input data of the (n + 1) th data block. Since the processing is performed, the key length can be substantially extended without increasing the circuit scale, and the confidentiality can be greatly improved.
[0023]
In the encryption device according to the present invention, the input data of the (n + 1) th data block may be operation data obtained by performing an exclusive OR operation with the nth conversion data.
[0024]
According to the present invention, in the given second mode described above, since the input data of the (n + 1) th data block can be associated with the nth converted data with a simple configuration, encryption processing can be performed. Key identification can be made more difficult with a simple configuration.
[0025]
Further, when performing the decryption process in the given second mode, the cryptographic apparatus according to the present invention performs the nth conversion generated by looping the first and second cryptographic processing circuits one or more times. Calculation data generated based on the data and the input data of the (n−1) th data block can be output as a decoded signal.
[0026]
According to the present invention, in the given second mode described above, input data that has been subjected to encryption processing in association with preceding and subsequent data blocks in order to make it difficult to specify a key can be decrypted with a simple configuration. Processing can be performed.
[0027]
In the encryption device according to the present invention, the operation data is an exclusive OR operation result of data generated based on the nth conversion data and input data of the (n−1) th data block. There may be.
[0028]
According to the present invention, in the given second mode described above, even when encryption processing is performed by associating the input data of the (n + 1) th data block with the nth converted data, the configuration is simple. Decoding processing can be performed.
[0029]
In the cryptographic apparatus according to the present invention, the first cryptographic processing circuit repeatedly performs the cryptographic processing of each stage of DES eight times, and the second cryptographic processing circuit performs the cryptographic processing of each stage of DES by 8 times. Can be performed repeatedly.
[0030]
According to the present invention, it can be applied to DES encryption processing and decryption processing, and it is possible to speed up encryption processing and decryption processing that guarantees certain confidentiality without causing an increase in circuit scale.
[0031]
The cryptographic apparatus according to the present invention includes a first key output circuit that outputs a key corresponding to each stage of the DES performed by the first cryptographic processing circuit, and a DES performed by the second cryptographic processing circuit. A second key output circuit that outputs a key corresponding to each stage. In the cryptographic process, the first key output circuit includes eight keys one by one in the first cryptographic processing circuit. The second key output circuit outputs eight keys one by one for the processing of each stage of the DES performed by the second encryption processing circuit. In the decryption process, the first key output circuit performs the process of each stage of DES performed by the second encryption processing circuit, one by one in the reverse order of the case of the encryption process. The second key output circuit outputs eight keys one by one in the reverse order as in the case of the cryptographic process. It can be output for processing of each stage of the DES performed in the first cryptographic processing circuit.
[0032]
According to the present invention, the keys to be applied to the DES encryption process or decryption process need only be switched in order of key application. Therefore, the keys to be applied to each stage of the DES by the first and second key output circuits. The encryption process and the decryption process can be switched with a simple configuration by switching the keys supplied to the first and second encryption processing circuits.
[0033]
The encryption apparatus according to the present invention includes a key selection circuit that holds a plurality of sets of DES keys and selects any one set based on a given key selection signal, and includes the first and second key outputs. The circuit can output a key of the DES of the selected set based on the given key selection signal.
[0034]
According to the present invention, since one set of keys selected from a plurality of sets of keys is supplied, identification of the keys can be made more difficult. In addition, specifying the key set to be applied makes it more difficult to specify the key. Also, even if one set of keys is specified, the remaining keys can be applied, so confidentiality can be maintained.
[0035]
The present invention also provides an encryption for performing encryption processing on input data divided into a plurality of data blocks, including processing for changing a key generated by a common key encryption method each time and performing a given arithmetic processing a plurality of times. A first to Lth (L is an integer of 2 or more) cryptographic processing circuits that perform the given arithmetic processing one or more times, and at the first timing, the kth (1 ≦ k) .Ltoreq.L-1, k is an integer) encryption processing circuit processes the nth (n is an integer of 2 or more) data block, and the (k + 1) th encryption processing circuit is the (n-1) th. In the second timing next to the first timing, the kth cryptographic processing circuit processes the (n + 1) th data block and the (k + 1) th cryptographic processing. The circuit includes the first tie. It relates to the encryption apparatus for processing using the processing result of the encryption processing circuit of the k-th in the ring.
[0036]
In the present invention, when performing cryptographic processing including processing for performing a given arithmetic processing a plurality of times by the common key encryption method, the first to Lth cryptographic processing circuits performing the given arithmetic processing one or more times Is used. Of these, the k-th and (k + 1) -th cryptographic processing circuits are configured to perform a pipeline operation. That is, the processing result for the nth data block processed by the kth cryptographic processing circuit at the first timing is used by the (k + 1) th cryptographic processing circuit at the second timing next to the first timing. Perform arithmetic processing.
[0037]
As a result, it is not necessary to provide cryptographic processing circuits as many times as the number of times of the arithmetic processing described above, and the processing result can be obtained at high speed by pipeline operation while suppressing the circuit scale.
[0038]
The data transfer control device according to the present invention includes a memory for storing isochronous data, an interface circuit for accessing a given storage device connected to the outside, and a transfer between the memory and the interface circuit. Any of the above-described encryption apparatuses that perform encryption processing or decryption processing on isochronous data can be included.
[0039]
According to the present invention, there is provided a data transfer control device capable of improving the confidentiality of isochronous data by performing high-speed encryption processing or decryption processing on a storage device storing real-time isochronous data. be able to.
[0040]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. The embodiments described below do not unduly limit the contents of the present invention described in the claims. Also, not all of the configurations described below are essential constituent requirements of the present invention.
[0041]
The encryption apparatus according to the present embodiment generates converted data by performing a plurality of stages of arithmetic processing using input keys generated by a common key encryption method. The encryption apparatus according to the present embodiment can perform encryption processing and decryption processing by switching the application order of keys. Hereinafter, a case where the common key encryption method of the encryption device is DES will be described.
[0042]
1. Overview of SDES
First, an outline of processing contents of SDES (Single DES) will be described.
[0043]
FIG. 1 shows an outline of a functional block configuration of an encryption device that performs encryption processing by SDES.
[0044]
The
[0045]
The
[0046]
FIG. 2 shows a flowchart of the processing of the
[0047]
When 64-bit input data M is input to the
[0048]
The initial transposed data subjected to the initial transposition is divided into bits, and the upper 32 bits are converted into the first stage input data L 0 ,
[0049]
First stage input data R 0 Is the first stage key K 1 The nonlinear transformation data f (R 0 , K 1 (Step S20-1).
[0050]
FIG. 4 shows a functional block diagram of the nonlinear transformation f.
[0051]
Here, a functional block diagram of the nonlinear transformation f of the i-th (1 ≦ i ≦ 16, i is an integer) stage is shown.
[0052]
I-th stage input data R i-1 Is expanded transposition data ER by expanded transposition (E). i-1 (Step S50). As shown in FIG. 5, the extended transposition (E) is performed by duplicating predetermined bits to generate 32-bit i-th stage input data R. i-1 48-bit expanded transposed data ER i-1 Convert to In FIG. 5, for example, the first bit of the input is output from the second bit and the 48th bit of the output, and the 32nd bit of the input is output from the first bit and the 47th bit of the output.
[0053]
Enlarged transposition data ER i-1 Is the key K for the i-th stage i Are subjected to an exclusive OR operation (XOR) (step S51), and each 6 bits are input to SBOX0 to SBOX7. Here, the key K for the i-
[0054]
The
[0055]
FIG. 6 is a diagram for explaining compression substitution conversion performed in SBOX0.
[0056]
In SBOX0, 4-bit data is specified by a row number and a column number. The row number is specified by the first (leftmost) 1 bit and the last (rightmost) 1 bit among the 6 bits inputted. The column number is specified by the remaining 4 bits among the 6 bits input. Then, the 4-bit data specified by the row number and the column number is converted in correspondence with the inputted 6 bits.
[0057]
For example, enlarged transposition data ER i-1 And the key K for the i-th stage i If the result of the exclusive OR operation is 6 bits “101000”, the row number is (10) 2 Because the second line is specified, the column number is (0100) 2 Therefore, the fourth line is specified. Therefore, 6-bit “101000” input to
[0058]
Although SBOX0 has been described here, the same conversion is performed for SBOX1 to SBOX7 by the row number and the column number, respectively.
[0059]
In this way, the 4-bit conversion data output from SBOX0 to 7 is subjected to transposition processing (P) (step S53). In the transposition process, as shown in FIG. 7, the output bit position is changed according to the input bit position and output. For example, the 16th bit of the input bit is transposed to the first bit of the output, and the first bit of the input is transposed to the 9th bit of the output.
[0060]
As a result of this transposition processing (P), 32-bit non-linear conversion data ER i-1 (= F (R i-1 , K i )) Is generated.
[0061]
In FIG. 2, the first stage input data R 0 Nonlinear transformation data f (R 0 , K 1 ) Is the first stage input data L 0 Are subjected to an exclusive OR operation (step S21-1), and the operation result is the second-stage input data R. 1 (Step S22-1).
[0062]
On the other hand, the second stage input data L 1 Is the first stage input data R 0 (Step S23-1).
[0063]
As described above, the first stage input data L 0 , R 0 To second stage input data L 1 , R 1 If the process up to the generation of SDES is the first stage of the SDES encryption process (given calculation process), the same process is performed up to the 16th stage. In the nonlinear transformation at each stage, the key applied for each stage is changed.
[0064]
As a result, the 16th stage input data L generated in the 16th stage 16 , R 16 Is as follows (steps S23-16, S22-16).
[0065]
L 16 = R 15 ... (1)
R 16 = L 15 (+) F (R 15 , K 16 (2)
Here, (+) indicates an exclusive OR operation.
[0066]
Finally, the upper 32 bits and the lower 32 bits are replaced with the replacement data L 16 'Is the 16th stage input data R 16 (Step S24), replacement data R 16 'Is the 16th stage input data L 16 (Step S25), the final transposition (IP -1 (Step S26).
[0067]
Final transposition (IP -1 ) Corresponds to the initial transposition (IP), and the data in which the bit positions are replaced by the initial transposition as shown in FIG. 8 is restored. For example, the first bit of the input is transposed to the 58th bit of the output, and the 40th bit of the input is transposed to the first bit of the output.
[0068]
As a result, conversion data P is generated.
[0069]
Next, a generation flow of a key for performing non-linear transformation at each stage of the
[0070]
FIG. 9 shows a flowchart of the processing of the key
[0071]
The key
[0072]
The selected transposed data subjected to the selective transposition is divided into bits, and the upper 28 bits are converted into the first stage input data C. 0 ,
[0073]
First stage input data C 0 Is cyclically shifted leftward, and the second stage input data C 1 (Steps S63-1, S64-1). Also, the first stage input data D 0 Is cyclically shifted leftward, and the second stage input data D 1 (Steps S65-1, S66-1). Here, the number of bits for cyclic shift is determined for each processing stage of DES as shown in FIG. For example, the cyclic shift is performed by 1 bit in the first stage and by 2 bits in the third stage.
[0074]
Further, in the first stage, the second stage input data C generated as a result of the cyclic shift. 1 , D 1 Is subjected to compression transposition (PC-2) (step S67-1), and the first-stage key K 1 Is generated.
[0075]
In compression transposition (PC-2), 28-bit second stage input data C 1 , D 1 The 56-bit data consisting of is converted to 48-bit data. In this compression transposition, as shown in FIG. 12, the output bit position is changed in accordance with the input bit position and output. For example, the 14th bit of the input is transposed to the first bit of the output, and the first bit of the input is transposed to the fifth bit of the output.
[0076]
The 48-bit data subjected to this compression transposition is the first stage key K 1 Is used for the first-stage nonlinear transformation of the
[0077]
As described above, the first stage input data C 0 , D 0 To second stage input data C 1 , D 1 If the process up to the generation of SES is the first stage process of SDES key generation, the same process is performed up to the 16th stage. Thus, the key K generated at each stage 1 ~ K 16 Is applied to each stage of cryptographic processing of the
[0078]
FIG. 13 shows an outline of a functional block configuration of a decoding device that performs a decoding process by SDES.
[0079]
The
[0080]
The
[0081]
The
[0082]
The key
[0083]
In this way, the decryption process can be made common to the process contents of each stage of the encryption process if attention is paid to the process contents of each stage. The encryption device according to the present embodiment is configured to share a circuit that performs encryption processing and perform decryption processing using the circuit.
[0084]
2. Encryption mode
In SDES, plain text or cipher text as input data is divided into a plurality of blocks, and encryption processing or decryption processing is performed in block data units. Therefore, in the case of the same block data, the converted data may be the same, and the key is easily identified. Therefore, in SDES, various encryption modes such as a CBC (Cipher Block Chaining) mode and a CFB (Cipher FeedBack) mode are used.
[0085]
FIG. 14 shows a functional block diagram of encryption processing and decryption processing in the CBC mode.
[0086]
In the
[0087]
In the
[0088]
As a result, even if the content of the block data is the same, encryption processing is performed on the calculation result corresponding to the content of the previous data block, so that it is difficult to specify the key without taking a complicated configuration. can do.
[0089]
3. Overview of TDES
By the way, against the background of advances in computer technology and the like, the information processing capability has been remarkably improved, and there is a limit to the safety of the SDES described above. Therefore, there is a TDES that loops SDES three times to further increase safety.
[0090]
FIG. 15 shows an outline of the processing flow of TDES.
[0091]
The encryption processing by TDES is realized by performing the above-described SDES encryption processing or decryption processing by the
[0092]
In this way, key set K 0A , K 0B , K 0C Are all different, the key length is 192 (= 64 × 3) bits, and the encryption strength can be further increased.
[0093]
Note that when performing the TDES decryption process, the decryption process, the encryption process, and the decryption process may be performed in the order opposite to the encryption process illustrated in FIG.
[0094]
4). Cryptographic device in this embodiment
TDES encryption processing and decryption processing can sufficiently secure confidentiality as described above, but their scale increases and cost reduction cannot be achieved as compared with SDES circuits. On the other hand, since the confidentiality is sufficiently maintained even with the strength of encryption by SDES, SDES mode for performing SDES encryption processing (decryption processing) or TDES encryption processing (decryption) according to the type of target data. It is desirable that the TDES mode in which the processing is performed can be switched.
[0095]
Therefore, the encryption apparatus according to the present embodiment is configured to perform processing for 16 stages of SDES by pipeline operation by a plurality of DES arithmetic circuits having the same configuration. That is, it has first to L-th (L is an integer equal to or larger than 2) DES arithmetic circuits (encryption processing circuits in a broad sense) that perform processing of each stage of SDES one or more times, and at least kth (1 ≦≦ k ≦ L−1, k is an integer) and the (k + 1) th DES arithmetic circuit can perform the pipeline operation.
[0096]
Furthermore, the encryption device according to the present embodiment realizes encryption processing or decryption processing by TDES by looping the SDES processing that performs the above-described pipeline operation a plurality of times. By doing so, encryption processing and decryption processing by TDES are realized without increasing the circuit scale, and processing by higher speed SDES is realized.
[0097]
In addition, the cryptographic apparatus according to the present embodiment does not perform the key generation process, holds the key generated in advance by the above-described key generation process, and applies it to the process of each stage of the SDES. As a result, it is not necessary to perform key generation processing during the pipeline operation, so that the pipeline processing can be speeded up.
[0098]
4.1 Block configuration
In the following, a cryptographic apparatus that is composed of 2 (L = 2) stages of DES arithmetic circuits and performs a pipeline operation will be described. However, it has three or more stages (L ≧ 3) of DES arithmetic circuits. A pipeline operation may be performed.
[0099]
FIG. 16 is a block diagram of the encryption device according to this embodiment.
[0100]
The
[0101]
A
[0102]
An
[0103]
The
[0104]
In the case of performing the encryption process, the first
[0105]
When performing the decryption process, the first
[0106]
Keys K output from the first and second
[0107]
The key
[0108]
When performing encryption processing or decryption processing by TDES, the key
[0109]
Each unit of the
[0110]
The xRST signal is a reset signal. When the xRST signal becomes active, the state of each unit constituting the
[0111]
The xCLR signal is a clear signal. When the xCLR signal becomes active, for example, the register states of the DES
[0112]
The DES_WAIT signal is a wait signal. When the DES_WAIT signal becomes active, the processing of the DES
[0113]
The EX_OR signal is a CBC mode control signal. When the EX_OR signal becomes active, encryption processing and decryption processing are performed in the CBC mode. Therefore, the
[0114]
In the CBC mode, in the initialization state, the
[0115]
The EN_xDE signal is an encryption / decryption switching signal. When the EN_xDE signal becomes active, the
[0116]
The TRIPLE signal is a SDES-TDES switching signal. When the TRIPLE signal becomes active, TDES encryption or decryption is performed. The TRIPLE signal can be switched based on, for example, the sector number of a hard disk device that stores data to be encrypted or decrypted. In this case, data encrypted by SDES by the sector and data encrypted by TDES can be mixed, making it more difficult to decipher the key and greatly improving confidentiality.
[0117]
The TRI_COUNT signal is a TDES loop count signal. The number of SDES loops by TDES is specified by the TRI_COUNT signal. In response to the TRI_COUNT signal, the key
[0118]
The KEY_NUMBER signal is a SDES stage count signal. The number of stages of SDES is designated by the KEY_NUMBER signal, and a key corresponding to each stage is selected.
[0119]
The KEY_SEL signal is a key selection signal. By the KEY_SEL signal, one set is selected from a plurality of sets of keys stored in the TDES
[0120]
4.2 Outline of operation
Next, an outline of the operation of the
[0121]
FIG. 17 schematically shows the flow of SDES encryption processing in the
[0122]
In this case, the DES
[0123]
The DES
[0124]
The
[0125]
More specifically, the
[0126]
The
[0127]
The
[0128]
FIG. 18 is a diagram for explaining the pipeline operation.
[0129]
Assume that the input data is divided into blocks, and encryption processing is performed in order from the first data block. In this case, at the first timing, the DES
[0130]
By such a pipeline operation, if the first and second timings are one cycle of a given clock, conversion data encrypted by SDES can be generated for each clock. Therefore, the circuit scale can be reduced and the processing speed can be increased.
[0131]
In the CBC mode, if the processing result of the 16th stage of SDES is reflected in the input of the next data block, the processing speed of the DES
[0132]
FIG. 19 schematically shows the flow of the SDES decryption process in the
[0133]
In this case, the DES
[0134]
The DES
[0135]
The
[0136]
The
[0137]
More specifically, the
[0138]
Even in this case, the decoding process can be performed by the pipeline operation as shown in FIG.
[0139]
FIG. 20 schematically shows the flow of TDES encryption processing in the
[0140]
The
[0141]
The
[0142]
FIG. 21 schematically shows a flow of TDES decryption processing in the
[0143]
The
[0144]
The
[0145]
In this way, encryption processing and decryption processing by TDES can be performed by utilizing the processing circuit of SDES, and an increase in circuit scale can be avoided.
[0146]
Even if the DES operation circuit (encryption processing circuit) is configured to perform SDES encryption processing or decryption processing with a configuration of three or more stages, the SDES processing circuit is also diverted to perform encryption processing and decryption by TDES. Processing can be performed.
[0147]
For example, when the SES CBC mode encryption processing is performed by the first to third encryption processing circuits shown in FIG. 22A, converted data is generated by a pipeline operation as shown in FIG. Further, for example, when the SES CBC mode decryption processing is performed by the first to third cryptographic processing circuits shown in FIG. 23A, the cryptographic processing is performed by the pipeline operation as shown in FIG. Data can be decrypted.
[0148]
Further, for example, when performing encryption processing in the CBC mode of SDES by the first to fourth encryption processing circuits shown in FIG. 24A, converted data is generated by a pipeline operation as shown in FIG. . Also, for example, when the SES CBC mode decryption processing is performed by the first to fourth cryptographic processing circuits shown in FIG. 25A, the cryptographic processing is performed by the pipeline operation as shown in FIG. Data can be decrypted.
[0149]
By repeating the SDES processing circuit that performs high-speed processing of such a plurality of encryption processing circuits by pipeline operation three times as described above, encryption processing and decryption processing by TDES can be performed, which increases the circuit scale. It can be avoided.
[0150]
4.3 Multiple key sets
The
[0151]
FIG. 26 shows an outline of the configuration of an encryption device that performs key selection processing.
[0152]
However, the same parts as those of the
[0153]
In the
[0154]
The key
[0155]
As described above, since a plurality of key sets are held in advance and keys are supplied from any one key set selected by the key selection signal KEY_SEL, even if one key is decrypted, other keys are Since the key can be used, the encryption strength of the encryption device can be maintained. In addition, by configuring the key set to be switched based on the sector number or the like, it becomes more difficult to decrypt the key, and the confidentiality can be easily improved without changing the algorithm. Further, in the case of the present embodiment, compared to the case where the key generation process is performed simultaneously with the encryption process (decryption process), it is possible to reduce the circuit scale and speed up the process by the pipeline operation.
[0156]
FIG. 27 is a diagram for explaining the key
[0157]
However, the same parts as those of the
[0158]
The key
[0159]
When performing encryption processing using the EN_xDE signal, the first
[0160]
When performing encryption processing using the EN_xDE signal, the second
[0161]
4.4 Example of circuit operation flow
FIG. 28 shows an example of a circuit operation flow of the
[0162]
Here, a case will be described in which data to be subjected to encryption processing and decryption processing is stored in a hard disk device and can be switched between TDES and SDES in accordance with the count number of data blocks to be accessed.
[0163]
In the
[0164]
Next, the
[0165]
Thereafter, processing for one stage of SDES is performed by the DES
[0166]
When the processing of one stage of SDES is completed, it is detected whether or not the KEY_NUMBER signal is “16” (step S405: N). When the SDES is not “16”, the SDES specified by the KEY_NUMBER signal is detected. The number of stages is incremented (step S406), and the DES operation in step S404 is performed again. On the other hand, when the KEY_NUMBER signal is “16” (step S405: Y), it is detected whether the TRIPLE signal is “0” and the TRI_COUNT signal is “2”. When the TRIPLE signal is “0” and the TRI_COUNT signal is not “2” (step S407: N), the SDES loop number indicated by the TRI_COUNT signal is incremented (step S408), and the process returns to step S403 again. Then, the processing of SDES in the next loop is started. Further, when the TRIPLE signal is “0” and the TRI_COUNT signal is “2” (step S407: Y), it is determined that the processing of TDES has ended, and the conversion data is obtained using the processing result of the DES
[0167]
In key selection processing for supplying a key to such encryption processing (decryption processing), the key
[0168]
More specifically, when the TRIPLE signal is active, the key selection value ks is obtained by the function Function_T based on the key selection signal KEY_SEL and the TRI_COUNT signal. When the TRIPLE signal is inactive, the key selection value ks is obtained by the function Function_S based on the key selection signal KEY_SEL. The function Function_S outputs, for example, a key selection signal KEY_SEL and a key selection value ks by a given bit operation.
[0169]
Then, a key set corresponding to the key selection value ks is selected by the function Function_R (step S451). In the case of TDES, it is selected from a plurality of key sets held in the TDES
[0170]
A key KEY corresponding to the number of processing stages of SDES indicated by the KEY_NUMBER signal is supplied from the key sets selected by the key
5). Data transfer control device
FIG. 29 shows an outline of the configuration of the interface IC in the present embodiment.
[0171]
The
[0172]
In this way, by applying the above-described
[0173]
FIG. 30 shows a configuration example of the interface IC in the present embodiment.
[0174]
The
[0175]
Data received via the IEEE 1394 serial bus is input to a first DMAC (Direct Memory Access Controller) 866 via the IEEE 1394
[0176]
The data stored in the
[0177]
A
[0178]
On the other hand, similarly, the asynchronous reception data in the asynchronous reception data area of the
[0179]
The
[0180]
Thereafter, the
[0181]
By providing the
[0182]
On the other hand, when data is transmitted via the IEEE 1394 serial bus, data is first read from the
[0183]
The memory
[0184]
The
[0185]
6). Other
In the above-described embodiment, the case where SDES or TDES is adopted as the encryption method has been described, but the present invention is not limited to this. For example, the encryption method may be AES (Advanced Encryption Standard). AES is a successor common key encryption method of DES.
[0186]
FIG. 31 shows an example of a functional block diagram of an encryption apparatus that performs AES encryption processing.
[0187]
The input data length is 128 bits, 192 bits, or 256 bits. Input data is first input to the
[0188]
The above process is performed for one stage, and the process returns to the
[0189]
On the other hand, the common secret key is input to the
[0190]
For such AES, similarly to the above-described embodiment, at least two arithmetic circuits that perform encryption processing on input data are provided, and each of them is looped by a given number of stages, and these are pipeline-operated. Can do. In this case as well, a key can be generated from the common secret key and sequentially supplied to the arithmetic circuit according to the number of stages.
[0191]
In addition, this invention is not limited to embodiment mentioned above, A various deformation | transformation implementation is possible within the range of the summary of this invention.
[0192]
In the above-described embodiment, the TDES that loops the SDES three times has been described. However, the SDES may be looped twice or four times or more by appropriately switching the keys to be applied.
[0193]
Furthermore, although the above-described data transfer control device has been described by taking an example of an interface of an IEEE1394 standard serial bus, the present invention is not limited to this. For example, the present invention can also be applied to a serial bus interface of USB (USB 1.1, USB 2.0, etc.) standard.
[Brief description of the drawings]
FIG. 1 is a functional block diagram of a cryptographic device that performs cryptographic processing using SDES.
FIG. 2 is a processing flowchart of an encryption processing unit.
FIG. 3 is a diagram for explaining initial transposition;
FIG. 4 is a functional block diagram of nonlinear conversion.
FIG. 5 is a diagram for explaining enlarged transposition;
FIG. 6 is a diagram for explaining compression substitution conversion performed in SBOX.
FIG. 7 is a diagram for explaining transposition performed in nonlinear transformation.
FIG. 8 is a diagram for explaining final transposition;
FIG. 9 is a processing flow diagram of a key generation processing unit.
FIG. 10 is a diagram for explaining selective transposition;
FIG. 11 is a diagram for explaining the number of cyclic shifts.
FIG. 12 is a diagram for explaining compression transposition;
FIG. 13 is a functional block diagram of a decoding device that performs a decoding process using SDES.
FIG. 14 is a functional block diagram of encryption processing and decryption processing in CBC mode.
FIG. 15 is a functional block diagram showing an outline of a processing flow of TDES.
FIG. 16 is a block configuration diagram of an encryption device according to the present embodiment.
FIG. 17 is an explanatory diagram schematically showing the flow of SDES encryption processing in the encryption device according to the present embodiment.
FIG. 18 is an explanatory diagram of a pipeline operation of the encryption device according to the present embodiment.
FIG. 19 is an explanatory diagram schematically showing a flow of SDES decryption processing of the encryption device according to the present embodiment.
FIG. 20 is an explanatory diagram schematically showing a flow of TDES encryption processing in the encryption device according to the present embodiment.
FIG. 21 is an explanatory diagram schematically illustrating a flow of TDES decryption processing of the encryption device according to the present embodiment.
FIG. 22A is a block diagram of a three-stage DES arithmetic circuit. FIG. 22B is an explanatory diagram regarding the pipeline operation of the encryption processing of the DES arithmetic circuit configured in three stages.
FIG. 23A is a block diagram of a three-stage DES arithmetic circuit. FIG. 23B is an explanatory diagram of the pipeline operation of the decoding process of the three-stage DES arithmetic circuit.
FIG. 24A is a block diagram of a four-stage DES arithmetic circuit. FIG. 24B is an explanatory diagram of the pipeline operation of the encryption process of the DES arithmetic circuit configured in four stages.
FIG. 25A is a block diagram of a four-stage DES arithmetic circuit. FIG. 25B is an explanatory diagram of the pipeline operation of the decoding process of the DES arithmetic circuit configured in four stages.
FIG. 26 is a block diagram illustrating an outline of a configuration of an encryption device that performs key selection processing;
FIG. 27 is an explanatory diagram of a key set selection circuit of the encryption device according to the present embodiment.
FIG. 28 is a diagram illustrating an example of a circuit operation flow of the encryption device according to the present embodiment.
FIG. 29 is a block diagram showing an outline of a configuration of an interface IC in the present embodiment.
FIG. 30 is a functional block diagram showing a configuration example of an interface IC in the present embodiment.
FIG. 31 is a block diagram illustrating an outline of a configuration of an encryption device that performs AES encryption processing;
[Explanation of symbols]
10 Cryptographic device
12 Cryptographic processing part
14, 74, 80 Key generation processing unit
70 Decoding device
72, 90 Decoding processing unit
82, 100, 102, 104 DES operation unit
84, 94 registers
92 DES -1 Calculation unit
200 Cryptographic device
210 DES arithmetic circuit (first cryptographic processing circuit)
220 DES arithmetic circuit (second cryptographic processing circuit)
230 Prologue circuit
240 Input latch circuit
250 epilogue circuit
260 First key output circuit
270 Second key output circuit
280, 820 Key set selection circuit
282 TDES key box
284 SDES key box
290 Control circuit
300 Key generator
810, 876 DES processing circuit
812 memory
814 interface circuit
830 Hard disk device
850 IDE storage
862 IEEE 1394 Physical Layer Circuit
864 IEEE 1394 link layer circuit
866 first DMAC
868 DTCP processing circuit
870 packet memory interface
872 packet memory
874 Second DMAC
878 Cache memory interface
880 cache memory
882 Third DMAC
884 IDE interface
886 Memory pointer management circuit
888 system controller
Claims (14)
第n(nは2以上の整数)のデータブロックの入力データに基づいて、前記所与の演算処理をM回行って第nの中間変換データを生成する第1の暗号処理回路と、
前記第nの中間変換データに基づいて、前記所与の演算処理をN回行って第nの変換データを生成する第2の暗号処理回路と、
を含み、
第1のタイミングでは、
前記第1の暗号処理回路は前記第nのデータブロックの入力データに基づいて前記第nの中間変換データを生成すると共に、前記第2の暗号処理回路は第(n−1)の中間変換データに基づいて第(n−1)の変換データを生成し、
前記第1のタイミングの次の第2のタイミングでは、
前記第1の暗号処理回路は第(n+1)のデータブロックの入力データに基づいて第(n+1)の中間変換データを生成すると共に、前記第2の暗号処理回路は前記第nの中間変換データに基づいて前記第nの変換データを生成し、
第nのデータブロックの入力データが供給された後、所与の回数だけ前記第2の暗号処理回路からの出力に対応したデータが前記第1の暗号処理回路に戻されてから、該第1の暗号処理回路が、第(n+1)のデータブロックの入力データに対して演算処理を行うことを特徴とする暗号装置。For input data divided into a plurality of data blocks, the key generated by the common key encryption method is changed each time, and a given calculation process is performed (M + N) (M and N are positive integers) times, and the data An encryption device that performs encryption processing including processing for generating conversion data for each block,
A first cryptographic processing circuit that generates the nth intermediate conversion data by performing the given arithmetic processing M times based on input data of an nth (n is an integer of 2 or more) data block;
A second cryptographic processing circuit for generating the nth conversion data by performing the given arithmetic processing N times based on the nth intermediate conversion data;
Including
In the first timing,
The first encryption processing circuit generates the nth intermediate conversion data based on the input data of the nth data block, and the second encryption processing circuit generates (n-1) th intermediate conversion data. (N-1) th conversion data is generated based on
In the second timing after the first timing,
The first encryption processing circuit generates (n + 1) th intermediate conversion data based on input data of the (n + 1) th data block, and the second encryption processing circuit converts the nth intermediate conversion data into the nth intermediate conversion data. And generating the nth conversion data based on
After the input data of the nth data block is supplied, the data corresponding to the output from the second cryptographic processing circuit is returned to the first cryptographic processing circuit a given number of times, and then the first The cryptographic processing circuit performs arithmetic processing on input data of the (n + 1) th data block.
前記第1の暗号処理回路は、
所与の第1のモードにおいて暗号処理を行う場合には、前記第(n−1)の中間変換データと前記第nのデータブロックの入力データとに基づいて第nの中間変換データを生成することを特徴とする暗号装置。In claim 1,
The first cryptographic processing circuit includes:
When encryption processing is performed in a given first mode, nth intermediate conversion data is generated based on the (n-1) th intermediate conversion data and the input data of the nth data block. A cryptographic device characterized by the above.
前記第nの中間変換データは、
前記第(n−1)の中間変換データと前記第nのデータブロックの入力データとの間で排他的論理和演算された演算データに基づいて生成されることを特徴とする暗号装置。In claim 2,
The n-th intermediate conversion data is
An encryption device generated based on operation data obtained by performing an exclusive OR operation between the (n-1) -th intermediate conversion data and input data of the n-th data block.
所与の第1のモードにおいて復号処理を行う場合には、
前記第nの変換データと前記第(n−1)の中間変換データとに基づいて生成された演算データを、復号化された信号として出力することを特徴とする暗号装置。In any one of Claims 1 thru | or 3,
When performing decryption in a given first mode:
An encryption apparatus that outputs operation data generated based on the n-th conversion data and the (n-1) -th intermediate conversion data as a decrypted signal.
前記演算データは、
前記第nの変換データと前記第(n−1)の中間変換データとの間で排他的論理和演算されたデータであることを特徴とする暗号装置。In claim 4,
The calculation data is
An encryption apparatus, wherein the data is an exclusive OR operation between the n-th converted data and the (n-1) -th intermediate converted data.
所与の第2のモードにおいて暗号処理を行う場合には、
1又は複数回、前記第1及び第2の暗号処理回路による処理をループさせて得られた第nの変換データと、第(n+1)のデータブロックの入力データとに基づいて、第(n+1)の変換データを生成することを特徴とする暗号装置。In claim 1,
When performing cryptographic processing in a given second mode:
Based on the nth conversion data obtained by looping the processing by the first and second cryptographic processing circuits one or more times and the input data of the (n + 1) th data block, the (n + 1) th An encryption device for generating conversion data of
前記第(n+1)のデータブロックの入力データは、
前記第nの変換データとの間で排他的論理和演算された演算データであることを特徴とする暗号装置。In claim 6,
The input data of the (n + 1) th data block is
An encryption apparatus, wherein the encryption data is an exclusive OR operation with the n-th conversion data.
所与の第2のモードにおいて復号処理を行う場合には、
1又は複数回、前記第1及び第2の暗号処理回路にループさせて生成した第nの変換データと、前記第(n−1)のデータブロックの入力データとに基づいて生成された演算データを、復号化された信号として出力することを特徴とする暗号装置。In claim 1, 6 or 7,
When performing decryption in a given second mode:
Arithmetic data generated based on the nth conversion data generated by looping the first and second cryptographic processing circuits one or more times and the input data of the (n-1) th data block Is output as a decrypted signal.
前記演算データは、
第nの変換データに基づいて生成されたデータと、前記第(n−1)のデータブロックの入力データとの排他的論理和演算結果であることを特徴とする暗号装置。In claim 8,
The calculation data is
An encryption apparatus, which is an exclusive OR operation result of data generated based on the nth conversion data and input data of the (n-1) th data block.
前記第1の暗号処理回路は、
DESの各段の暗号処理を8回繰り返して行い、
前記第2の暗号処理回路は、
DESの各段の暗号処理を8回繰り返して行うことを特徴とする暗号装置。In any one of Claims 1 thru | or 9,
The first cryptographic processing circuit includes:
DES encryption process is repeated 8 times,
The second cryptographic processing circuit includes:
An encryption apparatus, wherein the encryption process of each stage of DES is repeated eight times.
前記第1の暗号処理回路で行われるDESの各段に対応した鍵を出力する第1の鍵出力回路と、
前記第2の暗号処理回路で行われるDESの各段に対応した鍵を出力する第2の鍵出力回路と、
を含み、
暗号処理においては、
前記第1の鍵出力回路は、8個の鍵を1つずつ、前記第1の暗号処理回路で行われるDESの各段の処理のために出力し、
前記第2の鍵出力回路は、8個の鍵を1つずつ、前記第2の暗号処理回路で行われるDESの各段の処理のために出力し、
復号処理においては、
前記第1の鍵出力回路は、暗号処理の場合と逆順に8個の鍵を1つずつ、前記第2の暗号処理回路で行われるDESの各段の処理のために出力し、
前記第2の鍵出力回路は、暗号処理の場合と逆順に8個の鍵を1つずつ、前記第1の暗号処理回路で行われるDESの各段の処理のために出力することを特徴とする暗号装置。In claim 10,
A first key output circuit for outputting a key corresponding to each stage of DES performed in the first cryptographic processing circuit;
A second key output circuit for outputting a key corresponding to each stage of DES performed in the second cryptographic processing circuit;
Including
In cryptographic processing,
The first key output circuit outputs eight keys one by one for processing of each stage of DES performed by the first encryption processing circuit,
The second key output circuit outputs eight keys one by one for processing of each stage of DES performed by the second encryption processing circuit,
In the decryption process,
The first key output circuit outputs eight keys one by one in reverse order to the case of encryption processing, for processing of each stage of DES performed by the second encryption processing circuit,
The second key output circuit outputs eight keys one by one in reverse order to the case of encryption processing for processing of each stage of DES performed by the first encryption processing circuit. Cryptographic device.
DESの鍵を複数セット保持し、所与の鍵選択信号に基づいていずれか1つのセットを選択する鍵選択回路を含み、
前記第1及び第2の鍵出力回路は、
前記所与の鍵選択信号に基づいて選択されたセットのDESの鍵を出力することを特徴とする暗号装置。In claim 11,
A key selection circuit for holding a plurality of sets of DES keys and selecting any one set based on a given key selection signal;
The first and second key output circuits are:
An encryption apparatus that outputs a set of DES keys selected based on the given key selection signal.
前記所与の演算処理を1又は複数回行う第1〜第L(Lは2以上の整数)の暗号処理回路を含み、
第1のタイミングにおいて、
前記第k(1≦k≦L−1、kは整数)の暗号処理回路は、第n(nは2以上の整数)のデータブロックについて処理すると共に、前記第(k+1)の暗号処理回路は、第(n−1)のデータブロックについて処理し、
前記第1のタイミングの次の第2のタイミングでは、
前記第kの暗号処理回路は、第(n+1)のデータブロックについて処理すると共に、前記第(k+1)の暗号処理回路は、前記第1のタイミングにおける前記第kの暗号処理回路の処理結果を用いて処理し、
第nのデータブロックの入力データが供給された後、所与の回数だけ前記第Lの暗号処理回路からの出力に対応したデータが前記第1の暗号処理回路に戻されてから、該第1の暗号処理回路が、第(n+1)のデータブロックの入力データに対して演算処理を行うことを特徴とする暗号装置。An encryption device that performs cryptographic processing including processing for performing a given arithmetic processing multiple times by changing a key generated by a common key encryption method each time for input data divided into a plurality of data blocks,
Including first to L-th (L is an integer of 2 or more) cryptographic processing circuits that perform the given arithmetic processing one or more times,
In the first timing,
The k-th (1 ≦ k ≦ L−1, k is an integer) cipher processing circuit processes the n-th (n is an integer of 2 or more) data block, and the (k + 1) -th cipher processing circuit is , Process the (n-1) th data block,
In the second timing after the first timing,
The kth cryptographic processing circuit processes the (n + 1) th data block, and the (k + 1) th cryptographic processing circuit uses the processing result of the kth cryptographic processing circuit at the first timing. Process
After the input data of the nth data block is supplied, the data corresponding to the output from the Lth cryptographic processing circuit is returned to the first cryptographic processing circuit a given number of times, and then the first The cryptographic processing circuit performs arithmetic processing on input data of the (n + 1) th data block.
外部に接続された所与の記憶装置にアクセスするためのインタフェース回路と、
前記メモリと前記インタフェース回路との間で転送されるアイソクロナスデータに対し、暗号処理又は復号処理を行う請求項1乃至13のいずれか記載の暗号装置と、
を含むことを特徴とするデータ転送制御装置。A memory for storing isochronous data;
An interface circuit for accessing a given externally connected storage device;
The encryption device according to any one of claims 1 to 13, wherein encryption processing or decryption processing is performed on isochronous data transferred between the memory and the interface circuit;
A data transfer control device comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002091964A JP3841008B2 (en) | 2002-03-28 | 2002-03-28 | Cryptographic device and data transfer control device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002091964A JP3841008B2 (en) | 2002-03-28 | 2002-03-28 | Cryptographic device and data transfer control device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003288010A JP2003288010A (en) | 2003-10-10 |
| JP3841008B2 true JP3841008B2 (en) | 2006-11-01 |
Family
ID=29236923
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002091964A Expired - Fee Related JP3841008B2 (en) | 2002-03-28 | 2002-03-28 | Cryptographic device and data transfer control device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3841008B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5037876B2 (en) * | 2006-08-18 | 2012-10-03 | 三菱電機株式会社 | Encryption processing apparatus and decryption processing apparatus |
| US11838402B2 (en) | 2019-03-13 | 2023-12-05 | The Research Foundation For The State University Of New York | Ultra low power core for lightweight encryption |
-
2002
- 2002-03-28 JP JP2002091964A patent/JP3841008B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003288010A (en) | 2003-10-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5835599A (en) | Muti-cycle non-parallel data encryption engine | |
| US7043017B2 (en) | Key stream cipher device | |
| US5671284A (en) | Data encryptor having a scalable clock | |
| US7885404B2 (en) | Cryptographic systems and methods supporting multiple modes | |
| US7106860B1 (en) | System and method for executing Advanced Encryption Standard (AES) algorithm | |
| JPWO2001067425A1 (en) | Block cipher using auxiliary transformation | |
| KR20050004187A (en) | Data conversion device and data conversion method | |
| US7123720B2 (en) | Key scheduler for encryption apparatus using data encryption standard algorithm | |
| JPH11136229A (en) | Method and system for generating encryption key | |
| CN101626289A (en) | Design method of AES encryption chip and computer encryptor | |
| US6914984B2 (en) | Encryption apparatus using data encryption standard algorithm | |
| Guan et al. | Implementation of SM4 on FPGA: Trade-off analysis between area and speed | |
| CN114422111B (en) | A Lightweight Hardware Implementation Circuit of SM4 Algorithm | |
| US20120260103A1 (en) | Security circuit using at least two finite state machine units and methods using the same | |
| US7366300B2 (en) | Methods and apparatus for implementing a cryptography engine | |
| US7403615B2 (en) | Methods and apparatus for accelerating ARC4 processing | |
| US6931127B2 (en) | Encryption device using data encryption standard algorithm | |
| CN112350819B (en) | Full-pipeline SMS4 encryption and decryption method and system | |
| KR20050087271A (en) | Key schedule apparatus for generating an encryption round key and a decryption round key selectively corresponding to initial round key having variable key length | |
| Blaze et al. | The MacGuffin block cipher algorithm | |
| JP3841008B2 (en) | Cryptographic device and data transfer control device | |
| CN1795637B (en) | Method and apparatus for a low memory hardware implementation of the key expansion function | |
| JP2003288009A (en) | Encryption device and data transfer control device | |
| JP2003288012A (en) | Encryption device and data transfer control device | |
| TWI895618B (en) | Cipher device and cipher method thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041111 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060320 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060418 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060615 |
|
| RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20060615 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20060718 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060731 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090818 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100818 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110818 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120818 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130818 Year of fee payment: 7 |
|
| LAPS | Cancellation because of no payment of annual fees |