JP2007184000A - Method and apparatus for encryption, method and apparatus for decryption, and computer-readable recording medium storing program - Google Patents

Method and apparatus for encryption, method and apparatus for decryption, and computer-readable recording medium storing program Download PDF

Info

Publication number
JP2007184000A
JP2007184000A JP2007086720A JP2007086720A JP2007184000A JP 2007184000 A JP2007184000 A JP 2007184000A JP 2007086720 A JP2007086720 A JP 2007086720A JP 2007086720 A JP2007086720 A JP 2007086720A JP 2007184000 A JP2007184000 A JP 2007184000A
Authority
JP
Japan
Prior art keywords
encryption
block data
ciphertext
authenticator
data
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.)
Pending
Application number
JP2007086720A
Other languages
Japanese (ja)
Inventor
Toru Tanmachi
亨 反町
Toshio Tokita
俊雄 時田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2007086720A priority Critical patent/JP2007184000A/en
Publication of JP2007184000A publication Critical patent/JP2007184000A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Advance Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To arrange a memory 55 provided in parallel with a feedback line 65 which feeds back data from an encrypting module 51 using an encryption key K to a selector 54 in order to encrypt another piece of data during encryption. <P>SOLUTION: When an interrupt IT for processing plaintext block data N<SB>i</SB>of another piece of data is generated while plaintext block data M<SB>i</SB>is processed, ciphertext block data C<SB>i</SB>at timing of generation of the interrupt IT is made to be stored in a register 56. The ciphertext block data C<SB>i</SB>stored in the memory 55 is made to be selected by the selector 54 at timing of completion of processing the plaintext block data N<SB>i</SB>, and thereby processing the plaintext block data M<SB>i+1</SB>is started. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

この発明は、暗号化復号装置及び暗号化復号方法に関するものである。特に、データの暗号化復号の最中に他のデータの暗号化復号ができる発明に関するものである。   The present invention relates to an encryption / decryption device and an encryption / decryption method. In particular, the present invention relates to an invention capable of encrypting and decrypting other data during data encryption and decryption.

図43は、Cipher Block Chaining Mode(以下、CBCモードという)による暗号化装置を示す図である。   FIG. 43 is a diagram illustrating an encryption apparatus using Cipher Block Chaining Mode (hereinafter referred to as CBC mode).

図43に示すCBCモードでの暗号方法は、64ビットの平文ブロックデータMi をブロック単位で入力して、暗号鍵Kを用いた暗号化モジュール51により暗号化し、更に、この暗号化された暗号文ブロックデータCiと次の平文ブロックデータMi+1 との排他的論理和を演算し、排他的論理和の演算結果を次の暗号化の入力として、暗号鍵Kを用いた暗号化モジュール51に供給することにより暗号化する方法である。そして、この処理を繰り返して次々と連鎖させることにより、平文M全体を暗号文Cに暗号化するものである。 Encryption method in the CBC mode shown in FIG. 43, by entering the 64-bit plaintext block data M i in block units, and encrypted by the encryption module 51 using the encryption key K, further, the encrypted encryption An encryption module that uses the encryption key K to calculate the exclusive OR of the sentence block data C i and the next plaintext block data M i + 1 and uses the operation result of the exclusive OR as the input of the next encryption This is a method of encrypting by supplying to 51. Then, the entire plaintext M is encrypted into the ciphertext C by repeating this process and chaining them one after another.

図44は、CBCモードを用いた復号装置を示す図である。   FIG. 44 is a diagram illustrating a decoding device using the CBC mode.

図44に示す復号装置は、図43に示す暗号化装置により暗号化された暗号文を復号する装置である。暗号文ブロックデータC1 が暗号鍵Kを用いた復号モジュール71に入力され、イニシャルバリューIVとの排他的論理和が計算され、平文ブロックデータM1が復号される。暗号文ブロックデータC2 が入力された場合には、暗号鍵Kを用いた復号モジュール71で復号され、先に入力され、レジスタ111に保存された暗号文ブロックデータC1との排他的論理和がとられ、平文ブロックデータM2 を復号する。 The decryption device shown in FIG. 44 is a device that decrypts the ciphertext encrypted by the encryption device shown in FIG. The ciphertext block data C 1 is input to the decryption module 71 using the encryption key K, an exclusive OR with the initial value IV is calculated, and the plaintext block data M 1 is decrypted. When the ciphertext block data C 2 is input, it is decrypted by the decryption module 71 using the encryption key K, and is exclusive ORed with the ciphertext block data C 1 that is input first and stored in the register 111. The plaintext block data M 2 is decrypted.

なお、レジスタ111は、セレクタ73の内部に設けられていてもよい。   Note that the register 111 may be provided inside the selector 73.

平文ブロックデータをMi(i=1,2,・・・,n)、暗号文ブロックデータCi (i=1,2,・・・,n)とし、暗号鍵Kを用いた暗号化処理をEK、暗号鍵Kを用いた復号処理をDK とすると、CBCモードは次式で表される。 Encryption processing using plaintext block data as M i (i = 1, 2,..., N) and cipher text block data C i (i = 1, 2,..., N) and using an encryption key K Is E K , and decryption processing using the encryption key K is D K , the CBC mode is expressed by the following equation.

1 =EK (M1 EXR IV)
i =EK (Mi EXR Ci-1 )(i=2,3,・・・,n)
1 =DK (C1 )EXR IV
i =DK (Ci )EXR Ci-1 (i=2,3,・・・,n)
ここで、EXRは排他的論理和演算である。また、IV(Intial Value)は初期値であり、最初の暗号化と復号の際に用いられる。イニシャルバリューIVは、暗号化側と復号側で同一の値を用いる。
C 1 = E K (M 1 EXR IV)
C i = E K (M i EXR C i-1 ) (i = 2, 3,..., N)
M 1 = D K (C 1 ) EXR IV
M i = D K (C i ) EXR C i-1 (i = 2, 3,..., N)
Here, EXR is an exclusive OR operation. Further, IV (Initial Value) is an initial value and is used at the time of initial encryption and decryption. The same initial value IV is used on the encryption side and the decryption side.

図45は、Output Feedback Mode(以下、OFBモードという)の暗号化装置を示す図である。   FIG. 45 shows an output feedback mode (hereinafter referred to as OFB mode) encryption apparatus.

図46は、OFBモードの復号装置を示す図である。   FIG. 46 is a diagram illustrating an OFB mode decoding apparatus.

図47は、Cipher Feedback Mode(以下、CFBモードという)の暗号化装置を示す図である。   FIG. 47 is a diagram showing a cipher feedback mode (hereinafter referred to as CFB mode) encryption apparatus.

図48は、CFBモードの復号装置を示す図である。   FIG. 48 illustrates a CFB mode decoding apparatus.

なお、レジスタ111は、セレクタ73の内部に設けられていてもよい。   Note that the register 111 may be provided inside the selector 73.

図49は、CBCモードの暗号化装置を用いて平文Mと平文Nを暗号化する手順を示す図である。   FIG. 49 is a diagram showing a procedure for encrypting plaintext M and plaintext N using a CBC mode encryption apparatus.

ここでは、平文Mが平文ブロックデータM1 ,平文ブロックデータM2 ,平文ブロックデータM3から構成されており、平文Nが平文ブロックデータN1 のみで構成されている場合を説明する。 Here, the plaintext M is the plaintext block data M 1, plaintext block data M 2, is composed of a plaintext block data M 3, illustrating a case where the plaintext N is composed only of the plaintext block data N 1.

平文ブロックデータM1 の暗号化がスタートすると、暗号文ブロックデータC1 が出力されるとともに、暗号文ブロックデータC1は、平文ブロックデータM2 の暗号化に用いられる。このように、暗号文ブロックデータCi は、平文ブロックデータMi+1の暗号化にフィードバックされて連鎖処理が行われる。従って、平文ブロックデータM1 から平文ブロックデータM3 までの暗号化が終わらなければ、平文ブロックデータN1の暗号化を行うことができない。 When the encryption of the plaintext block data M 1 starts, the ciphertext block data C 1 is output, and the ciphertext block data C 1 is used for encryption of the plaintext block data M 2 . As described above, the ciphertext block data C i is fed back to the encryption of the plaintext block data M i + 1 and subjected to chain processing. Accordingly, the plaintext block data N 1 cannot be encrypted unless the encryption from the plaintext block data M 1 to the plaintext block data M 3 is completed.

図50は、図49と同様に、CBCモードで暗号化を行う場合を示している。   FIG. 50 shows a case where encryption is performed in the CBC mode, as in FIG.

図50の場合は、平文ブロックデータM1 、平文ブロックデータM2 、平文ブロックデータM3の各データが準備されるのに時間がかかってしまう場合を示している。一方、暗号化処理は、次の平文ブロックデータMi+1 が準備できる前に終了しており、アイドル時間(例えば、T1〜T2、T3〜T4の時間)が発生してしまう場合を示している。このように、アイドル時間が発生する場合でも、暗号文ブロックデータCiが次の平文ブロックデータMi+1 にフィードバックされる連鎖処理を行わなければならないため、平文ブロックデータN1の処理は平文ブロックデータM3 の処理が終了してからでなければ行えない。 The case of FIG. 50 shows a case where it takes time to prepare the plaintext block data M 1 , the plaintext block data M 2 , and the plaintext block data M 3 . On the other hand, the encryption process is completed before the next plaintext block data M i + 1 can be prepared, and an idle time (for example, a time period from T1 to T2, T3 to T4) is generated. Yes. Thus, even if the idle time occurs, the ciphertext block data C i must perform a chain process that is fed back to the next plaintext block data M i + 1, the process of the plaintext block data N 1 is plaintext Only after the processing of the block data M 3 is completed can it be performed.

図51は、データの秘匿処理とデータの完全性を保証する処理を示す図である。平文Mは、例えば、OFBモードの暗号装置により暗号文Cに暗号化される。CBCモードの暗号装置により認証子Pが演算され、暗号文Cの最後に認証子Pが付加される。暗号化され、かつ、認証子Pが付加されたデータを受信した場合には、暗号文Cから平文MをOFBモードの復号装置により復号するとともに、暗号文CからCBCモードの復号装置により認証子Pを演算し、伝送されてきた認証子Pと同一か否かを比較することにより、伝送されてきたCが改竄されていないことを確認することができる。   FIG. 51 is a diagram showing data concealment processing and processing for guaranteeing data integrity. The plaintext M is encrypted into the ciphertext C by, for example, an OFB mode encryption device. The authenticator P is calculated by the CBC mode encryption device, and the authenticator P is added to the end of the ciphertext C. When the encrypted data to which the authenticator P is added is received, the plaintext M is decrypted from the ciphertext C by the decryptor in OFB mode, and the authenticator is decrypted from the ciphertext C by the decryptor in CBC mode. By calculating P and comparing it with the transmitted authenticator P, it can be confirmed that the transmitted C has not been tampered with.

図52は、図51に示した秘匿処理と認証子演算処理の手順を示す図である。   FIG. 52 is a diagram showing the procedure of the concealment process and the authenticator calculation process shown in FIG.

平文ブロックデータM1 〜平文ブロックデータM3 は、順に暗号文ブロックデータC1 〜暗号文ブロックデータC3に暗号化される。その後、暗号文ブロックデータC1 〜暗号文ブロックデータC3 を順に入力して認証子Pが演算される。
特開平9−298736号公報
The plaintext block data M 1 to plaintext block data M 3 are sequentially encrypted into ciphertext block data C 1 to ciphertext block data C 3 . Thereafter, the ciphertext block data C 1 to the ciphertext block data C 3 are sequentially input to calculate the authenticator P.
Japanese Patent Laid-Open No. 9-298736

図42〜図48に示した各モードの暗号化装置及び復号装置は、前のブロックデータの暗号化復号されたデータをフィードバックさせて次のブロックデータの暗号化復号処理に利用しなければならないため、一旦暗号化処理又は復号処理がスタートしてしまうと、その全体の処理が終了しない限り、他の暗号化処理又は復号処理をスタートさせることができないという課題があった。従って、先にスタートした暗号化復号処理が長時間要するものである場合には、後からスタートする暗号化復号処理が長時間待たされてしまうという課題があった。   The encryption device and decryption device in each mode shown in FIGS. 42 to 48 must feed back the encrypted / decrypted data of the previous block data and use it for the encryption / decryption processing of the next block data. Once the encryption process or decryption process is started, another encryption process or decryption process cannot be started unless the entire process is completed. Therefore, when the encryption / decryption process started first takes a long time, there is a problem that the encryption / decryption process started later is waited for a long time.

また、暗号化復号されるデータが準備される時間に比べて、暗号化復号処理に要する時間が短い場合には、暗号化復号化装置にアイドル時間が発生してしまうという課題があった。   In addition, when the time required for the encryption / decryption process is shorter than the time for preparing the data to be encrypted / decrypted, there is a problem that the idle time occurs in the encryption / decryption apparatus.

また、秘匿処理と完全性保証処理を行う場合には、秘匿処理を行ってから完全性保証処理を行わなければならず、処理時間がかかってしまうという課題があった。   In addition, when performing the concealment process and the integrity guarantee process, the integrity guarantee process must be performed after the concealment process is performed, and there is a problem that it takes a long processing time.

この発明の好適な実施の形態においては、あるデータの暗号化復号処理の最中に他のデータの暗号化復号処理を行える暗号化装置、復号装置及び暗号化方法及び復号方法を得ることを目的とする。   In a preferred embodiment of the present invention, an object is to obtain an encryption device, a decryption device, an encryption method, and a decryption method capable of performing encryption / decryption processing of other data during encryption / decryption processing of certain data. And

また、この発明の好適な実施の形態においては、優先度の高いデータの暗号化復号を優先的に行えるようにすることを目的とする。   It is another object of the present invention to preferentially perform encryption / decryption of high priority data.

また、この発明の好適な実施の形態においては、秘匿処理と完全性保証処理を並列的に高速に行えるようにすることを目的とする。   It is another object of the present invention to enable the concealment process and the integrity guarantee process to be performed in parallel at high speed.

この発明に係る暗号化装置は、第1の処理データと、第2の処理データとの暗号化処理をする暗号化装置において、
暗号化処理の状態を記憶するメモリを備え、
第1の処理データの暗号化処理が完了する前に第2の処理データの暗号化処理を開始するとともに、第2の処理データの暗号化処理を開始する場合に第1の処理データの暗号化処理の状態を上記メモリに記憶させ、第1の処理データの暗号化処理を再開する場合に、暗号化装置の暗号化処理の状態を、メモリに記憶した第1の処理データの暗号化処理の状態に復帰させてから第1の処理データの暗号化処理を再開することを特徴とする。
An encryption device according to the present invention is an encryption device that performs encryption processing between first processing data and second processing data.
A memory for storing the state of the encryption process;
The encryption processing of the second processing data is started before the encryption processing of the first processing data is completed, and the encryption of the first processing data is started when the encryption processing of the second processing data is started. When the processing state is stored in the memory and the encryption processing of the first processing data is resumed, the encryption processing state of the encryption device is changed to the encryption processing of the first processing data stored in the memory. The encryption processing of the first processing data is resumed after returning to the state.

上記暗号化装置は、第2の処理データの暗号処理の完了する前に第1の処理データの暗号化処理を再開するとともに、上記メモリは、第1の処理データの暗号化処理を再開する場合に第2の処理データの暗号化処理状態を記憶し、第2の処理データの暗号化処理を再開する場合は、暗号化装置の暗号化処理の状態を、メモリに記憶した第2の処理データの暗号化処理の状態に復帰させてから第2の処理データの暗号化処理を再開することを特徴とする。   When the encryption apparatus resumes the encryption process of the first process data before the encryption process of the second process data is completed, and the memory resumes the encryption process of the first process data When the encryption processing state of the second processing data is stored in the memory and the encryption processing of the second processing data is resumed, the encryption processing state of the encryption device is stored in the second processing data stored in the memory. The encryption processing of the second processing data is resumed after returning to the state of the encryption processing.

上記第1の処理データは、第1の平文であり、上記第2の処理データは、第2の平文であることを特徴とする。   The first processing data is a first plaintext, and the second processing data is a second plaintext.

上記暗号化装置は、割り込みにより第2の処理データの暗号化処理を開始することを特徴とする。   The encryption apparatus starts encryption processing of the second processing data by interruption.

この発明に係る暗号化装置は、平文Mを構成する平文ブロックデータMi (i=1,2,3,・・・)と平文Nを構成する平文ブロックデータNj(j=1,2,3,・・・)とを暗号化する暗号化装置において、
平文Mの暗号化処理中に平文Nの暗号化要求を平文Mの暗号化処理完了前に受け付けるメカニズムと、
平文ブロックデータMi の暗号化処理を行い暗号文ブロックデータCi を出力する暗号化ユニットと、
暗号化ユニットから出力された暗号文ブロックデータCi をフィードバックラインを介し暗号化ユニットにフィードバックするフィードバックループと、
フィードバックループのフィードバックラインと並列に設けられ、上記平文Nの暗号化要求を受け付け、平文Nのいずれかの平文ブロックデータの暗号化処理を開始することにより、上記平文ブロックデータMi+1が平文ブロックデータMi の次に続けて暗号化されない場合、フィードバックされる暗号文ブロックデータCi を記憶するメモリと、
平文ブロックデータMi+1 が平文ブロックデータMi の次に続けて暗号化される場合は、上記フィードバックループのフィードバックラインによりフィードバックされる暗号文ブロックデータCiを選択してフィードバックループに供給し、上記平文ブロックデータMi+1 が平文ブロックデータMi の次に続けて暗号化されず、平文Nのいずれかの平文ブロックデータの次に暗号化される場合は、上記メモリに記憶された暗号文ブロックデータCiを選択してフィードバックループに供給するセレクタと
を備えたことを特徴とする。
The encryption apparatus according to the present invention includes plaintext block data M i (i = 1, 2, 3,...) Constituting the plaintext M and plaintext block data N j (j = 1, 2, 3, ...) in an encryption device for encrypting
A mechanism for accepting a plaintext N encryption request before the plaintext M encryption process is completed during the plaintext M encryption process;
An encryption unit for encrypting plaintext block data M i and outputting ciphertext block data C i ;
A feedback loop for feeding back ciphertext block data C i output from the encryption unit to the encryption unit via a feedback line;
Provided in parallel with the feedback line of the feedback loop, accepting the plaintext N encryption request and starting the encryption processing of any plaintext block data of plaintext N, the plaintext block data M i + 1 becomes plaintext A memory for storing the ciphertext block data C i to be fed back if it is not encrypted following the block data M i ;
When the plaintext block data M i + 1 is encrypted following the plaintext block data M i , the ciphertext block data C i fed back by the feedback line of the feedback loop is selected and supplied to the feedback loop. When the plaintext block data M i + 1 is not encrypted after the plaintext block data M i and is encrypted after any plaintext block data of the plaintext N, it is stored in the memory. And a selector that selects ciphertext block data C i and supplies it to the feedback loop.

上記メモリは、
複数の平文に対応した複数のレジスタと、
暗号化処理をする平文に対応してレジスタを切り替えるスイッチと
を備えたことを特徴とする。
The above memory is
Multiple registers for multiple plaintexts,
And a switch for switching a register corresponding to plain text to be encrypted.

この発明に係る暗号化方法は、暗号化モジュールから出力される暗号文ブロックデータCi (i=1,2,3,・・・)を用いて第1の平文Mの平文ブロックデータMi(i=1,2,3,・・・)を暗号化する工程と、
上記平文ブロックデータMi を暗号化している途中で又は平文ブロックデータMi を暗号化した後に、第1の平文Mの平文ブロックデータMi+1の暗号化に用いられる暗号文ブロックデータCi をメモリに記憶する工程と、
上記平文ブロックデータMi+1 の暗号化に用いられる暗号文ブロックデータCi をメモリに記憶した後に、第2の平文Nの少なくとも1つの平文ブロックデータを暗号化する工程と、
上記第2の平文Nの少なくとも1つの平文ブロックデータを暗号化した後に、メモリに記憶された、平文ブロックデータMi+1 の暗号化に用いられる暗号文ブロックデータCiを入力し、暗号化モジュールを用いて第1の平文Mの平文ブロックデータMi+1 を暗号化する工程と
を備えたことを特徴とする。
The encryption method according to the present invention uses the ciphertext block data C i (i = 1, 2, 3,...) Output from the encryption module to use the plaintext block data M i (1) of the first plaintext M. i = 1, 2, 3, ...),
After encrypting the middle or plaintext block data M i is encrypted the plaintext block data M i, the ciphertext block data C i to be used for encrypting the plaintext block data M i + 1 of the first plaintext M Storing in a memory;
Encrypting at least one plaintext block data of the second plaintext N after storing the ciphertext block data C i used for encrypting the plaintext block data M i + 1 in a memory;
After encrypting at least one plaintext block data of the second plaintext N, the ciphertext block data C i used for encrypting the plaintext block data M i + 1 stored in the memory is input and encrypted. And a step of encrypting plaintext block data M i + 1 of the first plaintext M using a module.

この発明に係る暗号化装置は、1つ以上の平文ブロックデータからなる平文を暗号化ユニット暗号文にし、暗号文に対して暗号文の完全性を保証するための認証子を生成する暗号化装置において、
平文ブロックデータを暗号化ユニットにより暗号化したときに暗号化ユニットが出力した暗号文ブロックデータCi を暗号化ユニットへフィードバックする第1のフィードバックループを有し、平文ブロックデータを入力し、第1のフィードバックループにより暗号文ブロックデータCiをフィードバックさせ暗号化処理を行い、暗号文ブロックデータを出力する暗号化部と、
認証子演算途中結果をフィードバックする第2のフィードバックループを有し、暗号化部から暗号文ブロックデータが出力されるたびに暗号文ブロックデータを入力し、データ処理を行い、第2のフィードバックループにより認証子演算途中結果をフィードバックさせ、暗号文の完全性を保証するための認証子を生成する認証子生成部と
を備えたことを特徴とする。
The encryption device according to the present invention converts an plaintext composed of one or more plaintext block data into an encrypted unit ciphertext, and generates an authenticator for guaranteeing the integrity of the ciphertext with respect to the ciphertext. In
A first feedback loop that feeds back the ciphertext block data C i output from the encryption unit to the encryption unit when the plaintext block data is encrypted by the encryption unit; An encryption unit that feeds back the ciphertext block data C i by performing a feedback loop and performs encryption processing;
It has a second feedback loop that feeds back the result of the authenticator calculation, inputs ciphertext block data every time ciphertext block data is output from the encryption unit, performs data processing, and uses the second feedback loop An authenticator generation unit that feeds back an intermediate result of the authenticator operation and generates an authenticator for guaranteeing the integrity of the ciphertext is provided.

上記暗号化部と認証子生成部とは、1つの暗号化モジュールと、1つのフィードバックループとを兼用して暗号化処理と認証子生成処理とを交互に行うとともに、
上記1つのフィードバックループは、
暗号化処理と認証子生成処理との結果をそれぞれ記録し出力するメモリと、
暗号化処理と認証生成処理とを交互に実行するために、メモリから暗号化処理と認証子生成処理との結果を交互に選択して暗号化モジュールに出力するセレクタと
を備えたことを特徴とする。
The encryption unit and the authenticator generation unit alternately perform an encryption process and an authenticator generation process using one encryption module and one feedback loop.
The one feedback loop is
A memory for recording and outputting the results of the encryption process and the authenticator generation process, and
A selector that alternately selects the result of the encryption process and the authenticator generation process from the memory and outputs the result to the encryption module in order to alternately execute the encryption process and the authentication generation process; To do.

この発明に係る暗号化方法は、1つ以上の平文ブロックデータからなる平文を暗号化ユニットにより暗号文にし、暗号文に対して暗号文の完全性を保証するための認証子を生成する暗号化方法において、
平文ブロックデータを暗号化ユニットにより暗号化したときに暗号化ユニットが出力した暗号文ブロックデータCi を暗号化ユニットへフィードバックする第1のフィードバック工程を有し、平文ブロックデータを入力し、第1のフィードバックループにより暗号文ブロックデータCiをフィードバックさせ暗号化処理を行い、暗号文ブロックデータを出力する暗号化工程と、
認証子演算途中結果をフィードバックする第2のフィードバック工程を有し、暗号化工程から暗号文ブロックデータが出力されるたびに暗号文ブロックデータを入力し、データ処理を行い、第2のフィードバック工程により認証子演算途中結果をフィードバックさせ、暗号文の完全性を保証するための認証子を生成する認証子生成工程と
を備えたことを特徴とする。
The encryption method according to the present invention is an encryption that converts plaintext consisting of one or more plaintext block data into ciphertext by an encryption unit and generates an authenticator for guaranteeing the integrity of the ciphertext with respect to the ciphertext. In the method
A first feedback step of feeding back the ciphertext block data C i output from the encryption unit to the encryption unit when the plaintext block data is encrypted by the encryption unit; an encryption step of perform an encryption process is fed back the ciphertext block data C i, and outputs the ciphertext block data by the feedback loop,
A second feedback step for feeding back an intermediate result of the authenticator operation, ciphertext block data is input every time ciphertext block data is output from the encryption step, data processing is performed, and the second feedback step An authenticator generation step of feeding back an intermediate result of the authenticator operation and generating an authenticator for ensuring the integrity of the ciphertext is provided.

この発明に係る復号装置は、第1の処理データと、第2の処理データとの復号処理をする復号装置において、
復号処理の状態を記憶するメモリを備え、
第1の処理データの復号処理が完了する前に第2の処理データの復号処理を開始するとともに、第2の処理データの復号処理を開始する場合に第1の処理データの復号処理の状態を上記メモリに記憶させ、第1の処理データの復号処理を再開する場合に、復号装置の復号処理の状態を、メモリに記憶した第1の処理データの復号処理の状態に復帰させてから第1の処理データの復号処理を再開することを特徴とする。
The decoding device according to the present invention is a decoding device that performs a decoding process between the first processing data and the second processing data.
A memory for storing the state of the decryption process;
When the decoding process of the second process data is started before the decoding process of the first process data is completed, and the decoding process of the second process data is started, the state of the decoding process of the first process data is changed. When the decoding process of the first processing data is restarted after being stored in the memory, the decoding process of the decoding apparatus is returned to the state of the decoding process of the first processing data stored in the memory. The decryption process of the process data is resumed.

上記復号装置は、第2の処理データの復号処理の完了する前に第1の処理データの復号処理を再開するとともに、上記メモリは、第1の処理データの復号処理を再開する場合に第2の処理データの復号処理状態を記憶し、第2の処理データの復号処理を再開する場合は、復号装置の復号処理の状態を、メモリに記憶した第2の処理データの復号処理の状態に復帰させてから第2の処理データの復号処理を再開することを特徴とする。   The decoding apparatus resumes the decoding process of the first processing data before the completion of the decoding process of the second processing data, and the memory performs the second processing when the decoding process of the first processing data is resumed. When the decoding processing state of the processing data is stored and the decoding processing of the second processing data is resumed, the decoding processing state of the decoding device is returned to the decoding processing state of the second processing data stored in the memory. After that, the decoding process of the second process data is resumed.

上記第1の処理データは、第1の暗号文であり、上記第2の処理データは、第2の暗号文であることを特徴とする。   The first processing data is a first ciphertext, and the second processing data is a second ciphertext.

上記復号装置は、割り込みにより第2の処理データの最初のブロックデータの復号処理を開始することを特徴とする。   The decoding apparatus is characterized in that the decoding process of the first block data of the second processing data is started by interruption.

この発明に係る復号装置は、暗号文Cを構成する暗号文ブロックデータCi (i=1,2,3,・・・)と暗号文Dを構成する暗号文ブロックデータDj(j=1,2,3,・・・)とを復号する復号装置において、
暗号文Cの復号処理中に暗号文Dの復号要求を任意の時点で受け付けるメカニズムと、
暗号文ブロックデータCi の復号処理を行い平文ブロックデータMi を出力する復号ユニットと、
暗号文ブロックデータCi+1 を復号するための暗号文ブロックデータCi をフィードバックラインを介し復号ユニットにフィードバックするフィードバックループと、
フィードバックループのフィードバックラインと並列に設けられ、上記暗号文Dの復号要求を受け付け、暗号文Dのいずれかの暗号文ブロックデータの復号処理を開始することにより、上記暗号文ブロックデータCi+1が暗号文ブロックデータCi の次に続けて復号されない場合、フィードバックされる暗号文ブロックデータCi を記憶するメモリと、
暗号文ブロックデータCi+1 が暗号文ブロックデータCi の次に続けて復号される場合は、上記フィードバックループのフィードバックラインによりフィードバックされる暗号文ブロックデータCiを選択してフィードバックループに供給し、上記暗号文ブロックデータCi+1 が暗号文ブロックデータCi の次に続けて復号されず、暗号文Dのいずれかの暗号文ブロックデータの次に復号される場合は、上記メモリに記憶された暗号文ブロックデータCiを選択してフィードバックループに供給するセレクタと
を備えたことを特徴とする。
In the decryption device according to the present invention, the ciphertext block data C i (i = 1, 2, 3,...) Constituting the ciphertext C and the ciphertext block data D j (j = 1) constituting the ciphertext D are provided. , 2, 3,...
A mechanism for accepting a decryption request for ciphertext D at any time during the decryption process for ciphertext C;
A decryption unit that decrypts the ciphertext block data C i and outputs plaintext block data M i ;
A feedback loop for feeding back the decoder unit through a feedback line ciphertext block data C i for decrypting the ciphertext block data C i + 1,
The ciphertext block data C i + 1 is provided in parallel with the feedback line of the feedback loop, accepts a decryption request for the ciphertext D, and starts decryption processing of any ciphertext block data of the ciphertext D. If but not decoded following the next ciphertext block data C i, and a memory for storing the ciphertext block data C i fed back,
If ciphertext block data C i + 1 is decoded following the next ciphertext block data C i is fed to the feedback loop by selecting the ciphertext block data C i fed back by the feedback line of the feedback loop When the ciphertext block data C i + 1 is not decrypted following the ciphertext block data C i and is decrypted next to any ciphertext block data of the ciphertext D, the ciphertext block data C i + 1 is stored in the memory. And a selector for selecting the stored ciphertext block data C i and supplying it to the feedback loop.

上記メモリは、
複数の暗号文に対応した複数のレジスタと、
復号処理をする暗号文に対応してレジスタを切り替えるスイッチと
を備えたことを特徴とする。
The above memory is
Multiple registers corresponding to multiple ciphertexts;
And a switch for switching a register corresponding to a ciphertext to be decrypted.

この発明に係る復号方法は、復号モジュールを用いて第1の暗号文Cの暗号文ブロックデータCi (i=1,2,3,・・・)を復号する工程と、
上記暗号文ブロックデータCi を復号している途中で又は暗号文ブロックデータCi を復号した後に、第1の暗号文Cの暗号文ブロックデータCi+1の復号に用いられる暗号文ブロックデータCi をメモリに記憶する工程と、
上記暗号文ブロックデータCi+1 の復号に用いられる暗号文ブロックデータCi をメモリに記憶した後に、第2の暗号文Dの少なくとも1つの暗号文ブロックデータを復号する工程と、
上記第2の暗号文Dの少なくとも1つの暗号文ブロックデータを復号した後に、メモリに記憶された、暗号文ブロックデータCi+1 の復号に用いられる暗号文ブロックデータCiを入力し、復号モジュールを用いて第1の暗号文Cの暗号文ブロックデータCi+1 を復号する工程と
を備えたことを特徴とする。
Decoding method according to the present invention includes the steps of decrypting the ciphertext block data C i of the first ciphertext C using the decryption module (i = 1,2,3, ···),
After decrypting the middle or ciphertext block data C i is decrypted and the ciphertext block data C i, the ciphertext block data used for decoding the ciphertext block data C i + 1 of the first ciphertext C Storing C i in memory;
Decrypting at least one ciphertext block data of the second ciphertext D after storing the ciphertext block data C i used for decryption of the ciphertext block data C i + 1 in a memory;
After decoding at least one ciphertext block data of the second ciphertext D, stored in the memory, enter the ciphertext block data C i to be used in the decoding ciphertext block data C i + 1, decoded And a step of decrypting the ciphertext block data C i + 1 of the first ciphertext C using a module.

この発明に係る復号装置は、1つ以上の暗号文ブロックデータからなる暗号文を平文に復号し、かつ、暗号文に対して暗号文の完全性を確認するための認証子を生成する復号装置において、
復号モジュールによりデータを復号したときに生成したモジュール出力ブロックデータTi を復号モジュールへフィードバックする第1のフィードバックループを有し、暗号文ブロックデータを入力し、第1のフィードバックループによりモジュール出力ブロックデータTiをフィードバックさせ復号処理を行い、平文ブロックデータを出力する復号部と、
認証子演算途中結果をフィードバックする第2のフィードバックループを有し、復号部に入力される暗号文ブロックデータと同一の暗号文ブロックデータを入力し、データ処理を行い認証子演算途中結果を出力し、第2のフィードバックループにより認証子演算途中結果をフィードバックさせ、暗号文の完全性を確認するための認証子を生成する認証子生成部と
を備えたことを特徴とする。
The decryption device according to the present invention decrypts a ciphertext composed of one or more ciphertext block data into a plaintext and generates an authenticator for confirming the integrity of the ciphertext with respect to the ciphertext In
A first feedback loop that feeds back the module output block data T i generated when the data is decrypted by the decryption module to the decryption module, the ciphertext block data is input, and the module output block data is input by the first feedback loop; It is fed back to T i performs decoding processing, a decoding unit for outputting the plaintext block data,
It has a second feedback loop that feeds back the intermediate result of the authenticator operation, inputs the same ciphertext block data as the ciphertext block data input to the decryption unit, performs data processing, and outputs the intermediate result of the authenticator operation And an authenticator generation unit that feeds back an intermediate result of the authenticator operation by a second feedback loop and generates an authenticator for confirming the integrity of the ciphertext.

上記復号部と認証子生成部とは、1つの復号モジュールと、1つのフィードバックループとを兼用して復号処理と認証子生成処理とを交互に行うとともに、
上記1つのフィードバックループは、
復号処理と認証子生成処理との結果をそれぞれ記録し出力するメモリと、
復号処理と認証生成処理とを交互に実行するために、メモリから復号処理と認証子生成処理との結果を交互に選択して復号モジュールに出力するセレクタと
を備えたことを特徴とする。
The decryption unit and the authenticator generation unit alternately perform a decryption process and an authenticator generation process by using one decryption module and one feedback loop.
The one feedback loop is
A memory for recording and outputting the results of the decryption process and the authenticator generation process, and
In order to alternately execute the decryption process and the authentication generation process, a selector is provided that alternately selects the result of the decryption process and the authenticator generation process from the memory and outputs the result to the decryption module.

この発明に係る復号方法は、1つ以上の暗号文ブロックデータからなる暗号文を平文に復号し、かつ、暗号文に対して暗号文の完全性を確認するための認証子を生成する復号方法において、
復号モジュールによりデータを復号したときに生成したモジュール出力ブロックデータTi を復号モジュールへフィードバックする第1のフィードバック工程を有し、暗号文ブロックデータを入力し、第1のフィードバックループによりモジュール出力ブロックデータTiをフィードバックさせ復号処理を行い、平文ブロックデータを出力する復号工程と、
認証子演算途中結果をフィードバックする第2のフィードバック工程を有し、復号工程に入力される暗号文ブロックデータと同一の暗号文ブロックデータを入力し、データ処理を行い認証子演算途中結果を出力し、第2のフィードバック工程により認証子演算途中結果をフィードバックさせ、暗号文の完全性を確認するための認証子を生成する認証子生成工程と
を備えたことを特徴とする。
The decryption method according to the present invention is a decryption method for decrypting a ciphertext composed of one or more ciphertext block data into a plaintext and generating an authenticator for confirming the integrity of the ciphertext with respect to the ciphertext In
A first feedback step of feeding back the module output block data T i generated when the data is decrypted by the decryption module to the decryption module, the ciphertext block data is input, and the module output block data is transmitted by the first feedback loop; It is fed back to T i performs decoding processing, a decoding step of outputting the plaintext block data,
It has a second feedback step that feeds back the intermediate result of the authenticator operation, inputs the same ciphertext block data as the ciphertext block data input to the decryption step, performs data processing, and outputs the intermediate result of the authenticator operation The authenticator generation step of feeding back the result of the authenticator calculation in the second feedback step and generating the authenticator for confirming the integrity of the ciphertext is provided.

この発明に係る暗号化装置は、平文Mを構成する平文ブロックデータMi (i=1,2,3,・・・)と平文Nを構成する平文ブロックデータNj(j=1,2,3,・・・)とを暗号化する暗号化装置において、
平文Mの暗号化処理中に平文Nの暗号化要求を平文Mの暗号化処理完了前に受け付けるメカニズムと、
暗号化処理を行ったデータをモジュール出力ブロックデータTi として出力する暗号化モジュールと、
暗号化モジュールから出力されたモジュール出力ブロックデータTi をフィードバックラインを介し暗号化モジュールにフィードバックするフィードバックループと、
フィードバックループのフィードバックラインと並列に設けられ、上記平文Nの暗号化要求を受け付け、平文Nのいずれかの平文ブロックデータの暗号化処理を開始することにより、上記平文ブロックデータMi+1が平文ブロックデータMi の次に続けて暗号化されない場合、フィードバックされるモジュール出力ブロックデータTi を記憶するメモリと、
平文ブロックデータMi+1 が平文ブロックデータMi の次に続けて暗号化される場合は、上記フィードバックループのフィードバックラインによりフィードバックされるモジュール出力ブロックデータTiを選択してフィードバックループに供給し、上記平文ブロックデータMi+1 が平文ブロックデータMi の次に続けて暗号化されず、平文Nのいずれかの平文ブロックデータの次に暗号化される場合は、上記メモリに記憶されたモジュール出力ブロックデータTiを選択してフィードバックループに供給するセレクタと
を備えたことを特徴とする。
The encryption apparatus according to the present invention includes plaintext block data M i (i = 1, 2, 3,...) Constituting the plaintext M and plaintext block data N j (j = 1, 2, 3, ...) in an encryption device for encrypting
A mechanism for accepting a plaintext N encryption request before the plaintext M encryption process is completed during the plaintext M encryption process;
An encryption module for outputting data subjected to the encryption processing as the module output block data T i,
A feedback loop for feeding back module output block data T i output from the encryption module to the encryption module via a feedback line;
Provided in parallel with the feedback line of the feedback loop, accepting the plaintext N encryption request and starting the encryption processing of any plaintext block data of plaintext N, the plaintext block data M i + 1 becomes plaintext A memory for storing the module output block data T i to be fed back if it is not encrypted following the block data M i ;
When the plaintext block data M i + 1 is encrypted following the plaintext block data M i , the module output block data T i fed back by the feedback line of the feedback loop is selected and supplied to the feedback loop. When the plaintext block data M i + 1 is not encrypted after the plaintext block data M i and is encrypted after any plaintext block data of the plaintext N, it is stored in the memory. And a selector for selecting the module output block data T i and supplying it to the feedback loop.

上記メモリは、
複数の平文に対応した複数のレジスタと、
暗号化処理をする平文に対応してレジスタを切り替えるスイッチと
を備えたことを特徴とする。
The above memory is
Multiple registers for multiple plaintexts,
And a switch for switching a register corresponding to plain text to be encrypted.

この発明に係る暗号化方法は、暗号化モジュールから出力されるモジュール出力ブロックデータTi (i=1,2,3,・・・)を用いて第1の平文Mの平文ブロックデータMi(i=1,2,3,・・・)を暗号化する工程と、
上記平文ブロックデータMi を暗号化している途中で又は平文ブロックデータMi を暗号化した後に、第1の平文Mの平文ブロックデータMi+1の暗号化に用いられるモジュール出力ブロックデータTi をメモリに記憶する工程と、
上記平文ブロックデータMi+1 の暗号化に用いられるモジュール出力ブロックデータTi をメモリに記憶した後に、第2の平文Nの少なくとも1つの平文ブロックデータを暗号化する工程と、
上記第2の平文Nの少なくとも1つの平文ブロックデータを暗号化した後に、メモリに記憶された、平文ブロックデータMi+1 の暗号化に用いられるモジュール出力ブロックデータTiを入力し、暗号化モジュールを用いて第1の平文Mの平文ブロックデータMi+1 を暗号化する工程と
を備えたことを特徴とする。
The encryption method according to the present invention uses the module output block data T i (i = 1, 2, 3,...) Output from the encryption module to use the plaintext block data M i (1) of the first plaintext M. i = 1, 2, 3, ...),
After encrypting the middle or plaintext block data M i is encrypted the plaintext block data M i, the plaintext block data M i + 1 of the module used for encrypting the output block data T i of the first plaintext M Storing in a memory;
Encrypting at least one plaintext block data of the second plaintext N after storing the module output block data T i used for encryption of the plaintext block data M i + 1 in a memory;
After encrypting at least one plaintext block data of the second plaintext N, the module output block data T i used for encryption of the plaintext block data M i + 1 stored in the memory is input and encrypted. And a step of encrypting plaintext block data M i + 1 of the first plaintext M using a module.

この発明に係る暗号化装置は、1つ以上の平文ブロックデータからなる平文を暗号化モジュールにより暗号文にし、暗号文に対して暗号文の完全性を保証するための認証子を生成する暗号化装置において、
平文ブロックデータを暗号化モジュールにより暗号化したときに暗号化モジュールが出力したモジュール出力ブロックデータTi を暗号化モジュールへフィードバックする第1のフィードバックループを有し、平文ブロックデータを入力し、第1のフィードバックループによりモジュール出力ブロックデータTiをフィードバックさせ暗号化処理を行い、暗号文ブロックデータを出力する暗号化部と、
認証子演算途中結果をフィードバックする第2のフィードバックループを有し、暗号化部から暗号文ブロックデータが出力されるたびに暗号文ブロックデータを入力し、データ処理を行い、第2のフィードバックループにより認証子演算途中結果をフィードバックさせ、暗号文の完全性を保証するための認証子を生成する認証子生成部と
を備えたことを特徴とする。
The encryption apparatus according to the present invention is an encryption that generates plaintext consisting of one or more plaintext block data by using an encryption module and generates an authenticator for ensuring the integrity of the ciphertext. In the device
A first feedback loop that feeds back the module output block data T i output from the encryption module to the encryption module when the plaintext block data is encrypted by the encryption module; An encryption unit that feeds back the module output block data T i through the feedback loop and performs encryption processing, and outputs ciphertext block data;
It has a second feedback loop that feeds back the result of the authenticator calculation, inputs ciphertext block data every time ciphertext block data is output from the encryption unit, performs data processing, and uses the second feedback loop An authenticator generation unit that feeds back an intermediate result of the authenticator operation and generates an authenticator for guaranteeing the integrity of the ciphertext is provided.

上記暗号化部と認証子生成部とは、1つの暗号化モジュールと、1つのフィードバックループとを兼用して暗号化処理と認証子生成処理とを交互に行うとともに、
上記1つのフィードバックループは、
暗号化処理と認証子生成処理との結果をそれぞれ記録し出力するメモリと、
暗号化処理と認証生成処理とを交互に実行するために、メモリから暗号化処理と認証子生成処理との結果を交互に選択して暗号化モジュールに出力するセレクタと
を備えたことを特徴とする。
The encryption unit and the authenticator generation unit alternately perform an encryption process and an authenticator generation process using one encryption module and one feedback loop.
The one feedback loop is
A memory for recording and outputting the results of the encryption process and the authenticator generation process, and
A selector that alternately selects the result of the encryption process and the authenticator generation process from the memory and outputs the result to the encryption module in order to alternately execute the encryption process and the authentication generation process; To do.

この発明に係る暗号化方法は、1つ以上の平文ブロックデータからなる平文を暗号化モジュールにより暗号文にし、暗号文に対して暗号文の完全性を保証するための認証子を生成する暗号化方法において、
平文ブロックデータを暗号化モジュールにより暗号化したときに暗号化モジュールが出力したモジュール出力ブロックデータTi を暗号化モジュールへフィードバックする第1のフィードバック工程を有し、平文ブロックデータを入力し、第1のフィードバックループによりモジュール出力ブロックデータTiをフィードバックさせ暗号化処理を行い、暗号文ブロックデータを出力する暗号化工程と、
認証子演算途中結果をフィードバックする第2のフィードバック工程を有し、暗号化工程から暗号文ブロックデータが出力されるたびに暗号文ブロックデータを入力し、データ処理を行い、第2のフィードバック工程により認証子演算途中結果をフィードバックさせ、暗号文の完全性を保証するための認証子を生成する認証子生成工程と
を備えたことを特徴とする。
The encryption method according to the present invention is an encryption that generates plaintext consisting of one or more plaintext block data as ciphertext by an encryption module, and generates an authenticator for ensuring the integrity of the ciphertext for the ciphertext In the method
A first feedback step of feeding back the module output block data T i output from the encryption module to the encryption module when the plaintext block data is encrypted by the encryption module; An encryption step of feeding back the module output block data T i by the feedback loop and performing encryption processing to output ciphertext block data;
A second feedback step for feeding back an intermediate result of the authenticator operation, ciphertext block data is input every time ciphertext block data is output from the encryption step, data processing is performed, and the second feedback step An authenticator generation step of feeding back an intermediate result of the authenticator operation and generating an authenticator for ensuring the integrity of the ciphertext is provided.

この発明に係る復号装置は、暗号文Cを構成する暗号文ブロックデータCi (i=1,2,3,・・・)と暗号文Dを構成する暗号文ブロックデータDj(j=1,2,3,・・・)とを復号する復号装置において、
暗号文Cの復号処理中に暗号文Dの復号要求を任意の時点で受け付けるメカニズムと、
復号処理を行ったデータをモジュール出力ブロックデータTi として出力する復号モジュールと、
復号モジュールから出力されたモジュール出力ブロックデータTi をフィードバックラインを介し復号モジュールにフィードバックするフィードバックループと、
フィードバックループのフィードバックラインと並列に設けられ、上記暗号文Dの復号要求を受け付け、暗号文Dのいずれかの暗号文ブロックデータの復号処理を開始することにより、上記暗号文ブロックデータCi+1が暗号文ブロックデータCi の次に続けて復号されない場合、フィードバックされるモジュール出力ブロックデータTi を記憶するメモリと、
暗号文ブロックデータCi+1 が暗号文ブロックデータCi の次に続けて復号される場合は、上記フィードバックループのフィードバックラインによりフィードバックされるモジュール出力ブロックデータTiを選択してフィードバックループに供給し、上記暗号文ブロックデータCi+1 が暗号文ブロックデータCi の次に続けて復号されず、暗号文Dのいずれかの暗号文ブロックデータの次に復号される場合は、上記メモリに記憶されたモジュール出力ブロックデータTiを選択してフィードバックループに供給するセレクタと
を備えたことを特徴とする。
In the decryption device according to the present invention, the ciphertext block data C i (i = 1, 2, 3,...) Constituting the ciphertext C and the ciphertext block data D j (j = 1) constituting the ciphertext D are provided. , 2, 3,...
A mechanism for accepting a decryption request for ciphertext D at any time during the decryption process for ciphertext C;
A decryption module for outputting the decrypted data as module output block data T i ;
A feedback loop for feeding back module output block data T i output from the decoding module to the decoding module via a feedback line;
The ciphertext block data C i + 1 is provided in parallel with the feedback line of the feedback loop, accepts a decryption request for the ciphertext D, and starts decryption processing of any ciphertext block data of the ciphertext D. Is not decrypted following the ciphertext block data C i , a memory for storing the module output block data T i to be fed back;
When the ciphertext block data C i + 1 is decrypted following the ciphertext block data C i , the module output block data T i fed back by the feedback line of the feedback loop is selected and supplied to the feedback loop. When the ciphertext block data C i + 1 is not decrypted following the ciphertext block data C i and is decrypted next to any ciphertext block data of the ciphertext D, the ciphertext block data C i + 1 is stored in the memory. And a selector for selecting the stored module output block data T i and supplying it to the feedback loop.

上記メモリは、
複数の暗号文に対応した複数のレジスタと、
復号処理をする暗号文に対応してレジスタを切り替えるスイッチと
を備えたことを特徴とする。
The above memory is
Multiple registers corresponding to multiple ciphertexts;
And a switch for switching a register corresponding to a ciphertext to be decrypted.

この発明に係る復号方法は、復号モジュールから出力されるモジュール出力ブロックデータTi (i=1,2,3,・・・)を用いて第1の暗号文Cの暗号文ブロックデータCi(i=1,2,3,・・・)を復号する工程と、
上記暗号文ブロックデータCi を復号している途中で又は暗号文ブロックデータCi を復号した後に、第1の暗号文Cの暗号文ブロックデータCi+1の復号に用いられるモジュール出力ブロックデータTi をメモリに記憶する工程と、
上記暗号文ブロックデータCi+1 の復号に用いられるモジュール出力ブロックデータTi をメモリに記憶した後に、第2の暗号文Dの少なくとも1つの暗号文ブロックデータを復号する工程と、
上記第2の暗号文Dの少なくとも1つの暗号文ブロックデータを復号した後に、メモリに記憶された、暗号文ブロックデータCi+1 の復号に用いられるモジュール出力ブロックデータTiを入力し、復号モジュールを用いて第1の暗号文Cの暗号文ブロックデータCi+1 を復号する工程と
を備えたことを特徴とする。
The decryption method according to the present invention uses the module output block data T i (i = 1, 2, 3,...) Output from the decryption module to use the ciphertext block data C i ( i = 1, 2, 3,...
After decrypting the middle or ciphertext block data C i is decrypted and the ciphertext block data C i, the module output block data used for decoding the ciphertext block data C i + 1 of the first ciphertext C Storing T i in memory;
The module output block data T i to be used in decoding the ciphertext block data C i + 1 after storing in the memory, the steps of decoding at least one ciphertext block data of the second ciphertext D,
After decrypting at least one ciphertext block data of the second ciphertext D, the module output block data T i used for decryption of the ciphertext block data C i + 1 stored in the memory is inputted and decrypted. And a step of decrypting the ciphertext block data C i + 1 of the first ciphertext C using a module.

この発明に係る復号装置は、1つ以上の暗号文ブロックデータからなる暗号文を復号ユニットにより平文に復号し、かつ、暗号文に対して暗号文の完全性を確認するための認証子を生成する復号装置において、
暗号文ブロックデータCi を復号ユニットへフィードバックする第1のフィードバックループを有し、暗号文ブロックデータを入力し、第1のフィードバックループにより暗号文ブロックデータCiをフィードバックさせ復号処理を行い、平文ブロックデータを出力する復号部と、
認証子演算途中結果をフィードバックする第2のフィードバックループを有し、復号部に入力される暗号文ブロックデータと同一の暗号文ブロックデータを入力し、データ処理を行い認証子演算途中結果を出力し、第2のフィードバックループにより認証子演算途中結果をフィードバックさせ、暗号文の完全性を確認するための認証子を生成する認証子生成部と
を備えたことを特徴とする。
The decryption device according to the present invention decrypts a ciphertext composed of one or more ciphertext block data into a plaintext by a decryption unit, and generates an authenticator for confirming the integrity of the ciphertext with respect to the ciphertext In the decoding device
Having a first feedback loop for feeding back the ciphertext block data C i to the decrypting unit receives the ciphertext block data, performs decoding processing by feeding back the ciphertext block data C i by the first feedback loop, the plaintext A decoding unit for outputting block data;
It has a second feedback loop that feeds back the intermediate result of the authenticator operation, inputs the same ciphertext block data as the ciphertext block data input to the decryption unit, performs data processing, and outputs the intermediate result of the authenticator operation And an authenticator generation unit that feeds back an intermediate result of the authenticator operation by a second feedback loop and generates an authenticator for confirming the integrity of the ciphertext.

上記復号部と認証子生成部とは、1つの復号モジュールと、1つのフィードバックループとを兼用して復号処理と認証子生成処理とを交互に行うとともに、
上記1つのフィードバックループは、
復号処理と認証子生成処理との結果をそれぞれ記録し出力するメモリと、
復号処理と認証生成処理とを交互に実行するために、メモリから復号処理と認証子生成処理との結果を交互に選択して復号モジュールに出力するセレクタと
を備えたことを特徴とする。
The decryption unit and the authenticator generation unit alternately perform a decryption process and an authenticator generation process using one decryption module and one feedback loop.
The one feedback loop is
A memory for recording and outputting the results of the decryption process and the authenticator generation process, and
In order to alternately execute the decryption process and the authentication generation process, a selector is provided that alternately selects the result of the decryption process and the authenticator generation process from the memory and outputs the result to the decryption module.

この発明に係る復号方法は、1つ以上の暗号文ブロックデータからなる暗号文を復号ユニットにより平文に復号し、かつ、暗号文に対して暗号文の完全性を確認するための認証子を生成する復号方法において、
暗号文ブロックデータCi を復号ユニットへフィードバックする第1のフィードバック工程を有し、暗号文ブロックデータを入力し、第1のフィードバックループにより暗号文ブロックデータCiをフィードバックさせ復号処理を行い、平文ブロックデータを出力する復号工程と、
認証子演算途中結果をフィードバックする第2のフィードバック工程を有し、復号工程に入力される暗号文ブロックデータと同一の暗号文ブロックデータを入力し、データ処理を行い認証子演算途中結果を出力し、第2のフィードバック工程により認証子演算途中結果をフィードバックさせ、暗号文の完全性を確認するための認証子を生成する認証子生成工程と
を備えたことを特徴とする。
The decryption method according to the present invention decrypts a ciphertext composed of one or more ciphertext block data into a plaintext by a decryption unit, and generates an authenticator for confirming the integrity of the ciphertext with respect to the ciphertext In the decoding method to
A first feedback step of feeding back the ciphertext block data C i to the decryption unit, the ciphertext block data is input, the ciphertext block data C i is fed back by the first feedback loop, and decryption processing is performed; A decoding step of outputting block data;
It has a second feedback step that feeds back the intermediate result of the authenticator operation, inputs the same ciphertext block data as the ciphertext block data input to the decryption step, performs data processing, and outputs the intermediate result of the authenticator operation The authenticator generation step of feeding back the result of the authenticator calculation in the second feedback step and generating the authenticator for confirming the integrity of the ciphertext is provided.

上記暗号化処理は、ブロック暗号アルゴリズムを用いることを特徴とする。   The encryption process uses a block encryption algorithm.

上記復号処理は、ブロック暗号アルゴリズムを用いることを特徴とする。   The decryption process uses a block cipher algorithm.

上記メモリは、暗号化処理の状態として、
第1の処理データの暗号化途中結果と、
第1の処理データを暗号化するために用いる暗号鍵と
を記憶することを特徴とする。
The above memory is the state of encryption processing,
A result of encryption of the first processing data;
An encryption key used for encrypting the first processing data is stored.

上記メモリは、復号処理の状態として、
第2の処理データの復号途中結果と、
第2の処理データを復号するために用いる復号鍵と
を記憶することを特徴とする。
The above memory is the state of the decryption process.
A result of decoding the second processing data;
A decryption key used for decrypting the second processing data is stored.

この発明に係る暗号化装置は、データを入力して暗号化し、暗号データを出力する暗号化部と、
暗号化部が出力した暗号データを入力して暗号文の完全性を保証するための認証子を生成する認証子生成部と
を備え、
認証子生成部は、暗号化部によるデータの暗号化が完了する前に認証子の生成を開始することを特徴とする。
An encryption device according to the present invention includes an encryption unit that inputs and encrypts data and outputs encrypted data;
An authenticator generating unit that inputs the encrypted data output by the encryption unit and generates an authenticator for ensuring the integrity of the ciphertext;
The authenticator generation unit is characterized in that generation of an authenticator is started before data encryption by the encryption unit is completed.

この発明に係る復号装置は、データを入力して復号し、復号データを出力する復号部と、
復号部が入力したデータを入力して暗号文の完全性を保証するための認証子を生成する認証子生成部と
を備え、
認証子生成部は、復号部によるデータの復号が完了する前に認証子の生成を開始することを特徴とする。
A decoding apparatus according to the present invention includes a decoding unit that inputs and decodes data and outputs decoded data;
An authenticator generation unit that inputs the data input by the decryption unit and generates an authenticator for ensuring the integrity of the ciphertext;
The authenticator generation unit is characterized in that generation of an authenticator is started before the decryption of data by the decryption unit is completed.

この発明に係る暗号化方法は、データを入力して暗号化し、暗号データを出力する暗号化工程と、
暗号化工程が出力した暗号データを入力して暗号文の完全性を保証するための認証子を生成する認証子生成工程と
を備え、
認証子生成工程は、暗号化工程によるデータの暗号化が完了する前に認証子の生成を開始することを特徴とする。
The encryption method according to the present invention includes an encryption step of inputting and encrypting data and outputting the encrypted data;
An authenticator generation step for generating an authenticator for inputting the encrypted data output by the encryption step and ensuring the integrity of the ciphertext;
The authenticator generation step is characterized in that generation of an authenticator is started before data encryption by the encryption step is completed.

この発明に係る復号方法は、データを入力して復号し、復号データを出力する復号工程と、
復号工程が入力したデータを入力して暗号文の完全性を保証するための認証子を生成する認証子生成工程と
を備え、
認証子生成工程は、復号工程によるデータの復号が完了する前に認証子の生成を開始することを特徴とする。
The decoding method according to the present invention includes a decoding step of inputting and decoding data and outputting decoded data;
An authenticator generation step for generating an authenticator for inputting the data input by the decryption step and guaranteeing the integrity of the ciphertext;
The authenticator generation step is characterized in that generation of an authenticator is started before the decryption of data by the decryption step is completed.

また、この発明は、上記暗号化装置の各部の処理及び上記暗号化方法の各工程の処理をコンピュータに実行させるためのプログラムであることを特徴とする。また、そのプログラムを記録したコンピュータ読み取り可能な記録媒体であることを特徴とする。   Further, the present invention is a program for causing a computer to execute processing of each unit of the encryption device and processing of each step of the encryption method. Further, it is a computer-readable recording medium that records the program.

また、この発明は、上記復号装置の各部の処理及び上記復号方法の各工程をコンピュータに実行させるためのプログラムであることを特徴とする。また、そのプログラムを記録したコンピュータ読み取り可能な記録媒体であることを特徴とする。   In addition, the present invention is a program for causing a computer to execute processing of each unit of the decoding device and each step of the decoding method. Further, it is a computer-readable recording medium that records the program.

以上のように、この発明の好適な実施の形態によれば、平文Mの暗号化の途中で平文Nの暗号化を開始することができる。また、暗号文Cの復号中に他の暗号文Dの復号を開始することができる。   As described above, according to the preferred embodiment of the present invention, encryption of plaintext N can be started in the middle of encryption of plaintext M. Further, the decryption of another ciphertext D can be started during the decryption of the ciphertext C.

また、この発明の好適な実施の形態によれば、優先度を付けることにより暗号化復号されるデータを優先度に基づいて高速に処理することができる。   According to a preferred embodiment of the present invention, data to be encrypted / decrypted by assigning priorities can be processed at high speed based on the priorities.

また、この発明の好適な実施の形態によれば、秘匿処理と完全性保証処理とを並列処理することにより高速処理が行える。また、秘匿処理と完全性保証処理を統合化された1つのハードウェアで行うことができる。   In addition, according to a preferred embodiment of the present invention, high-speed processing can be performed by performing parallel processing of concealment processing and integrity assurance processing. Further, the concealment process and the integrity guarantee process can be performed by a single piece of integrated hardware.

実施の形態1.
図1は、この実施の形態におけるCBCモードの暗号化装置を示す図である。
Embodiment 1 FIG.
FIG. 1 is a diagram showing a CBC mode encryption apparatus according to this embodiment.

この実施の形態の暗号化装置は、セレクタ54と排他的論理和回路58と暗号鍵Kを用いた暗号化モジュール51とメモリ55とにより構成されている。排他的論理和回路58と暗号鍵Kを用いた暗号化モジュール51とは、暗号化ユニット52を構成している。セレクタ54と排他的論理和回路58と暗号鍵Kを用いた暗号化モジュール51は、フィードバックライン65とフィードバックライン66とフィードバックライン67によりフィードバックループを構成している。暗号鍵Kを用いた暗号化モジュール51により暗号化された暗号文ブロックデータCiは、フィードバックループにより再び排他的論理和回路58に入力され、排他的論理和回路58でモジュール入力データSi が生成される。そして、生成されたモジュール入力データSiが暗号鍵Kを用いた暗号化モジュール51に供給される。 The encryption apparatus according to this embodiment includes a selector 54, an exclusive OR circuit 58, an encryption module 51 using an encryption key K, and a memory 55. The exclusive OR circuit 58 and the encryption module 51 using the encryption key K constitute an encryption unit 52. The encryption module 51 using the selector 54, the exclusive OR circuit 58, and the encryption key K forms a feedback loop by the feedback line 65, the feedback line 66, and the feedback line 67. The ciphertext block data C i encrypted by the encryption module 51 using the encryption key K is input again to the exclusive OR circuit 58 by the feedback loop, and the module input data S i is changed by the exclusive OR circuit 58. Generated. Then, the generated module input data S i is supplied to the encryption module 51 using the encryption key K.

メモリ55は、フィードバックライン65と並列に設けられている。メモリ55は、レジスタ56とスイッチ57により構成されている。スイッチ57は、暗号鍵Kを用いた暗号化モジュール51の出力をレジスタ56に入力させるか無視するかを切り替えるものである。この切り替えは、例えば、割り込みITにより行われる。割り込みITが発生した場合には、スイッチ57はEに接続され、割り込みITが解除された場合には、スイッチ57はFに接続される。レジスタ56は、Eを経由してきた暗号文ブロックデータCiを入力して記憶するものである。レジスタ56に記憶された暗号文ブロックデータCi は、セレクタ54に出力される。セレクタ54は、A,B,Cの3つの入力を有しており、いずれか1つの入力を選択するものである。これらの選択は、後述するように割り込みITに依存する。 The memory 55 is provided in parallel with the feedback line 65. The memory 55 includes a register 56 and a switch 57. The switch 57 switches whether the output of the encryption module 51 using the encryption key K is input to the register 56 or ignored. This switching is performed by an interrupt IT, for example. When the interrupt IT is generated, the switch 57 is connected to E, and when the interrupt IT is released, the switch 57 is connected to F. The register 56 inputs and stores the ciphertext block data C i that has passed through E. The ciphertext block data C i stored in the register 56 is output to the selector 54. The selector 54 has three inputs A, B, and C, and selects one of the inputs. These selections depend on the interrupt IT as described later.

図2は、図1に示した暗号化装置の動作手順を示す図である。   FIG. 2 is a diagram showing an operation procedure of the encryption apparatus shown in FIG.

図3は、図1に示した暗号化装置の動作フローチャートである。   FIG. 3 is an operation flowchart of the encryption apparatus shown in FIG.

この暗号化装置が電源を投入された場合のセレクタ54の入力はAに設定されており、スイッチ57はEに接続されているものとする。また、平文Nの暗号化要求があるときは、割り込みITが発生し、平文Nの暗号化要求が解除されるまで、割り込みITがオンになり続けるものとする。また、平文Mは、鍵K1を用いて暗号化され、平文Nは、鍵K2 を用いて暗号化されるものとする。また、割り込みITが発生したとき又は割り込みITが解除されたときには、鍵K2又は鍵K1 が暗号化モジュール51に支給され直すものとする。 It is assumed that the input of the selector 54 when this encryption apparatus is turned on is set to A, and the switch 57 is connected to E. When there is a plaintext N encryption request, an interrupt IT is generated, and the interrupt IT is kept on until the plaintext N encryption request is canceled. Also, it is assumed that the plaintext M is encrypted using the key K 1 and the plaintext N is encrypted using the key K 2 . Also, when the interrupt IT is generated or the interrupt IT is canceled, the key K 2 or the key K 1 is re-supplied to the encryption module 51.

時刻T0において、鍵K1 が支給され、平文ブロックデータM1 の暗号化処理がスタートする。時刻T0において、平文ブロックデータM1の暗号化がスタートした場合には、セレクタ54の入力Aから一旦イニシャルバリューIVが入力された後、セレクタ54はBに切り替わる。そして、平文ブロックデータM1が鍵K1 を用いて暗号化されている途中の時刻Xにおいて、平文ブロックデータN1 の暗号化を要求する割り込みITが発生したとする。時刻T1までに、暗号文ブロックデータC1はメモリ55に記憶された状態になる。そして、割り込みITの発生により時刻T1において、鍵K2 が暗号化モジュール51に支給される。また、時刻T1において、セレクタ54は入力をAに設定する。また、時刻T1において、スイッチ57はFに接続される。時刻T1以降は、鍵K2を用いて平文ブロックデータN1 の暗号化が行われ、暗号文ブロックデータD1 が出力される。時刻Yにおいて、平文ブロックデータN1の暗号化が終了し、割り込みITが解除されたものとする。この割り込みITの解除により時刻T2において、鍵K1 が暗号化モジュール51に支給され、セレクタ54の入力はCに切り替えられ、スイッチ57はEに接続される。セレクタ54がCに切り替わったことにより、メモリ55に記憶されていた暗号文ブロックデータC1が平文ブロックデータM2 の暗号化のために入力され、鍵K1 を用いた暗号化モジュール51により平文ブロックデータM2が暗号化されて、暗号文ブロックデータC2 が出力される。時刻T3以前においては、セレクタ54の入力はBに切り替えられ、平文ブロックデータM3を暗号化する場合には、フィードバックループのフィードバックライン65からフィードバックされた暗号文ブロックデータC2 が入力され、鍵K1を用いた暗号化モジュール51により平文ブロックデータM3 暗号化されて、暗号文ブロックデータC3 が出力される。 At time T0, the key K 1 is supplied, and the encryption processing of the plaintext block data M 1 starts. At time T0, when the encryption of the plaintext block data M 1 is started, after the initial value IV is input once from the input A of the selector 54, the selector 54 is switched to B. Then, it is assumed that an interrupt IT requesting encryption of the plaintext block data N 1 occurs at a time X in the middle of the plaintext block data M 1 being encrypted using the key K 1 . By time T1, the ciphertext block data C 1 is stored in the memory 55. Then, the key K 2 is supplied to the encryption module 51 at time T1 due to the generation of the interrupt IT. At time T1, the selector 54 sets the input to A. At time T1, the switch 57 is connected to F. After time T1, the plaintext block data N 1 is encrypted using the key K 2 and ciphertext block data D 1 is output. It is assumed that at time Y, the plaintext block data N 1 has been encrypted and the interrupt IT has been released. By releasing this interrupt IT, the key K 1 is supplied to the encryption module 51 at time T2, the input of the selector 54 is switched to C, and the switch 57 is connected to E. When the selector 54 is switched to C, the ciphertext block data C 1 stored in the memory 55 is input for encryption of the plaintext block data M 2 , and the plaintext is transmitted by the encryption module 51 using the key K 1. Block data M 2 is encrypted, and ciphertext block data C 2 is output. At time T3 before the input of the selector 54 is switched to B, and when encrypting plaintext block data M 3 are, the ciphertext block data C 2 fed back from the feedback line 65 of the feedback loop is input, the key The plaintext block data M 3 is encrypted by the encryption module 51 using K 1 and the ciphertext block data C 3 is output.

なお、平文Mと平文Nの鍵が同一(K1 =K2 )の場合は、鍵は暗号処理のスタート時に一度だけ供給されればよい。 When the plaintext M and the plaintext N have the same key (K 1 = K 2 ), the key only needs to be supplied once at the start of the encryption process.

図3のフローチャートを用いて全体の動作を説明する。   The overall operation will be described with reference to the flowchart of FIG.

S1において、平文Mの暗号化処理がスタートし続行される。最後のブロックデータまで処理を終えた場合には、処理を終了する。S2において、任意の時点で生じる割り込みITの発生が監視される。割り込みITの発生がない場合には、S1の処理が続行される。平文ブロックデータMiの処理中に割り込みITが発生した場合には、S3において、現在処理中の平文ブロックデータMi の暗号文ブロックデータCiをメモリ55のレジスタ56に記憶する。S4において、割り込みITにより暗号化処理の要求があった平文Nの暗号化処理を行う。このS4の暗号化処理は、S5に示すように、割り込みITの解除があるまで連続して行われる。割り込みITの解除があった場合には、S6において、メモリ55のレジスタ56に記憶した暗号文ブロックデータCiを用いてMi+1 の暗号化処理を行う。それ以降の処理は、S1に戻り、暗号化処理が続行される。 In S1, the plaintext M encryption process starts and continues. When the process is completed up to the last block data, the process is terminated. In S2, the occurrence of an interrupt IT that occurs at an arbitrary time is monitored. If no interrupt IT is generated, the process of S1 is continued. When the interrupt IT is generated during the processing of the plaintext block data M i, at S3, stores the ciphertext block data C i plaintext block data M i currently being processed in the register 56 of the memory 55. In S4, the plaintext N encryption process requested by the interruption IT is performed. The encryption process in S4 is continuously performed until the interrupt IT is released as shown in S5. If the interrupt IT is released, encryption processing of M i + 1 is performed using the ciphertext block data C i stored in the register 56 of the memory 55 in S6. The subsequent processing returns to S1, and the encryption processing is continued.

図4は、セレクタ54のオペレーション処理を示す図である。   FIG. 4 is a diagram showing an operation process of the selector 54.

電源がオンになった場合には、S11に示すように、入力をAに設定する。S12において、暗号化がスタートした場合には、S13において、入力をBに設定する。即ち、フィードバックループのフィードバックライン65によりフィードバックされる暗号文ブロックデータCiが用いられる。S14において、現在処理しているブロックデータが最後であるということが判定された場合には、S11に戻り電源オンと同じ状態に戻る。S15において、割り込みITの発生が確認された場合には、S16において、入力をAに設定し、暗号化がスタートした場合には、S18において、入力をBに設定する。割り込みITの解除があるまでは、入力がBに設定されたままで動作する。即ち、フィードバックループのフィードバックライン65によりフィードバックされる暗号文ブロックデータCiが用いられる。S19において、割り込みITの解除があったことが検知された場合には、S20において、入力をCに設定する。この入力をCに設定することにより、メモリ55に記憶された暗号文ブロックデータCiが入力されることになる。このCからの入力による暗号化がスタートした場合には、S13に戻り入力をBに設定する。 When the power is turned on, the input is set to A as shown in S11. If encryption starts in S12, the input is set to B in S13. That is, the ciphertext block data C i fed back by the feedback line 65 of the feedback loop is used. If it is determined in S14 that the block data currently being processed is the last, the process returns to S11 and returns to the same state as when the power is turned on. If it is confirmed in S15 that an interrupt IT has occurred, the input is set to A in S16, and if the encryption is started, the input is set to B in S18. The operation is performed with the input set to B until the interrupt IT is released. That is, the ciphertext block data C i fed back by the feedback line 65 of the feedback loop is used. If it is detected in S19 that the interrupt IT has been released, the input is set to C in S20. By setting this input to C, the ciphertext block data C i stored in the memory 55 is input. When the encryption by the input from C starts, the process returns to S13 and the input is set to B.

このようにして、割り込みITの発生に基づき、セレクタ54を切り替えることができる。   In this way, the selector 54 can be switched based on the occurrence of the interrupt IT.

なお、平文Mの暗号化処理も、割り込みITにより任意の時刻にスタートさせてもよい。   The plaintext M encryption process may also be started at an arbitrary time by the interrupt IT.

図5は、スイッチ57の割り込み処理のフローチャートである。   FIG. 5 is a flowchart of the interrupt process of the switch 57.

電源がオンになった場合、そして、その後の最初の平文の暗号化処理の場合は、スイッチ57はEに接続される。そして、S31において、割り込みITが発生した場合には、スイッチ57をEからFに接続する。そして、S33において、割り込みITの解除が検出された場合には、スイッチ57をFからEに接続する。このようにして、スイッチ57は、割り込みITの発生から解除までは暗号文ブロックデータCiを無視する。従って、メモリ55のレジスタ56には、割り込みITが発生したときに生成された暗号文ブロックデータCi が記憶され続けることになる。 The switch 57 is connected to E when the power is turned on and for the first plaintext encryption process thereafter. In S31, if an interrupt IT occurs, the switch 57 is connected from E to F. If the release of the interrupt IT is detected in S33, the switch 57 is connected from F to E. In this manner, the switch 57 ignores the ciphertext block data C i from the generation to the cancellation of the interrupt IT. Accordingly, the ciphertext block data C i generated when the interrupt IT occurs is continuously stored in the register 56 of the memory 55.

以上のように、図1〜図5に示した暗号化装置は、平文Mを構成する平文ブロックデータMi (i=1,2,3,・・・)と平文Nを構成する平文ブロックデータNj(j=1,2,3,・・・)とを暗号化する暗号化装置において、平文Mの暗号化処理中に平文Nの暗号化要求を平文Mの暗号化処理完了前に受け付ける割り込み処理メカニズムを示している。 As described above, the encryption apparatus shown in FIG. 1 to FIG. 5 has the plaintext block data M i (i = 1, 2, 3,...) Constituting the plaintext M and the plaintext block data constituting the plaintext N. In the encryption apparatus that encrypts N j (j = 1, 2, 3,...), The plaintext N encryption request is accepted before the plaintext M encryption process is completed during the plaintext M encryption process. The interrupt handling mechanism is shown.

また、図1〜図5に示した暗号化装置は、平文ブロックデータMi の暗号化処理を行い、暗号文ブロックデータCi を出力する暗号化モジュール51と、暗号化モジュール51から出力された暗号文ブロックデータCiをフィードバックライン65を介し暗号化ユニット52にフィードバックするフィードバックループ65,66と、フィードバックループのフィードバックライン65と並列に設けられ、上記割り込み処理により上記平文Nの暗号化要求を受け付け、平文Nのいずれかの平文ブロックデータの暗号化処理を開始することにより、上記平文ブロックデータMi+1が平文ブロックデータMi の次に続けて暗号化されない場合、フィードバックされる暗号文ブロックデータCi を記憶するメモリ55とを有している。 Further, the encryption apparatus shown in Figures 1-5, performs an encryption process of the plaintext block data M i, the cryptographic module 51 for outputting the ciphertext block data C i, which is output from the encrypting module 51 Feedback loops 65 and 66 for feeding back the ciphertext block data C i to the encryption unit 52 via the feedback line 65 and the feedback line 65 of the feedback loop are provided in parallel. When the plaintext block data M i + 1 is not encrypted following the plaintext block data M i by accepting and starting encryption processing of any plaintext block data of the plaintext N, the ciphertext to be fed back And a memory 55 for storing the block data C i .

また、図1〜図5に示した暗号化装置は、平文ブロックデータMi+1 が平文ブロックデータMi の次に続けて暗号化される場合は、上記フィードバックループのフィードバックライン65によりフィードバックされる暗号文ブロックデータCiを選択してフィードバックループを介して暗号化ユニット52に供給し、上記平文ブロックデータMi+1 が平文ブロックデータMiの次に続けて暗号化されず、平文Nのいずれかの平文ブロックデータの次に暗号化される場合は、上記メモリ55に記憶された暗号文ブロックデータCiを選択してフィードバックループを介して暗号化ユニット52に供給するセレクタ54を有している。 1 to 5, when the plaintext block data M i + 1 is encrypted after the plaintext block data M i , it is fed back by the feedback line 65 of the feedback loop. The ciphertext block data C i is selected and supplied to the encryption unit 52 through the feedback loop, and the plaintext block data M i + 1 is not encrypted following the plaintext block data M i , and the plaintext N Is selected next to the plaintext block data, the selector 54 selects the ciphertext block data C i stored in the memory 55 and supplies it to the encryption unit 52 via the feedback loop. is doing.

メモリ55は、割り込みITが発生したときの暗号化装置の状態を記憶するメモリである。メモリ55が暗号化処理の状態を記憶しておくことにより、あるデータの暗号化の最中に他のデータの暗号化を行った場合でも、再びあるデータの暗号化の処理に復帰することができる。即ち、メモリ55に記憶されたデータを用いることにより、暗号化が中断されたときと全く同じ状態に暗号化装置を復帰させることができ、中断した暗号化処理を続行させることが可能になる。   The memory 55 is a memory that stores the state of the encryption device when the interrupt IT occurs. Since the memory 55 stores the state of encryption processing, even when other data is encrypted during encryption of certain data, the processing can return to the encryption processing of certain data again. it can. That is, by using the data stored in the memory 55, the encryption device can be returned to the same state as when the encryption is interrupted, and the interrupted encryption process can be continued.

図6は、メモリ55の他の例を示す図である。   FIG. 6 is a diagram illustrating another example of the memory 55.

メモリ55は、割り込み制御部52と入力スイッチ96と出力スイッチ97と複数のレジスタ(REG1,2,3)を有している。このように、複数のレジスタを有することにより、複数の割り込みを受け付けることが可能になる。   The memory 55 includes an interrupt control unit 52, an input switch 96, an output switch 97, and a plurality of registers (REG1, 2, 3). Thus, by having a plurality of registers, it is possible to accept a plurality of interrupts.

図7は、メモリ55の割り込み処理の動作を示す図である。   FIG. 7 is a diagram illustrating an interrupt processing operation of the memory 55.

割り込みITが発生すると、S41において、現在使用中のレジスタkの番号kを記憶する。S42において、入力スイッチ96と出力スイッチ97をレジスタk以外のレジスタlに接続する。この状態で、平文Nの暗号化が継続される。更に、平文Nの暗号化の最中に他の割り込みが発生したかを監視する。S43において、他の割り込みITが発生したことが検出された場合には、再び自分自身であるS40の処理を呼び出す。このように、割り込みITが発生するたびに、自分自身をS40の処理をリカーシブに呼び出すことにより、複数階層の割り込み処理を行うことができる。S44においては、割り込みが解除されたかを検出し、割り込みが解除された場合には、入力スイッチ96と出力スイッチ97を記憶しておいた番号kを用いてレジスタkに切り替える。図6に示す場合は、3つのレジスタがあるので、3階層の割り込み処理を行うことができる。   When the interrupt IT occurs, the number k of the register k currently in use is stored in S41. In S42, the input switch 96 and the output switch 97 are connected to the register 1 other than the register k. In this state, encryption of plaintext N is continued. Further, it is monitored whether another interrupt has occurred during the plaintext N encryption. If it is detected in S43 that another interrupt IT has occurred, the process of S40 that is itself is called again. In this way, each time an interrupt IT is generated, it is possible to perform interrupt processing of a plurality of layers by calling itself S40 recursively. In S44, it is detected whether the interrupt is released. If the interrupt is released, the input switch 96 and the output switch 97 are switched to the register k using the number k stored. In the case shown in FIG. 6, since there are three registers, three layers of interrupt processing can be performed.

図8は、メモリ55の他の例を示す図である。   FIG. 8 is a diagram illustrating another example of the memory 55.

メモリ55は、スタック64を有している。スタック64は、先入れ後出し(FILO)のレジスタである。スタック1を使用中に割り込みITが発生した場合には、スタック1のデータをスタック2に移し、それ以後のデータをスタック1に積み上げ、割り込みITが解除された場合には、積み上げたスタック1のデータを出力し、スタック2のデータをスタック1に戻す。図8に示す場合は、4階層の割り込み処理を行える場合を示している。   The memory 55 has a stack 64. The stack 64 is a first-in last-out (FILO) register. When an interrupt IT occurs while using the stack 1, the data of the stack 1 is moved to the stack 2, and the subsequent data is stacked on the stack 1, and when the interrupt IT is released, the stack 1 Data is output, and the data in stack 2 is returned to stack 1. The case shown in FIG. 8 shows a case where four levels of interrupt processing can be performed.

図6に示すように、複数階層の割り込み処理を行うことができる場合は、各割り込みに対して優先度を付けることができる。例えば、割り込みIT1を優先度1とし、割り込みIT2を優先度1より優先度の低い優先度2とすることにより、優先度1の割り込みIT1が発生した場合には、優先度2の処理を遅らせることができる。   As shown in FIG. 6, when multiple levels of interrupt processing can be performed, priority can be given to each interrupt. For example, by setting interrupt IT1 to priority level 1 and interrupt IT2 to priority level 2 which is lower than priority level 1, if priority level 1 interrupt IT1 occurs, processing of priority level 2 is delayed. Can do.

図9は、優先度1の暗号化処理を優先度2の暗号化処理に優先させた場合を示している。優先度1の暗号化処理を先に終了させている。   FIG. 9 shows a case where priority level 1 encryption processing is prioritized over priority level 2 encryption processing. The encryption process with priority 1 is terminated first.

図10は、優先度がともに等しい場合の暗号化処理の場合を示している。   FIG. 10 shows a case of encryption processing in which both priorities are equal.

優先度が等しい場合には、2つの平文の各ブロックデータを交互に暗号化する。   When the priorities are equal, the block data of the two plaintexts are alternately encrypted.

図11は、優先度1のデータと2つの優先度2のデータを暗号化する場合を示している。   FIG. 11 shows a case where priority level 1 data and two priority level 2 data are encrypted.

図9〜図11に示すように、割り込みに優先度を付けることによりユーザが望ましいと思われる暗号化処理手順を実現することができる。緊急用のデータや短いデータの場合には、優先度を高くすることにより効率のよい処理を行うことができる。   As shown in FIGS. 9 to 11, it is possible to realize an encryption processing procedure that is considered desirable by the user by giving priority to interrupts. In the case of urgent data or short data, efficient processing can be performed by increasing the priority.

図12は、メモリ55をフィードバックライン66と並列においた場合を示している。   FIG. 12 shows the case where the memory 55 is placed in parallel with the feedback line 66.

排他的論理和回路58と暗号鍵Kを用いた暗号化モジュール51とは、暗号化ユニット52を構成している。   The exclusive OR circuit 58 and the encryption module 51 using the encryption key K constitute an encryption unit 52.

図13は、図12の暗号化装置の動作手順を示す図である。   FIG. 13 is a diagram showing an operation procedure of the encryption apparatus of FIG.

第1セレクタ61と第2セレクタ62とは、以下のような選択接続により、図1のセレクタ54と同じ選択動作をさせるものである。   The first selector 61 and the second selector 62 perform the same selection operation as the selector 54 of FIG. 1 by the following selective connection.

第1のセレクタ61+第2のセレクタ62=セレクタ54
A + D = A
B + D = B
A + C = C
B + C = C
図13では、第2のセレクタ62がDを選択しているときは、第1のセレクタ61の選択(A又はB)が有効となり、第2のセレクタ62がCを選択しているときは、メモリ55の内容が出力されることになる。即ち、第2のセレクタ62は、メモリ55の内容を用いたいとき(割り込みITが解除されて平文Nから元の平文Mへの暗号化に戻るとき)に、Cを選択すればよい。
First selector 61 + second selector 62 = selector 54
A + D = A
B + D = B
A + C = C
B + C = C
In FIG. 13, when the second selector 62 selects D, the selection (A or B) of the first selector 61 is valid, and when the second selector 62 selects C, The contents of the memory 55 are output. That is, the second selector 62 may select C when it is desired to use the contents of the memory 55 (when the interrupt IT is released and the encryption returns from the plaintext N to the original plaintext M).

図14は、メモリ55をフィードバックライン67と並列においた場合を示している。   FIG. 14 shows a case where the memory 55 is placed in parallel with the feedback line 67.

図15は、図14の暗号化装置の動作手順を示す図である。   FIG. 15 is a diagram showing an operation procedure of the encryption apparatus of FIG.

割り込みITが発生した時刻Xが排他的論理和回路58で排他的論理和演算される前である場合には、メモリ55は、排他的論理和回路58により排他的論理和演算されたモジュール入力データSiを記憶する。そして、平文ブロックデータN1 を暗号化する。次に、メモリ55に記憶されたモジュール入力データSi を第2セレクタ62により選択させ、暗号鍵Kを用いた暗号化モジュール51に入力し、暗号化して暗号文ブロックデータC1を出力する。 When the time X when the interrupt IT occurs is before the exclusive OR operation is performed by the exclusive OR circuit 58, the memory 55 stores the module input data obtained by performing the exclusive OR operation by the exclusive OR circuit 58. S i is stored. Then, the plaintext block data N 1 is encrypted. Next, the module input data S i stored in the memory 55 is selected by the second selector 62, input to the encryption module 51 using the encryption key K, encrypted, and the ciphertext block data C 1 is output.

図1及び図12及び図14に示すように、メモリ55は、フィードバックライン65とフィードバックライン66とフィードバックライン67のいずれのラインと並列の設けられていても構わない。メモリ55は、暗号化装置が、あるデータの暗号化処理中に他のデータの暗号化を開始するとき、他のデータの暗号化を開始する直前の状態を覚えておくものであり、他のデータの暗号化処理が終了した時点で、メモリ55に記憶されたデータを用いて暗号化装置が元の状態に復帰できるのであれば、メモリ55は、どの場所に設けられていても構わない。また、メモリ55は、複数箇所に設けられていてもよい。   As shown in FIGS. 1, 12, and 14, the memory 55 may be provided in parallel with any of the feedback line 65, the feedback line 66, and the feedback line 67. The memory 55 remembers the state immediately before starting encryption of other data when the encryption device starts encryption of other data during encryption processing of certain data. If the encryption apparatus can be restored to the original state using the data stored in the memory 55 when the data encryption process is completed, the memory 55 may be provided in any location. The memory 55 may be provided at a plurality of locations.

以上のように、この実施の形態に係る暗号化装置は、1つ以上のブロックデータMi (i=1,2,3,・・・,m)からなる第1の処理データ(平文M)と、1つ以上のブロックデータNj(j=1,2,3,・・・,n)からなる第2の処理データ(平文N)との暗号化処理をする暗号化装置において、暗号化処理の状態を記憶するメモリ55を備え、第1の処理データの全ブロックデータ(M1〜Mm )の暗号化処理が完了する前に第2の処理データの最初のブロックデータN1 の暗号化処理を開始するとともに、第2の処理データの最初のブロックデータN1の暗号化処理を開始する場合に第1の処理データの暗号化処理の状態(例えば、暗号化ブロックデータCi )を上記メモリ55に記憶させ、第1の処理データの暗号化処理を再開する場合に、暗号化装置の暗号化処理の状態を、メモリに記憶した第1の処理データの暗号化処理の状態に復帰させてから第1の処理データの暗号化処理を再開することを特徴とする。 As described above, the encryption apparatus according to this embodiment has the first processing data (plain text M) composed of one or more block data M i (i = 1, 2, 3,..., M). In the encryption device that performs encryption processing with the second processing data (plain text N) composed of one or more block data N j (j = 1, 2, 3,..., N) A memory 55 for storing the processing state is provided, and the encryption of the first block data N 1 of the second processing data is completed before the encryption processing of all the block data (M 1 to M m ) of the first processing data is completed. When the encryption process is started and the encryption process of the first block data N 1 of the second process data is started, the state of the encryption process of the first process data (for example, the encrypted block data C i ) is changed. Store in the memory 55 and re-encrypt the first process data. When the encryption processing of the encryption device is restored to the state of the encryption processing of the first processing data stored in the memory, the encryption processing of the first processing data is resumed. Features.

また、上記暗号化装置は、第2の処理データの全ブロックデータ(N1 〜Nn )の暗号処理の完了する前に第1の処理データの暗号化処理を再開するとともに、上記メモリ55は、第1の処理データの暗号化処理を再開する場合に第2の処理データの暗号化処理状態(例えば、暗号化ブロックデータDj)を記憶し、第2の処理データの暗号化処理を再開する場合は、暗号化装置の暗号化処理の状態を、メモリに記憶した第2の処理データの暗号化処理の状態に復帰させてから第2の処理データの暗号化処理を再開することを特徴とする。 The encryption device resumes the encryption processing of the first processing data before the encryption processing of all the block data (N 1 to N n ) of the second processing data is completed, and the memory 55 When the encryption process of the first process data is resumed, the encryption process state of the second process data (for example, the encrypted block data D j ) is stored, and the encryption process of the second process data is resumed In this case, the encryption processing of the second processing data is resumed after the encryption processing state of the encryption device is returned to the encryption processing state of the second processing data stored in the memory. And

図16は、OFBモードの暗号化装置の構成図である。   FIG. 16 is a block diagram of an OFB mode encryption apparatus.

図45に比べて、メモリ55が追加されている点が特徴である。メモリ55は、暗号化モジュール51から出力されたモジュール出力データT1 を記憶するものである。 Compared to FIG. 45, a feature is that a memory 55 is added. The memory 55 stores module output data T 1 output from the encryption module 51.

図16は、平文Mを構成する平文ブロックデータMi (i=1,2,3,・・・)と平文Nを構成する平文ブロックデータNj(j=1,2,3,・・・)とを暗号化する暗号化装置において、平文Mの暗号化処理中に平文Nの暗号化要求を平文Mの暗号化処理完了前に受け付ける割り込み処理メカニズムと、暗号化処理を行ったデータをモジュール出力ブロックデータTiとして出力する暗号化モジュール51と、暗号化モジュール51から出力されたモジュール出力ブロックデータTi をフィードバックライン65を介し暗号化モジュールにフィードバックするフィードバックループ65,66と、フィードバックループのフィードバックライン65と並列に設けられ、上記平文Nの暗号化要求を受け付け、平文Nのいずれかの平文ブロックデータの暗号化処理を開始することにより、上記平文ブロックデータMi+1が平文ブロックデータMi の次に続けて暗号化されない場合、フィードバックされるモジュール出力ブロックデータTi を記憶するメモリ55と、平文ブロックデータMi+1が平文ブロックデータMi の次に続けて暗号化される場合は、上記フィードバックループのフィードバックライン65によりフィードバックされるモジュール出力ブロックデータTiを選択してフィードバックループを介して暗号化モジュール51に供給し、上記平文ブロックデータMi+1 が平文ブロックデータMiの次に続けて暗号化されず、平文Nのいずれかの平文ブロックデータの次に暗号化される場合は、上記メモリ55に記憶されたモジュール出力ブロックデータTiを選択してフィードバックループを介して暗号化モジュール51に供給するセレクタ54とを備えたことを特徴とする。 FIG. 16 shows plaintext block data M i (i = 1, 2, 3,...) Constituting plaintext M and plaintext block data N j (j = 1, 2, 3,...) Constituting plaintext N. ) And an interrupt processing mechanism that accepts a plaintext N encryption request before the plaintext M encryption process is completed during the plaintext M encryption process, and a module for processing the encrypted data. an encryption module 51 for outputting as output block data T i, feedback loops 65 and 66 is fed back to the encryption module via a feedback line 65 the output modules output block data T i from the cryptographic module 51, the feedback loop It is provided in parallel with the feedback line 65, accepts the above plaintext N encryption request, and receives any plaintext block of plaintext N. When the plaintext block data M i + 1 is not encrypted after the plaintext block data M i , the memory 55 for storing the module output block data T i to be fed back is started. When the plaintext block data M i + 1 is encrypted following the plaintext block data M i , the module output block data T i fed back by the feedback line 65 of the feedback loop is selected and the feedback loop is executed. The plaintext block data M i + 1 is not encrypted after the plaintext block data M i and is encrypted after any plaintext block data of the plaintext N. If the feed select the module output block data T i stored in the memory 55 Via Kkurupu it is characterized in that a selector 54 is supplied to the encryption module 51.

図17は、図16のOFBモードの暗号化装置の動作説明図である。   FIG. 17 is an explanatory diagram of the operation of the OFB mode encryption apparatus of FIG.

図17は、図2のCBCモードの動作がOFBモードの動作になったものであり、その他の動作は図2の動作と同じである。   In FIG. 17, the operation in the CBC mode in FIG. 2 is changed to the operation in the OFB mode, and other operations are the same as those in FIG.

図18は、CFBモードの暗号化装置を示す図である。   FIG. 18 is a diagram illustrating a CFB mode encryption apparatus.

図47に比べて、メモリ55が設けられている点が特徴である。メモリ55は、排他的論理和回路58から出力された暗号文ブロックデータCi を記憶するものである。 47 is characterized in that a memory 55 is provided. The memory 55 stores the ciphertext block data C i output from the exclusive OR circuit 58.

また、排他的論理和回路58と暗号鍵Kを用いた暗号化モジュール51とは、暗号化ユニット52を構成している。   The exclusive OR circuit 58 and the encryption module 51 using the encryption key K constitute an encryption unit 52.

図18は、平文Mを構成する平文ブロックデータMi (i=1,2,3,・・・)と平文Nを構成する平文ブロックデータNj(j=1,2,3,・・・)とを暗号化する暗号化装置において、平文Mの暗号化処理中に平文Nの暗号化要求を平文Mの暗号化処理完了前に受け付ける割り込み処理メカニズムと、平文ブロックデータMiの暗号化処理を行い暗号文ブロックデータCi を出力する暗号化ユニット52と、暗号化モジュールから出力された暗号文ブロックデータCiをフィードバックライン65を介し暗号化処理にフィードバックするフィードバックループ65,66と、フィードバックループのフィードバックライン65と並列に設けられ、上記平文Nの暗号化要求を受け付け、平文Nのいずれかの平文ブロックデータの暗号化処理を開始することにより、上記平文ブロックデータMi+1が平文ブロックデータMi の次に続けて暗号化されない場合、フィードバックされる暗号文ブロックデータCi を記憶するメモリ55と、平文ブロックデータMi+1が平文ブロックデータMi の次に続けて暗号化される場合は、上記フィードバックループのフィードバックライン65によりフィードバックされる暗号文ブロックデータCiを選択してフィードバックループを介して暗号化ユニット52に供給し、上記平文ブロックデータMi+1 が平文ブロックデータMiの次に続けて暗号化されず、平文Nのいずれかの平文ブロックデータの次に暗号化される場合は、上記メモリ55に記憶された暗号文ブロックデータCiを選択してフィードバックループを介して暗号化ユニット52に供給するセレクタ54とを備えたことを特徴とする。 FIG. 18 shows plaintext block data M i (i = 1, 2, 3,...) Constituting plaintext M and plaintext block data N j (j = 1, 2, 3,...) Constituting plaintext N. in) the encryption apparatus for encrypting, and interrupt handling mechanism for accepting a encryption request of the plaintext N during encrypting process of the plaintext M before encryption processing completion of the plaintext M, encryption of the plaintext block data M i an encryption unit 52 for outputting the ciphertext block data C i performs a feedback loop 65 and 66 is fed back to the encrypting process via a feedback line 65 the ciphertext block data C i output from the encryption module, a feedback A parallel loop feedback line 65 is provided to accept the plaintext N encryption request and encrypt any plaintext block data in plaintext N. By starting, if the plaintext block data M i + 1 is not encrypted subsequent to the next plaintext block data M i, and a memory 55 for storing the ciphertext block data C i fed back, the plaintext block data M When i + 1 is encrypted following the plaintext block data M i , the ciphertext block data C i fed back by the feedback line 65 of the feedback loop is selected and the encryption unit is passed through the feedback loop. When the plaintext block data M i + 1 is not encrypted after the plaintext block data M i and is encrypted after any plaintext block data of the plaintext N, the memory select ciphertext block data C i stored in the 55 supplied to the enciphering unit 52 via a feedback loop Characterized in that a that the selector 54.

図19は、図18のCFBモードの暗号化装置の動作説明図である。   FIG. 19 is an explanatory diagram of the operation of the CFB mode encryption apparatus of FIG.

図19は、図2のCBCモードの動作がCFBモードの動作になったものであり、その他の動作は図2の動作と同じである。   FIG. 19 shows the operation of the CBC mode in FIG. 2 changed to the operation of the CFB mode, and the other operations are the same as those in FIG.

図20は、CBCモードの復号装置を示す図である。   FIG. 20 shows a CBC mode decoding apparatus.

図44に比べて、メモリ75が設けられている点が特徴である。   Compared to FIG. 44, a feature is that a memory 75 is provided.

メモリ75は、レジスタ76とスイッチ77により構成されている。   The memory 75 includes a register 76 and a switch 77.

また、排他的論理和回路78と鍵Kを用いた復号モジュール71により復号ユニット72を構成している。   In addition, a decryption unit 72 is configured by the exclusive OR circuit 78 and the decryption module 71 using the key K.

なお、レジスタ111は、セレクタ74の内部に設けられていてもよい。   Note that the register 111 may be provided inside the selector 74.

図20に示す復号装置は、暗号文Cを構成する暗号文ブロックデータCi (i=1,2,3,・・・)と暗号文Dを構成する暗号文ブロックデータNj(j=1,2,3,・・・)とを復号する復号装置において、暗号文Cの復号処理中に暗号文Dの復号要求を任意の時点で受け付ける割り込み処理メカニズムを有している。 The decryption apparatus shown in FIG. 20 includes ciphertext block data C i (i = 1, 2, 3,...) Constituting ciphertext C and ciphertext block data N j (j = 1) constituting ciphertext D. , 2, 3,...) Has an interrupt processing mechanism that accepts a decryption request for ciphertext D at any time during decryption processing for ciphertext C.

また、図20に示す復号装置は、暗号文ブロックデータCi の復号処理を行ったデータをモジュール出力ブロックデータTiとして出力する復号モジュール71と、暗号文ブロックデータCi+1 を復号するための暗号文ブロックデータCi をフィードバックライン85,111,82を介し復号ユニット72にフィードバックするフィードバックループ85,111,82,86と、フィードバックループのフィードバックライン85,111,82と並列に設けられ、上記暗号文Dの復号要求を受け付け、暗号文Dのいずれかの暗号文ブロックデータの復号処理を開始することにより、上記暗号文ブロックデータCi+1が暗号文ブロックデータCi の次に続けて復号されない場合、フィードバックされるブロックデータを記憶するメモリ71とを有している。 Further, the decoding apparatus shown in FIG. 20, a decoding module 71 for outputting the data subjected to the decoding processing of the ciphertext block data C i as module output block data T i, for decrypting ciphertext block data C i + 1 the feedback loop 85,111,82,86 be fed back to the ciphertext block data C i decoding unit via a feedback line 85,111,82 72, provided in parallel with the feedback line 85,111,82 of the feedback loop, By accepting the decryption request for the ciphertext D and starting the decryption process for any ciphertext block data of the ciphertext D, the ciphertext block data C i + 1 continues to the ciphertext block data C i. Memory 71 for storing the block data to be fed back Have.

また、図20に示す復号装置は、暗号文ブロックデータCi+1 が暗号文ブロックデータCi の次に続けて復号される場合は、上記フィードバックループのフィードバックライン85,111,82によりフィードバックされる暗号文ブロックデータCiを選択してフィードバックループを介して暗号ユニット72に供給し、上記暗号文ブロックデータCi+1 が暗号文ブロックデータCiの次に続けて復号されず、暗号文Dのいずれかの暗号文ブロックデータの次に復号される場合は、上記メモリに記憶された暗号文ブロックデータCi を選択してフィードバックループを介して暗号ユニット72に供給するセレクタ74を備えている。 Further, the decoding apparatus shown in FIG. 20, when the ciphertext block data C i + 1 is decoded following the next ciphertext block data C i, fed back by the feedback line 85,111,82 of the feedback loop Ciphertext block data C i is selected and supplied to the cipher unit 72 via a feedback loop, and the ciphertext block data C i + 1 is not decrypted following the ciphertext block data C i , A selector 74 that selects the ciphertext block data C i stored in the memory and supplies the ciphertext block data C i to the cipher unit 72 via a feedback loop when decrypted next to any ciphertext block data of D; Yes.

なお、上述した図20の説明において、「フィードバックライン」、「フィードバックループ」という用語を用いているが、「自己の出力を自己の入力にする」という意味での「フィードバック」ではない。ここでは、「フィードバック」という用語は、暗号文ブロックデータCiを復号した後に、暗号文ブロックデータCi+1 を復号するために、暗号文ブロックデータCi を再び供給するという意味で用いるものとする。 In the description of FIG. 20 described above, the terms “feedback line” and “feedback loop” are used, but they are not “feedback” in the sense of “making their own output their own input”. Here, the term "feedback", after decrypting the ciphertext block data C i, in order to decode the ciphertext block data C i + 1, which is used in the sense that once again supplying the ciphertext block data C i And

図21は、図20の復号装置の動作手順を示す図である。   FIG. 21 is a diagram showing an operation procedure of the decoding device of FIG.

暗号鍵(復号鍵ともいう)K1 を用いて、暗号文ブロックデータC1 を復号している最中に割り込みITの発生があった場合には、暗号文ブロックデータC1がメモリ75のレジスタ76に記憶される。その後、暗号鍵(復号鍵ともいう)K2 を用いて、暗号文ブロックデータD1 の復号が行われ、平文ブロックデータN1が復号される。そして、メモリ75のレジスタ76に記憶された暗号文ブロックデータC1 が読み出され、暗号文ブロックデータC2の復号が行われ、平文ブロックデータM2 が復号される。セレクタ74の動作は、図4に示したものと同じである。また、スイッチ77の動作は、図5に示したものと同じである。 If an interrupt IT occurs while the ciphertext block data C 1 is being decrypted using the cipher key (also referred to as a decryption key) K 1 , the ciphertext block data C 1 is stored in the register of the memory 75. 76 is stored. Thereafter, the ciphertext block data D 1 is decrypted using the encryption key (also referred to as a decryption key) K 2 , and the plaintext block data N 1 is decrypted. Then, the ciphertext block data C 1 stored in the register 76 of the memory 75 is read, the ciphertext block data C 2 is decrypted, and the plaintext block data M 2 is decrypted. The operation of the selector 74 is the same as that shown in FIG. The operation of the switch 77 is the same as that shown in FIG.

図22は、OFBモードの復号装置を示す図である。   FIG. 22 is a diagram illustrating an OFB mode decoding apparatus.

図22は、暗号文Cを構成する暗号文ブロックデータCi (i=1,2,3,・・・)と暗号文Dを構成する暗号文ブロックデータDj(j=1,2,3,・・・)とを復号する復号装置において、暗号文Cの復号処理中に暗号文Dの復号要求を任意の時点で受け付ける割り込み処理メカニズムと、復号処理を行ったデータをモジュール出力ブロックデータTiとして出力する復号モジュール71と、復号モジュール71から出力されたモジュール出力ブロックデータTi をフィードバックライン85を介し復号モジュール71にフィードバックするフィードバックループ85,86と、フィードバックループのフィードバックライン85と並列に設けられ、上記暗号文Dの復号要求を受け付け、暗号文Dのいずれかの暗号文ブロックデータの復号処理を開始することにより、上記暗号文ブロックデータCi+1が暗号文ブロックデータCi の次に続けて復号されない場合、フィードバックされるモジュール出力ブロックデータTi を記憶するメモリ75と、暗号文ブロックデータCi+1が暗号文ブロックデータCi の次に続けて復号される場合は、上記フィードバックループのフィードバックライン85によりフィードバックされるモジュール出力ブロックデータTiを選択してフィードバックループを介して復号モジュール71に供給し、上記暗号文ブロックデータCi+1 が暗号文ブロックデータCiの次に続けて復号されず、暗号文Dのいずれかの暗号文ブロックデータの次に復号される場合は、上記メモリ75に記憶されたモジュール出力ブロックデータTiを選択してフィードバックループを介して復号モジュール71に供給するセレクタ74とを備えたことを特徴とする。 FIG. 22 shows ciphertext block data C i (i = 1, 2, 3,...) Constituting the ciphertext C and ciphertext block data D j (j = 1, 2, 3) constituting the ciphertext D. ,...), An interrupt processing mechanism that accepts a decryption request for ciphertext D at any time during decryption processing of ciphertext C, and module output block data T In parallel with the decoding module 71 output as i , the feedback loops 85 and 86 for feeding back the module output block data T i output from the decoding module 71 to the decoding module 71 via the feedback line 85, and the feedback line 85 of the feedback loop. Provided, accepts a decryption request for the ciphertext D, and When the ciphertext block data C i + 1 is not decrypted after the ciphertext block data C i by starting the decryption process, a memory 75 for storing the module output block data T i to be fed back, and a cipher When the text block data C i + 1 is decrypted subsequent to the cipher text block data C i , the module output block data T i fed back by the feedback line 85 of the feedback loop is selected and passed through the feedback loop. Is supplied to the decryption module 71, and the ciphertext block data C i + 1 is not decrypted following the ciphertext block data C i but decrypted next to any ciphertext block data of the ciphertext D. If selects the module output block data T i stored in the memory 75 Feedback Characterized in that a selector 74 is supplied to the decoding module 71 through the-loop.

図23は、図22のOFBモードの暗号化装置の動作説明図である。   FIG. 23 is an explanatory diagram of the operation of the OFB mode encryption apparatus of FIG.

図23は、図21のCBCモードの動作がOFBモードの動作になったものであり、その他の動作は図21の動作と同じである。   In FIG. 23, the operation in the CBC mode in FIG. 21 is changed to the operation in the OFB mode, and the other operations are the same as those in FIG.

図24は、CFBモードの復号装置を示す図である。   FIG. 24 is a diagram illustrating a CFB mode decoding apparatus.

また、排他的論理和回路78と鍵Kを用いた復号モジュール71により復号ユニット72を構成している。   In addition, a decryption unit 72 is configured by the exclusive OR circuit 78 and the decryption module 71 using the key K.

なお、レジスタ111は、セレクタ74の内部に設けられていてもよい。   Note that the register 111 may be provided inside the selector 74.

図24は、暗号文Cを構成する暗号文ブロックデータCi (i=1,2,3,・・・)と暗号文Dを構成する暗号文ブロックデータDj(j=1,2,3,・・・)とを復号する復号装置において、暗号文Cの復号処理中に暗号文Dの復号要求を任意の時点で受け付ける割り込み処理メカニズムと、暗号文ブロックデータCiの復号処理を行ったデータをモジュール出力ブロックデータTi として出力する復号モジュール71と、暗号文ブロックデータCi+1を復号するための暗号文ブロックデータCi をフィードバックライン85,111,82を介し復号ユニット72にフィードバックするフィードバックループ85,111,82,86と、フィードバックループのフィードバックライン85,111,82と並列に設けられ、上記暗号文Dの復号要求を受け付け、暗号文Dのいずれかの暗号文ブロックデータの復号処理を開始することにより、上記暗号文ブロックデータCi+1が暗号文ブロックデータCi の次に続けて復号されない場合、フィードバックされる暗号文ブロックデータCi を記憶するメモリ75と、暗号文ブロックデータCi+1が暗号文ブロックデータCi の次に続けて復号される場合は、上記フィードバックループのフィードバックライン85,111,82によりフィードバックされる暗号文ブロックデータCiを選択してフィードバックループを介して復号モジュール71に供給し、上記暗号文ブロックデータCi+1 が暗号文ブロックデータCiの次に続けて復号されず、暗号文Dのいずれかの暗号文ブロックデータの次に復号される場合は、上記メモリ75に記憶された暗号文ブロックデータCiを選択してフィードバックループを介して復号モジュール71に供給するセレクタ74とを備えたことを特徴とする。 FIG. 24 shows ciphertext block data C i (i = 1, 2, 3,...) Constituting the ciphertext C and ciphertext block data D j (j = 1, 2, 3) constituting the ciphertext D. , ...) and in the decoding apparatus for decoding, and the interrupt handling mechanism for accepting at any time the decryption request ciphertext D during decrypting process of the ciphertext C, was carried out a decoding process of the ciphertext block data C i Feedback data and decoding module 71 for outputting the module output block data T i, the decoding unit 72 via the feedback line 85,111,82 of the ciphertext block data C i for decrypting the ciphertext block data C i + 1 Provided in parallel with the feedback loops 85, 111, 82, 86 and the feedback lines 85, 111, 82 of the feedback loop, By accepting a decryption request for D and starting decryption processing for any ciphertext block data in ciphertext D, the ciphertext block data C i + 1 is not decrypted following ciphertext block data C i. The ciphertext block data C i to be fed back, and when the ciphertext block data C i + 1 is decrypted following the ciphertext block data C i , the feedback line of the feedback loop The ciphertext block data C i fed back by 85, 111, 82 is selected and supplied to the decryption module 71 via a feedback loop, and the ciphertext block data C i + 1 is next to the ciphertext block data C i . In the case where decryption is not performed continuously and decrypted next to any ciphertext block data of the ciphertext D, the data is stored in the memory 75. And a selector 74 that selects the stored ciphertext block data C i and supplies it to the decryption module 71 via a feedback loop.

なお、上述した図24の説明において、「フィードバックライン」、「フィードバックループ」という用語を用いているが、「自己の出力を自己の入力にする」という意味での「フィードバック」ではない。ここでは、「フィードバック」という用語は、暗号文ブロックデータCiを復号した後に、暗号文ブロックデータCi+1 を復号するために、暗号文ブロックデータCi を再び供給するという意味で用いるものとする。 In the description of FIG. 24 described above, the terms “feedback line” and “feedback loop” are used, but they are not “feedback” in the sense of “making their own output their own input”. Here, the term "feedback", after decrypting the ciphertext block data C i, in order to decode the ciphertext block data C i + 1, which is used in the sense that once again supplying the ciphertext block data C i And

図25は、図24のCFBモードの暗号化装置の動作説明図である。   FIG. 25 is a diagram for explaining the operation of the CFB mode encryption apparatus of FIG.

図25は、図21のCBCモードの動作がCFBモードの動作になったものであり、その他の動作は図21の動作と同じである。   In FIG. 25, the operation in the CBC mode in FIG. 21 is changed to the operation in the CFB mode, and other operations are the same as those in FIG.

図26は、図1に示したCBCモードの暗号化装置の改良例を示す図である。   FIG. 26 is a diagram showing an improved example of the CBC mode encryption apparatus shown in FIG.

図26の暗号化装置は、セレクタ154とメモリ155とが追加されている。図1の場合は、鍵K1 が割り込みITの解除のとき外部から支給される場合を示したが、ここでは、一度外部から支給された鍵K1を保存して再利用する場合について説明する。 In the encryption apparatus of FIG. 26, a selector 154 and a memory 155 are added. In the case of FIG. 1, the case where the key K 1 is supplied from the outside when the interrupt IT is canceled is shown, but here, the case where the key K 1 once supplied from the outside is stored and reused will be described. .

メモリ155は、レジスタ156とスイッチ157により構成されている。スイッチ157は、暗号鍵Kをレジスタ156に入力させるか無視するかを切り替えるものである。この切り替えは、例えば、割り込みITにより行われる。割り込みITが発生した場合には、スイッチ157はEに接続され、割り込みITが解除された場合には、スイッチ157はFに接続される。レジスタ156は、Eを経由してきた鍵Kを入力して記憶するものである。レジスタ156に記憶された鍵Kは、セレクタ154に出力される。セレクタ154は、A,Cの2つの入力を有しており、いずれか1つの入力を選択するものである。これらの選択は、後述するように割り込みITに依存する。   The memory 155 includes a register 156 and a switch 157. The switch 157 switches whether the encryption key K is input to the register 156 or ignored. This switching is performed by an interrupt IT, for example. When the interrupt IT is generated, the switch 157 is connected to E, and when the interrupt IT is released, the switch 157 is connected to F. The register 156 inputs and stores the key K that has passed through E. The key K stored in the register 156 is output to the selector 154. The selector 154 has two inputs A and C, and selects one of the inputs. These selections depend on the interrupt IT as described later.

図27は、図26に示した暗号化装置の動作手順を示す図である。   FIG. 27 is a diagram showing an operation procedure of the encryption apparatus shown in FIG.

この暗号化装置が電源を投入された場合のセレクタ54とセレクタ154の入力はAに設定されており、スイッチ57とスイッチ157はEに接続されているものとする。また、平文Nの暗号化要求があるときは、割り込みITが発生し、平文Nの暗号化要求が解除されるまで、割り込みITがオンになり続けるものとする。また、平文Mは、鍵K1を用いて暗号化され、平文Nは、鍵K2 を用いて暗号化されるものとする。鍵K1 又は鍵K2 が暗号化モジュール51に支給されるものとする。 Assume that the inputs of the selector 54 and the selector 154 when the encryption apparatus is turned on are set to A, and the switches 57 and 157 are connected to E. When there is a plaintext N encryption request, an interrupt IT is generated, and the interrupt IT is kept on until the plaintext N encryption request is canceled. Also, it is assumed that the plaintext M is encrypted using the key K 1 and the plaintext N is encrypted using the key K 2 . It is assumed that the key K 1 or the key K 2 is supplied to the encryption module 51.

時刻T0において、鍵K1 が鍵KIとして外部から支給される。セレクタ154は、Aに接続されているので、鍵KIを鍵Kとして暗号化モジュール51に出力する。また、スイッチ157がEに接続されているので、鍵K1がレジスタ156に記憶される。そして、平文ブロックデータM1 の暗号化処理がスタートする。時刻T0において、平文ブロックデータM1の暗号化がスタートした場合には、セレクタ54の入力Aから一旦イニシャルバリューIVが入力された後、セレクタ54はBに切り替わる。そして、平文ブロックデータM1が鍵K1 を用いて暗号化されている途中の時刻Xにおいて、平文ブロックデータN1 の暗号化を要求する割り込みITが発生したとする。時刻T1までに、暗号文ブロックデータC1はメモリ55に記憶された状態になる。そして、割り込みITの発生により時刻T1において、鍵K2 が鍵KIとして外部から暗号化モジュール51に支給される。セレクタ154は、Aに接続されているので、鍵KIを鍵Kとして暗号化モジュール51に出力する。また、時刻T1において、セレクタ54は入力をAに設定する。また、時刻T1において、スイッチ57とスイッチ157はFに接続される。従って、鍵K2は、レジスタ156に記憶されない。時刻T1以降は、鍵K2 を用いて平文ブロックデータN1 の暗号化が行われ、暗号文ブロックデータD1が出力される。時刻Yにおいて、平文ブロックデータN1 の暗号化が終了し、割り込みITが解除されたものとする。この割り込みITの解除により時刻T2において、セレクタ54の入力はCに切り替えられ、スイッチ57はEに接続される。従って、鍵K1がレジスタ156から鍵KIとしてセレクタ154に出力され、セレクタ154から鍵K1 が鍵Kとして暗号化モジュール51に支給される。また、セレクタ54がCに切り替わったことにより、メモリ55に記憶されていた暗号文ブロックデータC1が平文ブロックデータM2 の暗号化のために入力され、鍵K1 を用いた暗号化モジュール51により平文ブロックデータM2が暗号化されて、暗号文ブロックデータC2 が出力される。時刻T3以前においては、セレクタ54の入力はBに切り替えられ、平文ブロックデータM3を暗号化する場合には、フィードバックループのフィードバックライン65からフィードバックされた暗号文ブロックデータC2 が入力され、鍵K1を用いた暗号化モジュール51により平文ブロックデータM3 が暗号化されて、暗号文ブロックデータC3 が出力される。 At time T0, the key K 1 is paid from the outside as the key KI. Since the selector 154 is connected to A, the selector 154 outputs the key KI as the key K to the encryption module 51. Since the switch 157 is connected to E, the key K 1 is stored in the register 156. Then, the encryption process of the plaintext block data M 1 is started. At time T0, when the encryption of the plaintext block data M 1 is started, after the initial value IV is input once from the input A of the selector 54, the selector 54 is switched to B. Then, it is assumed that an interrupt IT requesting encryption of the plaintext block data N 1 occurs at a time X in the middle of the plaintext block data M 1 being encrypted using the key K 1 . By time T1, the ciphertext block data C 1 is stored in the memory 55. Then, at time T1 by the occurrence of an interrupt IT, the key K 2 is paid from the outside as the key KI encryption module 51. Since the selector 154 is connected to A, the selector 154 outputs the key KI as the key K to the encryption module 51. At time T1, the selector 54 sets the input to A. At time T1, the switch 57 and the switch 157 are connected to F. Therefore, the key K 2 is not stored in the register 156. After time T1, the plaintext block data N 1 is encrypted using the key K 2 and ciphertext block data D 1 is output. It is assumed that at time Y, the plaintext block data N 1 has been encrypted and the interrupt IT has been released. By canceling the interrupt IT, the input of the selector 54 is switched to C at time T2, and the switch 57 is connected to E. Accordingly, the key K 1 is output from the register 156 to the selector 154 as the key KI, and the key K 1 is supplied from the selector 154 to the encryption module 51 as the key K. Further, when the selector 54 is switched to C, the ciphertext block data C 1 stored in the memory 55 is input for encrypting the plaintext block data M 2 , and the encryption module 51 using the key K 1 is used. As a result, the plaintext block data M 2 is encrypted, and the ciphertext block data C 2 is output. At time T3 before the input of the selector 54 is switched to B, and when encrypting plaintext block data M 3 are, the ciphertext block data C 2 fed back from the feedback line 65 of the feedback loop is input, the key plaintext block data M 3 by the encrypting module 51 using the K 1 is encrypted, is output ciphertext block data C 3.

また、時刻T3以前においては、セレクタ154の入力は、Aに切り替えられる。   Prior to time T3, the input of the selector 154 is switched to A.

セレクタ154のオペレーション処理を説明する。   The operation process of the selector 154 will be described.

電源がオンになった場合には、入力をAに設定する。また、割り込みITの発生が確認された場合でも、入力をAに設定し続ける。割り込みITの解除があるまでは、セレクタ154は、入力がAに設定されたままで動作する。セレクタ154は、割り込みITの解除があったことが検知された場合に、入力をCに設定する。この入力をCに設定することにより、メモリ55に記憶された鍵K1が鍵Kとして暗号化モジュール51に入力されることになる。このCからの鍵入力による暗号化がスタートした場合には、セレクタ154は、入力をAに設定する。 When the power is turned on, the input is set to A. Further, even when the occurrence of the interrupt IT is confirmed, the input is continuously set to A. The selector 154 operates with the input set to A until the interrupt IT is released. The selector 154 sets the input to C when it is detected that the interrupt IT has been released. By setting this input to C, the key K 1 stored in the memory 55 is input to the encryption module 51 as the key K. When the encryption by the key input from C starts, the selector 154 sets the input to A.

このようにして、割り込みITの発生に基づき、セレクタ154を切り替えることができる。   In this way, the selector 154 can be switched based on the occurrence of the interrupt IT.

次に、スイッチ157の割り込み処理のオペレーションを説明する。   Next, the interrupt processing operation of the switch 157 will be described.

電源がオンになった場合、そして、その後の最初の平文Mの暗号化処理の場合は、スイッチ157はEに接続され、平文Mの鍵K1 がレジスタ156に記憶される。そして、時刻Xにて、割り込みITが発生した場合には、時刻T1でスイッチ157をEからFに接続し、平文Nの鍵K2 を無視する。そして、時刻Yにて、割り込みITの解除が検出された場合には、時刻T2にて、スイッチ157をFからEに接続する。このようにして、スイッチ157は、割り込みITの発生から解除までは平文Nの鍵K2を無視する。従って、メモリ155のレジスタ156には、平文Mの鍵K1 が記憶され続けることになる。 When the power is turned on, and in the first plaintext M encryption process thereafter, the switch 157 is connected to E and the plaintext M key K 1 is stored in the register 156. If an interrupt IT occurs at time X, the switch 157 is connected from E to F at time T 1 , and the plaintext N key K 2 is ignored. If release of the interrupt IT is detected at time Y, the switch 157 is connected from F to E at time T2. In this way, the switch 157 ignores the plaintext N key K 2 from the generation to the cancellation of the interrupt IT. Accordingly, the plaintext M key K 1 continues to be stored in the register 156 of the memory 155.

図28は、図20に示した復号装置に対して鍵K1 を保存して再利用する場合の構成を示している。 FIG. 28 shows a configuration when the key K 1 is stored and reused in the decryption apparatus shown in FIG.

図28は、図20に対してセレクタ174とメモリ175を追加したものである。セレクタ174とメモリ175の動作は、図26に示したセレクタ154とメモリ155と同じである。   FIG. 28 is obtained by adding a selector 174 and a memory 175 to FIG. The operations of the selector 174 and the memory 175 are the same as those of the selector 154 and the memory 155 shown in FIG.

メモリ55とメモリ155は、割り込みITが発生したときの暗号化装置の状態を記憶するメモリの一例である。このように、メモリ55とメモリ155とが暗号化処理の状態を記憶しておくことにより、あるデータの暗号化の最中に他のデータの暗号化を行った場合でも、再びあるデータの暗号化の処理に復帰することができる。即ち、メモリ55に記憶されたデータとメモリ155に記憶された鍵Kとを用いることにより、暗号化が中断されたときと全く同じ状態に暗号化装置を復帰させることができ、中断した暗号化処理を続行させることが可能になる。   The memory 55 and the memory 155 are an example of a memory that stores the state of the encryption device when the interrupt IT occurs. As described above, the memory 55 and the memory 155 store the state of the encryption process, so that even when another data is encrypted during the encryption of a certain data, the encryption of the certain data is performed again. It is possible to return to processing. That is, by using the data stored in the memory 55 and the key K stored in the memory 155, the encryption device can be restored to the same state as when the encryption was interrupted, and the interrupted encryption Processing can be continued.

なお、メモリ155とメモリ175は、図6,図8に示すメモリ55と同じ構成のものでもよい。また、図示していないが、図16,図18,図22,図24に対して、図26,図28に示すような構成を追加して鍵K1 を保存するようにしてもよい。 Note that the memory 155 and the memory 175 may have the same configuration as the memory 55 shown in FIGS. Although not shown, the key K 1 may be stored by adding the configuration shown in FIGS. 26 and 28 to FIGS. 16, 18, 22, and 24.

また、図26のメモリ55とメモリ155とは、同一の動作をするので、1つのメモリに統合してもよい。また、図28のメモリ75とメモリ175とは、同一の動作をするので、1つのメモリに統合してもよい。   Further, since the memory 55 and the memory 155 in FIG. 26 operate in the same manner, they may be integrated into one memory. Further, since the memory 75 and the memory 175 of FIG. 28 operate in the same manner, they may be integrated into one memory.

以上のように、この実施の形態に係る復号装置は、1つ以上のブロックデータCi (i=1,2,3,・・・,m)からなる第1の処理データ(暗号文C)と、1つ以上のブロックデータDj(j=1,2,3,・・・,n)からなる第2の処理データ(暗号文D)との復号処理をする復号装置において、復号処理の状態を記憶するメモリ75を備え、第1の処理データの全ブロックデータ(C1〜Cm )の復号処理が完了する前に第2の処理データの最初のブロックデータD1 の復号処理を開始するとともに、第2の処理データの最初のブロックデータD1の復号処理を開始する場合に第1の処理データの復号処理の状態を上記メモリに記憶させ、第1の処理データの復号処理を再開する場合に復号装置の復号処理の状態をメモリ75に記憶した第1の処理データの復号処理の状態に復帰させてから第1の処理データの復号処理を再開することを特徴とする。 As described above, the decryption apparatus according to this embodiment has the first processing data (ciphertext C) composed of one or more block data C i (i = 1, 2, 3,..., M). And a decryption device that decrypts the second processing data (ciphertext D) composed of one or more block data D j (j = 1, 2, 3,..., N). A memory 75 for storing the state is provided, and the decoding process of the first block data D 1 of the second processing data is started before the decoding processing of all the block data (C 1 to C m ) of the first processing data is completed. In addition, when the decoding process of the first block data D 1 of the second processing data is started, the state of the decoding process of the first processing data is stored in the memory, and the decoding process of the first processing data is resumed. The state of the decoding process of the decoding device is stored in the memory The decoding processing of the first processing data is resumed after the state is restored to the state of the decoding processing of the first processing data.

また、上記復号装置は、第2の処理データの全ブロックデータ(D1 〜Dn )の復号処理の完了する前に第1の処理データの復号処理を再開するとともに、上記メモリ74は、第1の処理データの復号処理を再開する場合に第2の処理データの復号処理の状態を記憶し、第2の処理データの復号処理を再開する場合は、復号装置の復号処理の状態をメモリに記憶した第2の処理データの復号処理の状態に復帰させてから第2の処理データの復号処理を再開することを特徴とする。 The decoding apparatus resumes the decoding process of the first process data before the decoding process of all the block data (D 1 to D n ) of the second process data is completed, and the memory 74 The state of the decoding process of the second process data is stored when the decoding process of the first process data is restarted, and the state of the decoding process of the decoding device is stored in the memory when the decoding process of the second process data is restarted The decoding process of the second process data is resumed after returning to the state of the decoding process of the stored second process data.

ここで、暗号化処理の状態とは、例えば、
図1のCBCモードでは、暗号化ブロックデータCi (及び鍵K1
図16のOFBモードでは、モジュール出力データTi (及び鍵K1
図18のCFBモードでは、暗号化ブロックデータCi (及び鍵K1
のことであり、また、復号処理の状態とは、例えば、
図20のCBCモードでは、暗号化ブロックデータCi (及び鍵K1
図22のOFBモードでは、モジュール出力データTi (及び鍵K1
図24のCFBモードでは、暗号化ブロックデータCi (及び鍵K1
のことである。
Here, the state of the encryption process is, for example,
In the CBC mode of FIG. 1, the encrypted block data C i (and key K 1 )
In the OFB mode of FIG. 16, module output data T i (and key K 1 )
In the CFB mode of FIG. 18, the encrypted block data C i (and key K 1 )
In addition, the state of the decoding process is, for example,
In the CBC mode of FIG. 20, the encrypted block data C i (and key K 1 )
In the OFB mode of FIG. 22, module output data T i (and key K 1 )
In the CFB mode of FIG. 24, the encrypted block data C i (and key K 1 )
That is.

前述した説明においては、3つのモードの場合の暗号化装置と復号装置を説明したが、前述した3つのモードは一例であり、これらのモードの改良されたもの、或いは、これらのモードが変形されたものであっても構わない。特に、特徴となる点は、先のブロックデータが暗号化復号されたときに生成されたブロックデータCi 又はMi 又はTi が次のブロックデータMi+1又はCi+1 の暗号化復号処理にフィードバックデータとして用いられる暗号化復号方法において、暗号化復号の状態を記憶するメモリ55を設け、他のデータの暗号化復号化の処理後にブロックデータCi又はMi 又はTi を用いて再び元の状態に復帰可能にできる点である。従って、特に暗号化モード、復号モードは問わない。 In the above description, the encryption device and the decryption device in the case of the three modes have been described. However, the above three modes are examples, and these modes are improved or these modes are modified. It may be a thing. In particular, the feature is that the block data C i or M i or T i generated when the previous block data is encrypted or decrypted is the encryption of the next block data M i + 1 or C i + 1 . In an encryption / decryption method used as feedback data for decryption processing, a memory 55 for storing the state of encryption / decryption is provided, and block data C i, M i, or T i is used after encryption / decryption processing of other data. It is possible to return to the original state again. Therefore, the encryption mode and the decryption mode are not particularly limited.

なお、割り込みITを用いず、ポーリング方式やトークン取得方式等の他のメカニズムを用いて暗号化要求を受け付け、2以上の暗号化復号処理のインタラクティブな並列処理を行うようにしてもよい。   Note that, instead of using the interrupt IT, an encryption request may be received using another mechanism such as a polling method or a token acquisition method, and interactive parallel processing of two or more encryption / decryption processes may be performed.

また、暗号鍵Kを用いる暗号化復号処理の場合を示したが、暗号鍵Kを用いない暗号化復号処理の場合でもよい。   Further, although the case of the encryption / decryption process using the encryption key K has been shown, the case of the encryption / decryption process not using the encryption key K may be used.

実施の形態2.
この実施の形態においては、暗号化装置が秘匿処理とデータの完全性保証処理を行う場合について説明する。
Embodiment 2. FIG.
In this embodiment, a case will be described in which the encryption apparatus performs a concealment process and a data integrity guarantee process.

データの秘匿処理とは、データを暗号化し、データが盗聴されても、或いは、盗まれても意味が分からなくすることである。また、データの完全性保証とは、データが何者かにより置き換えられていることがないことを保証することをいう。データを伝送する場合には、データの秘匿処理を行った上にデータの完全性を保証して伝送したい場合がある。データの秘匿処理は、データを暗号化することにより行われる。データの完全性保証処理は、データの最後に認証子(MAC:Message Authentication Code)を付加し、その認証子を検証することにより改竄を発見することにより行われる。   The data concealment process is to encrypt data so that the meaning is not understood even if the data is wiretapped or stolen. The data integrity guarantee means that data is not replaced by anyone. When data is transmitted, there is a case where it is desired to perform data concealment processing and guarantee data integrity. The data concealment process is performed by encrypting the data. The data integrity guarantee process is performed by adding an authenticator (MAC: Message Authentication Code) to the end of the data and verifying the authenticator to find falsification.

図29は、OFBモードの暗号化部100により秘匿処理を行い、CBCモードの認証子生成部200により認証子(MAC)を生成する場合を示している。   FIG. 29 shows a case where the encryption process is performed by the encryption unit 100 in the OFB mode and the authentication code (MAC) is generated by the authentication code generation unit 200 in the CBC mode.

図29は、1つ以上の平文ブロックデータからなる平文を暗号化モジュール51により暗号文にし、暗号文に対して暗号文の完全性を保証するための認証子を生成する暗号化装置において、平文ブロックデータを暗号化モジュール51により暗号化したときに暗号化モジュール51が出力したモジュール出力ブロックデータTiを暗号化モジュール51へ暗号化モジュールへフィードバックする第1のフィードバックループ65を有し、平文ブロックデータを入力し、第1のフィードバックループ65によりモジュール出力ブロックデータTiをフィードバックさせ暗号化処理を行い、暗号文ブロックデータCi を出力する暗号化部100と、認証子演算途中結果Tiをフィードバックする第2のフィードバックループ66を有し、暗号化部100から暗号文ブロックデータCi が出力されるたびに暗号文ブロックデータCiを入力し、認証子演算処理を行い、第2のフィードバックループ66により認証子演算途中結果Ti をフィードバックさせ、暗号文の完全性を保証するための認証子Pを生成する認証子生成部200とを備えたことを特徴とする。 FIG. 29 shows a plaintext in an encryption device that generates plaintext composed of one or more plaintext block data by the encryption module 51 and generates an authenticator for guaranteeing the integrity of the encrypted text. A first feedback loop 65 for feeding back the module output block data T i output from the encryption module 51 when the block data is encrypted by the encryption module 51 to the encryption module 51 to the encryption module; enter the data, by the first feedback loop 65 performs the encryption process is fed back to the module output block data T i, an encryption unit 100 for outputting the ciphertext block data C i, the authenticator intermediate computation result T i The encryption unit 1 has a second feedback loop 66 for feedback. 0 Enter the ciphertext block data C i each time a ciphertext block data C i is output from, performs authenticator processing, is fed back to the authenticator intermediate computation result T i by the second feedback loop 66, encryption An authenticator generation unit 200 that generates an authenticator P for guaranteeing sentence integrity is provided.

図30は、図29に示す暗号化装置の動作手順を示す図である。   FIG. 30 is a diagram showing an operation procedure of the encryption apparatus shown in FIG.

平文ブロックデータM1 が、まず暗号文ブロックデータC1 に暗号化される。次に、平文ブロックデータM2が入力され、暗号文ブロックデータC2 に暗号化される。この平文ブロックデータM2 の暗号化と同じ時刻に暗号文ブロックデータC1が入力され、認証子の演算が始まる。時刻T1とT2の間に平文ブロックデータM2 の暗号化と暗号文ブロックデータC1 に基づく認証子演算が行われる。また、時刻T2とT3の間では、平文ブロックデータM3の暗号化と暗号文ブロックデータC2 に基づく認証子の演算が行われる。時刻T3においては、暗号文ブロックデータC3 に基づく認証子の演算が行われ、認証子Pが出力される。 The plaintext block data M 1 is first encrypted into ciphertext block data C 1 . Next, plaintext block data M 2 is input and encrypted into ciphertext block data C 2 . The ciphertext block data C 1 is input at the same time as the encryption of the plaintext block data M 2 and the operation of the authenticator starts. Time T1 and encryption of the plaintext block data M 2 between T2 and authenticator based on the ciphertext block data C 1 operation is performed. Further, between the times T2 and T3, the calculation of the encryption of the plaintext block data M 3 and the authenticator based on the ciphertext block data C 2 are performed. At time T3, operation authenticator based on the ciphertext block data C 3 is performed and authenticator P is output.

図29で特徴となる点は、排他的論理和回路58から出力される暗号文ブロックデータCi がフィードライン69により排他的論理和回路59に入力されている点である。フィードライン69によりOFBモードとCBCモードの暗号化処理を結合することにより、図30に示すように、秘匿処理と完全性認証処理がパイプライン処理で実行される。図52に示した場合は、時刻T6で処理時間がかかったが、図30の場合は、時刻T4で処理が終了して高速処理が行われたことになる。 The feature of FIG. 29 is that the ciphertext block data C i output from the exclusive OR circuit 58 is input to the exclusive OR circuit 59 through the feed line 69. By combining the encryption processing in the OFB mode and the CBC mode through the feed line 69, the concealment processing and the integrity authentication processing are executed by pipeline processing as shown in FIG. In the case shown in FIG. 52, it took a processing time at time T6, but in the case of FIG. 30, the processing is completed at time T4 and high-speed processing is performed.

図31は、図29に示した暗号化装置の動作フローチャート図である。   FIG. 31 is an operation flowchart of the encryption apparatus shown in FIG.

S51において、ブロックデータカウンタiを1とする。S52は、暗号化部100の動作であり、暗号化部100は、平文ブロックデータMi を入力して平文ブロックデータMiを暗号化し、暗号文ブロックデータCi を生成して暗号文ブロックデータCi を出力する。S53は、認証子生成部200の動作であり、暗号文ブロックデータCiを入力し暗号文ブロックデータCi を暗号化し、認証子を演算する。S54は、ブロックデータカウンタiが最後のブロックデータnを示しているかどうかを判断し、最後のブロックデータでない場合には、S55において、ブロックデータカウンタiを増加させ、再びS52の処理に戻る。即ち、暗号化部100と認証子生成部200の処理を繰り返す。S54において、最後のブロックデータの処理が終了した場合には、S53で演算された直前の認証子が最終的な認証子であるから、S56において、その認証子を暗号文ブロックデータCiの最後に付加する。図31に示すように、暗号化部100が暗号文ブロックデータCi を生成するたびに、認証子生成部200が暗号文ブロックデータCiを入力して認証子を演算することによりパイプライン処理が可能になり、高速処理が行われる。 In S51, the block data counter i is set to 1. S52 is the operation of the encryption unit 100, encryption unit 100, the plaintext block data M i enter the encrypting plaintext block data M i, the ciphertext block data to generate ciphertext block data C i C i is output. S53 is an operation of the authenticator generation unit 200, which inputs the ciphertext block data C i , encrypts the ciphertext block data C i , and calculates the authenticator. In S54, it is determined whether or not the block data counter i indicates the last block data n. If it is not the last block data, the block data counter i is incremented in S55, and the process returns to S52 again. That is, the processes of the encryption unit 100 and the authenticator generation unit 200 are repeated. In S54, the end of the case where the processing of the block data is completed, since authenticator immediately before is computed in S53 is the final authenticators, at S56, the authenticator of the ciphertext block data C i last Append to As shown in FIG. 31, every time the encryption unit 100 generates the ciphertext block data C i , the authenticator generation unit 200 inputs the ciphertext block data C i and calculates the authenticator, thereby performing pipeline processing. And high-speed processing is performed.

図32は、図29に示した暗号化部100と認証子生成部200をあわせたものである。即ち、暗号化部100と認証子生成部200の暗号化モジュール51を兼用し、また、暗号化部100と認証子生成部200の排他的論理和回路58と59を兼用したものである。更には、暗号化部100のフィードバックライン65と認証子生成部200のフィードバックライン66を兼用したものである。   FIG. 32 is a combination of the encryption unit 100 and the authenticator generation unit 200 shown in FIG. That is, the encryption unit 100 and the authenticator generation unit 200 are also used as the encryption module 51, and the encryption unit 100 and the authenticator generation unit 200 are also used as the exclusive OR circuits 58 and 59. Furthermore, the feedback line 65 of the encryption unit 100 and the feedback line 66 of the authenticator generation unit 200 are combined.

第1セレクタ61は、秘匿処理の開始時にイニシャルバリューIVを選択するものである。第2セレクタ62は、完全性保証処理の開始時にイニシャルバリューIVを選択するものである。第3セレクタ63は、秘匿処理と完全性保証処理を交互に選択するものである。第3セレクタ63は入力をEにすることにより、秘匿処理を行わせることができる。また、第3セレクタ63は入力をFにすることにより、完全性保証処理を行わせることができる。   The first selector 61 selects the initial value IV at the start of the concealment process. The second selector 62 selects the initial value IV at the start of the integrity guarantee process. The third selector 63 selects the concealment process and the integrity guarantee process alternately. The third selector 63 can perform the concealment process by setting the input to E. In addition, the third selector 63 can perform integrity guarantee processing by setting the input to F.

メモリ93は、暗号鍵Kを用いた暗号化モジュール51から出力されたモジュール出力データTi を記録するものである。メモリ93は、入力スイッチ96と出力スイッチ97と第1レジスタ98と第2レジスタ99により構成されている。入力スイッチ96と出力スイッチ97は、第3セレクタ63の切り替えと同期しており、第3セレクタ63が切り替わるたびに入力スイッチ96及び出力スイッチ97も切り替わる。 Memory 93 is to record the module output data T i output from the encrypting module 51 using the encryption key K. The memory 93 includes an input switch 96, an output switch 97, a first register 98, and a second register 99. The input switch 96 and the output switch 97 are synchronized with the switching of the third selector 63, and the input switch 96 and the output switch 97 are switched each time the third selector 63 is switched.

図33は、図32に示す暗号化装置の動作手順を示す図である。   FIG. 33 is a diagram showing an operation procedure of the encryption apparatus shown in FIG.

時刻T0とT1の間で平文ブロックデータM1 の秘匿処理が行われる。秘匿処理の途中で生成されたモジュール出力データは、第1レジスタ98に記憶される。時刻T1とT2の間では、暗号文ブロックデータC1に基づく認証子の演算が行われる。完全性保証処理により生成された認証子演算途中結果は、第2レジスタ99に記憶される。次に、時刻T2とT3の間では、第1レジスタ98に記憶されたモジュール出力データと平文ブロックデータM2に基づいて平文ブロックデータM2 の秘匿処理が行われる。次に、時刻T3とT4の間では、第2レジスタ99に記憶された認証子中間演算結果と暗号文ブロックデータC2が入力され、認証子の演算が行われる。この動作を繰り返すことにより、秘匿処理と完全性認証処理が完了し、暗号文と認証子Pが出力される。図33に示す場合は、時刻T6までで処理が終了し、時間の短縮は図られていないが、図32に示すように、暗号鍵Kを用いた暗号化モジュール51と排他的論理和回路58とフィードバックライン67,68(フィードバックループ)が兼用されているので、回路規模を小さくすることができる。 Security processing of the plaintext block data M 1 between times T0 and T1 are performed. Module output data generated during the concealment process is stored in the first register 98. Between times T1 and T2, calculation of the authenticator based on the ciphertext block data C 1 are performed. The authenticator calculation intermediate result generated by the integrity guarantee process is stored in the second register 99. Next, between times T2 and T3, the plaintext block data M 2 is concealed based on the module output data and the plaintext block data M 2 stored in the first register 98. Then, between times T3 and T4, the authenticator intermediate calculation result and the ciphertext block data C 2 stored in the second register 99 is inputted, the calculation of the authenticator is carried out. By repeating this operation, the concealment process and the integrity authentication process are completed, and the ciphertext and the authenticator P are output. In the case shown in FIG. 33, the processing is completed by time T6 and the time is not shortened, but as shown in FIG. 32, the encryption module 51 using the encryption key K and the exclusive OR circuit 58 Since the feedback lines 67 and 68 (feedback loop) are also used, the circuit scale can be reduced.

図34は、OFBモードの復号化部300とCBCモードの認証子生成部400を有する復号装置を示す図である。   FIG. 34 is a diagram illustrating a decryption apparatus including the decryption unit 300 in the OFB mode and the authenticator generation unit 400 in the CBC mode.

この認証子生成部400は、認証子生成部200と同一構成のものである。   This authenticator generation unit 400 has the same configuration as that of the authenticator generation unit 200.

図34は、1つ以上の暗号文ブロックデータからなる暗号文を平文に復号し、かつ、暗号文に対して暗号文の完全性を確認するための認証子を生成する復号装置において、暗号文ブロックデータCiを復号モジュール71により復号したときに生成したモジュール出力ブロックデータTi をフィードバックする第1のフィードバックループ65を有し、暗号文ブロックデータCiを入力し、第1のフィードバックループ65によりモジュール出力ブロックデータTi をフィードバックさせ復号処理を行い、平文ブロックデータMiを出力する復号部300と、認証子演算途中結果Ti をフィードバックする第2のフィードバックループ66を有し、復号部300に入力される暗号文ブロックデータCiと同一の暗号文ブロックデータを入力し、認証子演算処理を行い認証子演算途中結果Ti を出力し、第2のフィードバックループ66により認証子演算途中結果Tiをフィードバックさせ、暗号文の完全性を確認するための認証子Qを生成する認証子生成部400とを備えたことを特徴とする。 FIG. 34 illustrates a ciphertext in a decryption device that decrypts a ciphertext composed of one or more ciphertext block data into plaintext and generates an authenticator for confirming the integrity of the ciphertext with respect to the ciphertext. It has a first feedback loop 65 that feeds back the module output block data T i generated when the block data C i is decrypted by the decryption module 71, receives the ciphertext block data C i , and receives the first feedback loop 65. The module output block data T i is fed back to perform decryption processing, the plaintext block data M i is output, and the decryption unit 300 has a second feedback loop 66 that feeds back the authenticator calculation intermediate result T i. enter the same ciphertext block data with the ciphertext block data C i input to the 300, certification Outputs authenticator intermediate computation result T i performs child processing, is fed back to the authenticator intermediate computation result T i by the second feedback loop 66, generates a authenticator Q to confirm the integrity of the ciphertext An authenticator generation unit 400 is provided.

暗号文ブロックデータCi は、復号化部300の排他的論理和回路78に入力されると同時に、フィードライン69により認証子生成部400に入力される。このような構成により、復号化部300と認証子生成部400の処理が同時並列実行され、処理速度が向上する。 The ciphertext block data C i is input to the exclusive OR circuit 78 of the decryption unit 300 and simultaneously input to the authenticator generation unit 400 through the feed line 69. With such a configuration, the processes of the decryption unit 300 and the authenticator generation unit 400 are simultaneously executed in parallel, and the processing speed is improved.

図35は、図34に示した復号装置の復号化部300と認証子生成部400を一体化したものである。   FIG. 35 integrates the decryption unit 300 and the authenticator generation unit 400 of the decryption apparatus shown in FIG.

図35は、暗号鍵Kを用いた復号モジュール71とフィードバックライン87,88(フィードバックループ)が兼用されている場合を示している。   FIG. 35 shows a case where the decryption module 71 using the encryption key K and the feedback lines 87 and 88 (feedback loop) are also used.

第1セレクタ81は、復号処理の開始時にイニシャルバリューIVを選択するものである。第2セレクタ82は、完全性保証処理の開始時にイニシャルバリューIVを選択するものである。第3セレクタ83は、復号処理と完全性保証処理を交互に選択するものである。第3セレクタ83は入力をEにすることにより、復号処理を行わせることができる。また、第3セレクタ83は入力をFにすることにより、完全性保証処理を行わせることができる。   The first selector 81 selects the initial value IV at the start of the decoding process. The second selector 82 selects the initial value IV at the start of the integrity guarantee process. The third selector 83 alternately selects the decoding process and the integrity guarantee process. The third selector 83 can perform the decoding process by setting the input to E. The third selector 83 can perform integrity guarantee processing by setting the input to F.

メモリ93は、暗号鍵Kを用いた暗号化モジュール51から出力されたモジュール出力データTi を記録するものである。メモリ93は、入力スイッチ96と出力スイッチ97と第1レジスタ98と第2レジスタ99により構成されている。入力スイッチ96と出力スイッチ97は、第3セレクタ83の切り替えと同期しており、第3セレクタ83が切り替わるたびに入力スイッチ96及び出力スイッチ97も切り替わる。 Memory 93 is to record the module output data T i output from the encrypting module 51 using the encryption key K. The memory 93 includes an input switch 96, an output switch 97, a first register 98, and a second register 99. The input switch 96 and the output switch 97 are synchronized with the switching of the third selector 83, and the input switch 96 and the output switch 97 are switched each time the third selector 83 is switched.

図36は、図35に示した復号装置の動作手順を示す図である。   FIG. 36 is a diagram showing an operation procedure of the decoding apparatus shown in FIG.

復号装置は、暗号文と認証子Pを入力する。   The decryption device inputs the ciphertext and the authenticator P.

時刻T0とT1の間で暗号文ブロックデータC1 の復号処理と暗号文ブロックデータC1 のレジスタ111への保存が行われる。復号処理の途中で生成されたモジュール出力データは、第1レジスタ98に記憶される。時刻T1とT2の間では、レジスタ111に保存された暗号文ブロックデータC1に基づく認証子の演算が行われる。完全性保証処理により生成された認証子演算途中結果は、第2レジスタ99に記憶される。次に、時刻T2とT3の間では、暗号文ブロックデータC2がレジスタ111に保存され、第1レジスタ98に記憶されたモジュール出力データと暗号文ブロックデータC2 に基づいて平文ブロックデータM2の復号処理が行われる。次に、時刻T3とT4の間では、第2レジスタ99に記憶された認証子中間演算結果とレジスタ111に保存された暗号文ブロックデータC2が入力され、認証子の演算が行われる。この動作を繰り返すことにより、平文と認証子Qが出力される。この認証子Qは、認証子Pと比較され、認証子Pと認証子Qが一致していれば、データの完全性が認証できたことになる。これで、復号処理と完全性認証処理が完了する。 Saving to decoding the register 111 of the ciphertext block data C 1 of the ciphertext block data C 1 is carried out between the time T0 and T1. Module output data generated during the decoding process is stored in the first register 98. Between times T1 and T2, an authenticator is calculated based on the ciphertext block data C 1 stored in the register 111. The authenticator calculation intermediate result generated by the integrity guarantee process is stored in the second register 99. Then, between times T2 and T3, the ciphertext block data C 2 is stored in the register 111, the plaintext block data M 2 on the basis of the stored module output data and the ciphertext block data C 2 to the first register 98 The decoding process is performed. Next, between times T3 and T4, the authenticator intermediate calculation result stored in the second register 99 and the ciphertext block data C 2 stored in the register 111 are input, and the authenticator is calculated. By repeating this operation, plaintext and authenticator Q are output. The authenticator Q is compared with the authenticator P. If the authenticator P and the authenticator Q match, the data integrity can be authenticated. This completes the decryption process and the integrity authentication process.

図37は、図29のOFBモードの暗号化部100をCBCモードの暗号化部100にしたものである。   FIG. 37 shows a case where the OFB mode encryption unit 100 of FIG. 29 is changed to a CBC mode encryption unit 100.

図37は、1つ以上の平文ブロックデータからなる平文を暗号文にし、暗号文に対して暗号文の完全性を保証するための認証子を生成する暗号化装置において、平文ブロックデータを暗号化ユニット52により暗号化したときに暗号化モジュール51が出力した暗号文ブロックデータCi をフィードバックする第1のフィードバックループ65を有し、平文ブロックデータMiを入力し、第1のフィードバックループ65により暗号文ブロックデータCi をフィードバックさせ暗号化処理を行い、暗号文ブロックデータCiを出力する暗号化部100と、認証子演算途中結果Ti をフィードバックする第2のフィードバックループ66を有し、暗号化部100から暗号文ブロックデータCiが出力されるたびに暗号文ブロックデータCi を入力し、認証子演算処理を行い、第2のフィードバックループ66により認証子演算途中結果Tiをフィードバックさせ、暗号文の完全性を保証するための認証子Pを生成する認証子生成部400とを備えたことを特徴とする。 FIG. 37 shows an example of encrypting plaintext block data in an encryption device that generates plaintext consisting of one or more plaintext block data as ciphertext and generates an authenticator for ensuring the integrity of the ciphertext. The first feedback loop 65 feeds back the ciphertext block data C i output from the encryption module 51 when encrypted by the unit 52, and the plaintext block data M i is input, and the first feedback loop 65 An encryption unit 100 that performs ciphertext block data C i feedback to perform ciphertext block data C i and outputs ciphertext block data C i ; and a second feedback loop 66 that feeds back an authenticator computation intermediate result T i ; enter the ciphertext block data C i each time a ciphertext block data C i from the encrypting unit 100 is output Performs authenticator processing, is fed back to the authenticator intermediate computation result T i by the second feedback loop 66, and a authenticator generating unit 400 that generates the authenticator P to ensure the integrity of the ciphertext It is characterized by that.

図38は、図34のOFBモードの復号部300をCBCモードの復号部300にしたものである。   FIG. 38 is obtained by changing the OFB mode decoding unit 300 of FIG. 34 to a CBC mode decoding unit 300.

図38は、1つ以上の暗号文ブロックデータからなる暗号文を平文に復号し、かつ、暗号文に対して暗号文の完全性を確認するための認証子を生成する復号装置において、暗号文ブロックデータCi をフィードバックする第1のフィードバックループ85,82を有し、暗号文ブロックデータCiを入力し、第1のフィードバックループ85,82により暗号文ブロックデータCi をフィードバックさせ復号処理を行い、平文ブロックデータMiを出力する復号部300と、認証子演算途中結果Ti をフィードバックする第2のフィードバックループ66を有し、復号部300に入力される暗号文ブロックデータCiと同一の暗号文ブロックデータCi を入力し、認証子演算処理を行い認証子演算途中結果Ti を出力し、第2のフィードバックループにより認証子演算途中結果Tiをフィードバックさせ、暗号文の完全性を確認するための認証子Qを生成する認証子生成部400とを備えたことを特徴とする。 FIG. 38 shows a ciphertext in a decryption device that decrypts a ciphertext composed of one or more ciphertext block data into a plaintext and generates an authenticator for confirming the integrity of the ciphertext with respect to the ciphertext. having a first feedback loop 85,82 for feeding back the block data C i, and inputs the ciphertext block data C i, the first feedback loop 85,82 decoding by feeding back the ciphertext block data C i The decryption unit 300 that outputs the plaintext block data M i and the second feedback loop 66 that feeds back the authenticator calculation intermediate result T i , and is the same as the ciphertext block data C i input to the decryption unit 300 Ciphertext block data C i is input, authenticator calculation processing is performed, and an authenticator calculation intermediate result T i is output. It is fed back to the authenticator intermediate computation result T i by flop, characterized by comprising an authentication code generation unit 400 for generating the authenticator Q to confirm the integrity of the ciphertext.

以上のように、図29,図37は、データを入力して暗号化し、暗号データを出力する暗号化部と、暗号化部が出力した暗号データを入力して暗号文の完全性を保証するための認証子を生成する認証子生成部とを備え、認証子生成部は、暗号化部によるデータの暗号化が完了する前に認証子の生成を開始することを特徴とする暗号化装置を示している。   As described above, in FIGS. 29 and 37, data is input and encrypted, and an encryption unit that outputs encrypted data and encrypted data output by the encryption unit are input and the integrity of the ciphertext is guaranteed. An authenticator generating unit for generating an authenticator for the authentication, and the authenticator generating unit starts generating the authenticator before the encryption of data by the encryption unit is completed. Show.

また、図34,図38は、データを入力して復号し、復号データを出力する復号部と、復号部が入力したデータを入力して暗号文の完全性を保証するための認証子を生成する認証子生成部とを備え、認証子生成部は、復号部によるデータの復号が完了する前に認証子の生成を開始することを特徴とする復号装置を示している。   34 and 38 show a decryption unit that inputs and decrypts data and outputs the decrypted data, and generates an authenticator that inputs the data input by the decryption unit and guarantees the integrity of the ciphertext. An authenticator generation unit is provided, and the authenticator generator starts generation of an authenticator before decoding of data by the decryption unit is completed.

なお、図示していないが、OFBモードの暗号化部100又は復号部300を用いてもよい。   Although not shown, the OFB mode encryption unit 100 or decryption unit 300 may be used.

また、図示していないが、OFBモード又はCFBモードの認証子生成部200を用いてもよい。   Although not shown, the authenticator generation unit 200 in the OFB mode or the CFB mode may be used.

図39は、暗号化モジュール51又は復号モジュール71の構成図である。   FIG. 39 is a configuration diagram of the encryption module 51 or the decryption module 71.

暗号化モジュール51は、鍵スケジュール部511とデータランダマイズ部512を有している。鍵スケジュール部511は、1つの鍵Kを入力してn個の拡大鍵ExtK1 〜ExtKn を生成する。データランダマイズ部512は、関数FとXOR回路とにより乱数を発生させる。関数Fは、拡大鍵を入力して非線形データ変換を行う。 The encryption module 51 includes a key schedule unit 511 and a data randomization unit 512. The key schedule unit 511 inputs one key K and generates n expanded keys ExtK 1 to ExtK n . The data randomizing unit 512 generates a random number using the function F and the XOR circuit. The function F performs non-linear data conversion by inputting an expanded key.

上記暗号化装置の暗号モジュール51においては、例えば、
(1)DES(Data Encryption Standard)、又は、
(2)国際公開番号WO97/9705(米国特許出願番号08/83640)に開示されたブロック暗号アルゴリズムであるMISTY、又は、
(3)上記ブロック暗号アルゴリズムMISTYをベースとした64ビットブロック暗号であり、次世代携帯電話用国際標準暗号(IMT2000)として採用されることが決定されたブロック暗号アルゴリズムであるKASUMI(詳細は、http://www.3gpp.org/About_3GPP/3gpp.htmを参照のこと)、又は、
(4)日本特許出願番号2000−64614(出願日2000年3月9日)に記載されたブロック暗号アルゴリズムであるCamellia
などのブロック暗号アルゴリズムを用いることができる。また、上記復号装置の復号モジュール71においても、DES、MISTY、KASUMI又はCamelliaなどのブロック暗号アルゴリズムを用いることができる。
In the encryption module 51 of the encryption device, for example,
(1) DES (Data Encryption Standard), or
(2) MISTY, which is a block cipher algorithm disclosed in International Publication No. WO 97/9705 (US Patent Application No. 08/83640), or
(3) KASUMI (which is a block cipher algorithm which is a 64-bit block cipher based on the block cipher algorithm MISTY and which has been decided to be adopted as an international standard cipher (IMT2000) for next-generation mobile phones). //Www.3gpp.org/About_3GPP/3gpp.html), or
(4) Camellia, a block cipher algorithm described in Japanese Patent Application No. 2000-64614 (filing date: March 9, 2000)
A block cipher algorithm such as can be used. The decryption module 71 of the decryption apparatus can also use a block cipher algorithm such as DES, MISTY, KASUMI, or Camellia.

図40は、前述した暗号化装置又は復号装置の実装形式を示す図である。   FIG. 40 is a diagram illustrating a mounting format of the above-described encryption device or decryption device.

図40は、FPGA又はIC又はLSIの中に前述した暗号化装置及び復号装置が実現されている場合を示している。即ち、前述した暗号化装置及び復号装置は、ハードウェアで実現することができる。また、図示していないが、プリントサーキットボードにより実現することも可能である。   FIG. 40 shows a case where the above-described encryption device and decryption device are implemented in an FPGA, IC, or LSI. That is, the above-described encryption device and decryption device can be realized by hardware. Although not shown, it can be realized by a printed circuit board.

図41は、前述した暗号化装置及び復号装置をソフトウェアで実現する場合を示している。   FIG. 41 shows a case where the above-described encryption device and decryption device are realized by software.

前述した暗号化装置は、暗号化プログラム47で実現することができる。暗号化プログラム47は、ROM(Read Only Memory)42(記録媒体の一例)に記憶されている。暗号化プログラム47は、RAM(Random Access Memory)又はフレキシブルディスク又は固定ディスク等の他の記録媒体に記録されていてもよい。また、暗号化プログラム47は、サーバコンピュータからダウンロードされてもよい。暗号化プログラム47は、サブルーチンとして機能する。暗号化プログラム47は、RAM45に記憶されたアプリケーションプログラム46からサブルーチンコールにより呼び出されて実行される。或いは、暗号化プログラム47は、割り込み制御部43で受け付ける割り込みの発生により起動されるようにしても構わない。メモリ55は、RAM45の一部であっても構わない。アプリケーションプログラム46、暗号化プログラム47は、CPU41により実行されるプログラムである。   The encryption apparatus described above can be realized by the encryption program 47. The encryption program 47 is stored in a ROM (Read Only Memory) 42 (an example of a recording medium). The encryption program 47 may be recorded on a RAM (Random Access Memory) or another recording medium such as a flexible disk or a fixed disk. The encryption program 47 may be downloaded from a server computer. The encryption program 47 functions as a subroutine. The encryption program 47 is called and executed by a subroutine call from the application program 46 stored in the RAM 45. Alternatively, the encryption program 47 may be activated upon occurrence of an interrupt received by the interrupt control unit 43. The memory 55 may be a part of the RAM 45. The application program 46 and the encryption program 47 are programs executed by the CPU 41.

図42は、アプリケーションプログラム46が暗号化プログラム47を呼び出すメカニズムを示している。   FIG. 42 shows a mechanism by which the application program 46 calls the encryption program 47.

アプリケーションプログラム46は、鍵KとイニシャルバリューIVと平文Mと暗号文Cをパラメータにして暗号化プログラム47を呼び出す。暗号化プログラム47は、鍵KとイニシャルバリューIVと平文Mを入力し、暗号文Cを返すものである。暗号化プログラム47と復号プログラムが同一のときは、鍵KとイニシャルバリューIVと暗号文Cと平文Mをパラメータにして暗号化プログラム47を呼び出す。   The application program 46 calls the encryption program 47 using the key K, initial value IV, plaintext M, and ciphertext C as parameters. The encryption program 47 inputs the key K, the initial value IV, and the plaintext M, and returns the ciphertext C. When the encryption program 47 and the decryption program are the same, the encryption program 47 is called using the key K, initial value IV, ciphertext C, and plaintext M as parameters.

また、図示しないが、暗号化プログラム47は、デジタルシグナルプロセッサと、そのデジタルシグナルプロセッサにより読み込まれて実行されるプログラムによって実現しても構わない。即ち、ハードウェアとソフトウェアの組み合わせによって暗号化プログラム47を実現しても構わない。   Although not shown, the encryption program 47 may be realized by a digital signal processor and a program read and executed by the digital signal processor. That is, the encryption program 47 may be realized by a combination of hardware and software.

図40,図41,図42は、主として、暗号化装置の場合を説明したが、復号装置でも同様の方式で実現できる。   40, 41, and 42 have mainly described the case of the encryption device, but the decryption device can also be realized by the same method.

図40及び図41に示したような暗号化装置及び復号装置は、電子機器に対してインストールすることができる。例えば、パーソナルコンピュータやファクシミリ装置や携帯電話やビデオカメラやデジタルカメラやテレビカメラ等のあらゆる電子機器にインストールすることができる。特に、この実施の形態における特徴が発揮できるのは、複数のチャネルからのデータを暗号化復号する場合に有効である。或いは、複数のユーザからのデータがアットランダムに到着して復号する場合に、或いは、複数のユーザに対するデータがアットランダムに発生して、それぞれのデータをリアルタイムに暗号化するような場合に有効である。即ち、暗号化復号するデータの数に比べて暗号化復号する装置の数が少ない場合に、前述した実施の形態の暗号化装置、復号装置が非常に有効である。例えば、多くのクライアントコンピュータをサポートしなければならないサーバコンピュータや多くの携帯電話機からのデータを集配しなければならない基地局や回線コントローラなどに、前述した暗号化装置や復号装置が非常に有効である。   The encryption device and the decryption device as shown in FIGS. 40 and 41 can be installed in the electronic device. For example, it can be installed in any electronic device such as a personal computer, a facsimile machine, a mobile phone, a video camera, a digital camera, or a television camera. In particular, the feature of this embodiment can be exhibited when data from a plurality of channels is encrypted and decrypted. Alternatively, it is effective when data from multiple users arrives at random and decrypts, or when data for multiple users occurs at random and each data is encrypted in real time. is there. That is, when the number of encryption / decryption devices is smaller than the number of data to be encrypted / decrypted, the encryption device and the decryption device of the above-described embodiment are very effective. For example, the encryption device and the decryption device described above are very effective for server computers that must support many client computers and base stations and line controllers that must collect and deliver data from many mobile phones. .

なお、暗号化処理同士及び復号処理同士の並列処理でなく、暗号化処理と復号処理との並列処理を行うようにしてもよい。   In addition, you may make it perform the parallel process of an encryption process and a decoding process instead of the parallel process of encryption processes and decryption processes.

また、OFBモードの暗号化部(又は復号化部)とCBCモードの認証子生成部との組み合わせの場合を示したが、OFBモードとCBCモードとCFBモードとこれらのモードの改良モードとその他のモードとのいずれのモードの組み合わせでも構わない。   Moreover, although the case of the combination of the encryption unit (or decryption unit) in OFB mode and the authenticator generation unit in CBC mode has been shown, OFB mode, CBC mode, CFB mode, improved modes of these modes, and other modes Any combination of modes may be used.

また、認証子生成部が、暗号鍵Kを用いた暗号化を行う場合を示したが、認証子生成部は、データの攪拌や演算やその他のデータ処理を行う場合であっても構わない。   Further, although the case where the authenticator generation unit performs encryption using the encryption key K has been shown, the authenticator generation unit may perform data agitation, calculation, and other data processing.

実施の形態1のCBCモードの暗号化装置を示す図。3 is a diagram showing a CBC mode encryption apparatus according to Embodiment 1. FIG. CBCモードの暗号化装置の動作手順を示す図。The figure which shows the operation | movement procedure of the encryption apparatus of CBC mode. CBCモードの暗号化装置の動作フローチャート図。The operation | movement flowchart figure of the encryption apparatus of CBC mode. セレクタ54の動作フローチャート図。The operation | movement flowchart figure of the selector 54. FIG. スイッチ57の割り込み処理フローチャート図。FIG. 14 is a flowchart of interrupt processing of the switch 57. メモリ55の他の例を示す図。The figure which shows the other example of the memory 55. FIG. メモリ55の割り込み処理フローチャート図。The interrupt process flowchart figure of the memory 55. FIG. メモリ55の他の例を示す図。The figure which shows the other example of the memory 55. FIG. 優先度処理を示す図。The figure which shows a priority process. 優先度処理を示す図。The figure which shows a priority process. 優先度処理を示す図。The figure which shows a priority process. メモリ55がフィードバックライン66と並列に設けられている図。The figure in which the memory 55 is provided in parallel with the feedback line 66. 図12の暗号化装置の動作手順を示す図。The figure which shows the operation | movement procedure of the encryption apparatus of FIG. メモリ55がフィードバックライン67に並列に設けられている図。The figure in which the memory 55 is provided in parallel with the feedback line 67. 図14の暗号化装置の動作手順を示す図。The figure which shows the operation | movement procedure of the encryption apparatus of FIG. OFBモードの暗号化装置を示す図。The figure which shows the encryption apparatus of OFB mode. 図16の暗号化装置の動作手順を示す図。The figure which shows the operation | movement procedure of the encryption apparatus of FIG. CFBモードの暗号化装置を示す図。The figure which shows the encryption apparatus of CFB mode. 図18の暗号化装置の動作手順を示す図。The figure which shows the operation | movement procedure of the encryption apparatus of FIG. CBCモードの復号装置を示す図。The figure which shows the decoding apparatus of CBC mode. 図20の復号装置の動作手順を示す図。The figure which shows the operation | movement procedure of the decoding apparatus of FIG. OFBモードの復号装置を示す図。The figure which shows the decoding apparatus of OFB mode. 図22の復号装置の動作手順を示す図。The figure which shows the operation | movement procedure of the decoding apparatus of FIG. CFBモードの復号装置を示す図。The figure which shows the decoding apparatus of CFB mode. 図24の復号装置の動作手順を示す図。The figure which shows the operation | movement procedure of the decoding apparatus of FIG. 鍵を保存するCBCモードの暗号化装置を示す図。The figure which shows the encryption apparatus of the CBC mode which preserve | saves a key. CBCモードの暗号化装置の動作手順を示す図。The figure which shows the operation | movement procedure of the encryption apparatus of CBC mode. 鍵を保存するCBCモードの復号装置を示す図。The figure which shows the decoding apparatus of the CBC mode which preserve | saves a key. 実施の形態2の暗号化部100と認証子生成部200を有する暗号化装置を示す図。FIG. 4 is a diagram illustrating an encryption apparatus having an encryption unit 100 and an authenticator generation unit 200 according to the second embodiment. 暗号化部100と認証子生成部200を有する暗号化装置の動作手順を示す図。The figure which shows the operation | movement procedure of the encryption apparatus which has the encryption part 100 and the authenticator production | generation part 200. FIG. 暗号化部100と認証子生成部200を有する暗号化装置のフローチャート図。The flowchart figure of the encryption apparatus which has the encryption part 100 and the authenticator production | generation part 200. 暗号化部100と認証子生成部200を1つにした暗号化装置を示す図。The figure which shows the encryption apparatus which made the encryption part 100 and the authenticator production | generation part 200 into one. 暗号化部100と認証子生成部200を1つにした暗号化装置の動作手順を示す図。The figure which shows the operation | movement procedure of the encryption apparatus which made the encryption part 100 and the authenticator production | generation part 200 into one. 復号化部300と認証子生成部400を有する復号装置を示す図。The figure which shows the decoding apparatus which has the decoding part 300 and the authenticator production | generation part 400. FIG. 復号化部300と認証子生成部400を1つにした復号装置を示す図。The figure which shows the decoding apparatus which combined the decoding part 300 and the authenticator production | generation part 400 into one. 復号化部300と認証子生成部400を1つにした復号装置の動作手順を示す図。The figure which shows the operation | movement procedure of the decoding apparatus which combined the decoding part 300 and the authenticator production | generation part 400 into one. 実施の形態2の暗号化部100と認証子生成部200を有する暗号化装置を示す図。FIG. 4 is a diagram illustrating an encryption apparatus having an encryption unit 100 and an authenticator generation unit 200 according to the second embodiment. 復号化部300と認証子生成部400を有する復号装置を示す図。The figure which shows the decoding apparatus which has the decoding part 300 and the authenticator production | generation part 400. FIG. 暗号鍵Kを用いた暗号化モジュール51の代表的構成図。The typical block diagram of the encryption module 51 using the encryption key K. FIG. 暗号化装置及び復号装置のハードウェア実現例を示す図。The figure which shows the hardware implementation example of an encryption apparatus and a decoding apparatus. 暗号化装置及び復号装置のハードウェア実現例を示す図。The figure which shows the hardware implementation example of an encryption apparatus and a decoding apparatus. アプリケーションプログラム46により暗号化プログラム47が呼び出される場合を示す図。The figure which shows the case where the encryption program 47 is called by the application program 46. FIG. 従来のCBCモードの暗号化装置を示す図。The figure which shows the encryption apparatus of the conventional CBC mode. 従来のCBCモードによる復号装置を示す図。The figure which shows the decoding apparatus by the conventional CBC mode. 従来のOFBモードの暗号化装置を示す図。The figure which shows the encryption apparatus of the conventional OFB mode. 従来のOFBモードによる復号装置を示す図。The figure which shows the decoding apparatus by the conventional OFB mode. 従来のCFBモードの暗号化装置を示す図。The figure which shows the encryption apparatus of the conventional CFB mode. 従来のCFBモードによる復号装置を示す図。The figure which shows the decoding apparatus by the conventional CFB mode. 従来の暗号化手順を示す図。The figure which shows the conventional encryption procedure. 従来の暗号化手順を示す図。The figure which shows the conventional encryption procedure. 秘匿処理と完全性保証処理を説明する図。The figure explaining a concealment process and an integrity guarantee process. 従来の秘匿処理と完全性保証処理の動作手順を示す図。The figure which shows the operation | movement procedure of the conventional secrecy process and an integrity guarantee process.

Claims (22)

1つ以上の平文ブロックデータからなる平文を暗号化ユニット暗号文にし、暗号文に対して暗号文の完全性を保証するための認証子を生成する暗号化装置において、
平文ブロックデータを暗号化ユニットにより暗号化したときに暗号化ユニットが出力した暗号文ブロックデータCi を暗号化ユニットへフィードバックする第1のフィードバックループを有し、平文ブロックデータを入力し、第1のフィードバックループにより暗号文ブロックデータCiをフィードバックさせ暗号化処理を行い、暗号文ブロックデータを出力する暗号化部と、
認証子演算途中結果をフィードバックする第2のフィードバックループを有し、暗号化部から暗号文ブロックデータが出力されるたびに暗号文ブロックデータを入力し、データ処理を行い、第2のフィードバックループにより認証子演算途中結果をフィードバックさせ、暗号文の完全性を保証するための認証子を生成する認証子生成部と
を備えたことを特徴とする暗号化装置。
In an encryption device that generates plaintext consisting of one or more plaintext block data as encrypted unit ciphertext and generates an authenticator for guaranteeing the integrity of the ciphertext with respect to the ciphertext,
A first feedback loop that feeds back the ciphertext block data C i output from the encryption unit to the encryption unit when the plaintext block data is encrypted by the encryption unit; An encryption unit that feeds back the ciphertext block data C i by performing a feedback loop and performs encryption processing;
It has a second feedback loop that feeds back the result of the authenticator calculation, inputs ciphertext block data every time ciphertext block data is output from the encryption unit, performs data processing, and uses the second feedback loop. An encryption device comprising: an authenticator generation unit that feeds back an intermediate result of an authenticator operation and generates an authenticator for guaranteeing the integrity of a ciphertext.
上記暗号化部と認証子生成部とは、1つの暗号化モジュールと、1つのフィードバックループとを兼用して暗号化処理と認証子生成処理とを交互に行うとともに、
上記1つのフィードバックループは、
暗号化処理と認証子生成処理との結果をそれぞれ記録し出力するメモリと、
暗号化処理と認証生成処理とを交互に実行するために、メモリから暗号化処理と認証子生成処理との結果を交互に選択して暗号化モジュールに出力するセレクタと
を備えたことを特徴とする請求項1記載の暗号化装置。
The encryption unit and the authenticator generation unit alternately perform an encryption process and an authenticator generation process using one encryption module and one feedback loop.
The one feedback loop is
A memory for recording and outputting the results of the encryption process and the authenticator generation process, and
A selector that alternately selects the result of the encryption process and the authenticator generation process from the memory and outputs the result to the encryption module in order to alternately execute the encryption process and the authentication generation process; The encryption device according to claim 1.
1つ以上の平文ブロックデータからなる平文を暗号化ユニットにより暗号文にし、暗号文に対して暗号文の完全性を保証するための認証子を生成する暗号化方法において、
平文ブロックデータを暗号化ユニットにより暗号化したときに暗号化ユニットが出力した暗号文ブロックデータCi を暗号化ユニットへフィードバックする第1のフィードバック工程を有し、平文ブロックデータを入力し、第1のフィードバックループにより暗号文ブロックデータCiをフィードバックさせ暗号化処理を行い、暗号文ブロックデータを出力する暗号化工程と、
認証子演算途中結果をフィードバックする第2のフィードバック工程を有し、暗号化工程から暗号文ブロックデータが出力されるたびに暗号文ブロックデータを入力し、データ処理を行い、第2のフィードバック工程により認証子演算途中結果をフィードバックさせ、暗号文の完全性を保証するための認証子を生成する認証子生成工程と
を備えたことを特徴とする暗号化方法。
In an encryption method for generating plaintext consisting of one or more plaintext block data into a ciphertext by an encryption unit and generating an authenticator for ensuring the integrity of the ciphertext with respect to the ciphertext,
A first feedback step of feeding back the ciphertext block data C i output from the encryption unit to the encryption unit when the plaintext block data is encrypted by the encryption unit; an encryption step of perform an encryption process is fed back the ciphertext block data C i, and outputs the ciphertext block data by the feedback loop,
A second feedback step for feeding back an intermediate result of the authenticator operation, ciphertext block data is input every time ciphertext block data is output from the encryption step, data processing is performed, and the second feedback step An encryption method comprising: an authenticator generation step of feeding back an intermediate result of an authenticator operation and generating an authenticator for guaranteeing the integrity of a ciphertext.
1つ以上の暗号文ブロックデータからなる暗号文を平文に復号し、かつ、暗号文に対して暗号文の完全性を確認するための認証子を生成する復号装置において、
復号モジュールによりデータを復号したときに生成したモジュール出力ブロックデータTi を復号モジュールへフィードバックする第1のフィードバックループを有し、暗号文ブロックデータを入力し、第1のフィードバックループによりモジュール出力ブロックデータTiをフィードバックさせ復号処理を行い、平文ブロックデータを出力する復号部と、
認証子演算途中結果をフィードバックする第2のフィードバックループを有し、復号部に入力される暗号文ブロックデータと同一の暗号文ブロックデータを入力し、データ処理を行い認証子演算途中結果を出力し、第2のフィードバックループにより認証子演算途中結果をフィードバックさせ、暗号文の完全性を確認するための認証子を生成する認証子生成部と
を備えたことを特徴とする復号装置。
In a decryption device that decrypts a ciphertext composed of one or more ciphertext block data into a plaintext and generates an authenticator for confirming the integrity of the ciphertext with respect to the ciphertext,
A first feedback loop that feeds back the module output block data T i generated when the data is decrypted by the decryption module to the decryption module, the ciphertext block data is input, and the module output block data is input by the first feedback loop; It is fed back to T i performs decoding processing, a decoding unit for outputting the plaintext block data,
It has a second feedback loop that feeds back the intermediate result of the authenticator operation, inputs the same ciphertext block data as the ciphertext block data input to the decryption unit, performs data processing, and outputs the intermediate result of the authenticator operation A decryption apparatus comprising: an authenticator generation unit that feeds back an intermediate result of an authenticator operation by a second feedback loop and generates an authenticator for confirming ciphertext integrity.
上記復号部と認証子生成部とは、1つの復号モジュールと、1つのフィードバックループとを兼用して復号処理と認証子生成処理とを交互に行うとともに、
上記1つのフィードバックループは、
復号処理と認証子生成処理との結果をそれぞれ記録し出力するメモリと、
復号処理と認証生成処理とを交互に実行するために、メモリから復号処理と認証子生成処理との結果を交互に選択して復号モジュールに出力するセレクタと
を備えたことを特徴とする請求項4記載の復号装置。
The decryption unit and the authenticator generation unit alternately perform a decryption process and an authenticator generation process using one decryption module and one feedback loop.
The one feedback loop is
A memory for recording and outputting the results of the decryption process and the authenticator generation process, and
A selector for alternately selecting a result of the decryption process and the authenticator generation process from the memory and outputting the result to the decryption module in order to alternately execute the decryption process and the authentication generation process. 4. The decoding device according to 4.
1つ以上の暗号文ブロックデータからなる暗号文を平文に復号し、かつ、暗号文に対して暗号文の完全性を確認するための認証子を生成する復号方法において、
復号モジュールによりデータを復号したときに生成したモジュール出力ブロックデータTi を復号モジュールへフィードバックする第1のフィードバック工程を有し、暗号文ブロックデータを入力し、第1のフィードバックループによりモジュール出力ブロックデータTiをフィードバックさせ復号処理を行い、平文ブロックデータを出力する復号工程と、
認証子演算途中結果をフィードバックする第2のフィードバック工程を有し、復号工程に入力される暗号文ブロックデータと同一の暗号文ブロックデータを入力し、データ処理を行い認証子演算途中結果を出力し、第2のフィードバック工程により認証子演算途中結果をフィードバックさせ、暗号文の完全性を確認するための認証子を生成する認証子生成工程と
を備えたことを特徴とする復号方法。
In a decryption method for decrypting a ciphertext composed of one or more ciphertext block data into plaintext and generating an authenticator for confirming the integrity of the ciphertext with respect to the ciphertext,
A first feedback step of feeding back the module output block data T i generated when the data is decrypted by the decryption module to the decryption module, the ciphertext block data is input, and the module output block data is transmitted by the first feedback loop; It is fed back to T i performs decoding processing, a decoding step of outputting the plaintext block data,
It has a second feedback step that feeds back the intermediate result of the authenticator operation, inputs the same ciphertext block data as the ciphertext block data input to the decryption step, performs data processing, and outputs the intermediate result of the authenticator operation A decryption method comprising: an authenticator generation step of generating an authenticator for feeding back an intermediate result of the authenticator operation in the second feedback step and confirming the integrity of the ciphertext.
1つ以上の平文ブロックデータからなる平文を暗号化モジュールにより暗号文にし、暗号文に対して暗号文の完全性を保証するための認証子を生成する暗号化装置において、
平文ブロックデータを暗号化モジュールにより暗号化したときに暗号化モジュールが出力したモジュール出力ブロックデータTi を暗号化モジュールへフィードバックする第1のフィードバックループを有し、平文ブロックデータを入力し、第1のフィードバックループによりモジュール出力ブロックデータTiをフィードバックさせ暗号化処理を行い、暗号文ブロックデータを出力する暗号化部と、
認証子演算途中結果をフィードバックする第2のフィードバックループを有し、暗号化部から暗号文ブロックデータが出力されるたびに暗号文ブロックデータを入力し、データ処理を行い、第2のフィードバックループにより認証子演算途中結果をフィードバックさせ、暗号文の完全性を保証するための認証子を生成する認証子生成部と
を備えたことを特徴とする暗号化装置。
In an encryption device that converts plaintext consisting of one or more plaintext block data into a ciphertext by an encryption module and generates an authenticator for guaranteeing the integrity of the ciphertext for the ciphertext
A first feedback loop that feeds back the module output block data T i output from the encryption module to the encryption module when the plaintext block data is encrypted by the encryption module; An encryption unit that feeds back the module output block data T i through the feedback loop and performs encryption processing, and outputs ciphertext block data;
It has a second feedback loop that feeds back the result of the authenticator calculation, inputs ciphertext block data every time ciphertext block data is output from the encryption unit, performs data processing, and uses the second feedback loop. An encryption device comprising: an authenticator generation unit that feeds back an intermediate result of an authenticator operation and generates an authenticator for guaranteeing the integrity of a ciphertext.
上記暗号化部と認証子生成部とは、1つの暗号化モジュールと、1つのフィードバックループとを兼用して暗号化処理と認証子生成処理とを交互に行うとともに、
上記1つのフィードバックループは、
暗号化処理と認証子生成処理との結果をそれぞれ記録し出力するメモリと、
暗号化処理と認証生成処理とを交互に実行するために、メモリから暗号化処理と認証子生成処理との結果を交互に選択して暗号化モジュールに出力するセレクタと
を備えたことを特徴とする請求項7記載の暗号化装置。
The encryption unit and the authenticator generation unit alternately perform an encryption process and an authenticator generation process using one encryption module and one feedback loop.
The one feedback loop is
A memory for recording and outputting the results of the encryption process and the authenticator generation process, and
A selector that alternately selects the result of the encryption process and the authenticator generation process from the memory and outputs the result to the encryption module in order to alternately execute the encryption process and the authentication generation process; The encryption device according to claim 7.
1つ以上の平文ブロックデータからなる平文を暗号化モジュールにより暗号文にし、暗号文に対して暗号文の完全性を保証するための認証子を生成する暗号化方法において、
平文ブロックデータを暗号化モジュールにより暗号化したときに暗号化モジュールが出力したモジュール出力ブロックデータTi を暗号化モジュールへフィードバックする第1のフィードバック工程を有し、平文ブロックデータを入力し、第1のフィードバックループによりモジュール出力ブロックデータTiをフィードバックさせ暗号化処理を行い、暗号文ブロックデータを出力する暗号化工程と、
認証子演算途中結果をフィードバックする第2のフィードバック工程を有し、暗号化工程から暗号文ブロックデータが出力されるたびに暗号文ブロックデータを入力し、データ処理を行い、第2のフィードバック工程により認証子演算途中結果をフィードバックさせ、暗号文の完全性を保証するための認証子を生成する認証子生成工程と
を備えたことを特徴とする暗号化方法。
In an encryption method for generating plaintext consisting of one or more plaintext block data into a ciphertext by an encryption module and generating an authenticator for ensuring the integrity of the ciphertext with respect to the ciphertext,
A first feedback step of feeding back the module output block data T i output from the encryption module to the encryption module when the plaintext block data is encrypted by the encryption module; An encryption step of feeding back the module output block data T i by the feedback loop and performing encryption processing to output ciphertext block data;
A second feedback step for feeding back an intermediate result of the authenticator operation, ciphertext block data is input every time ciphertext block data is output from the encryption step, data processing is performed, and the second feedback step An encryption method comprising: an authenticator generation step of feeding back an intermediate result of an authenticator operation and generating an authenticator for guaranteeing the integrity of a ciphertext.
1つ以上の暗号文ブロックデータからなる暗号文を復号ユニットにより平文に復号し、かつ、暗号文に対して暗号文の完全性を確認するための認証子を生成する復号装置において、
暗号文ブロックデータCi を復号ユニットへフィードバックする第1のフィードバックループを有し、暗号文ブロックデータを入力し、第1のフィードバックループにより暗号文ブロックデータCiをフィードバックさせ復号処理を行い、平文ブロックデータを出力する復号部と、
認証子演算途中結果をフィードバックする第2のフィードバックループを有し、復号部に入力される暗号文ブロックデータと同一の暗号文ブロックデータを入力し、データ処理を行い認証子演算途中結果を出力し、第2のフィードバックループにより認証子演算途中結果をフィードバックさせ、暗号文の完全性を確認するための認証子を生成する認証子生成部と
を備えたことを特徴とする復号装置。
In a decryption device that decrypts a ciphertext composed of one or more ciphertext block data into a plaintext by a decryption unit, and generates an authenticator for confirming the integrity of the ciphertext with respect to the ciphertext,
Having a first feedback loop for feeding back the ciphertext block data C i to the decrypting unit receives the ciphertext block data, performs decoding processing by feeding back the ciphertext block data C i by the first feedback loop, the plaintext A decoding unit for outputting block data;
It has a second feedback loop that feeds back the intermediate result of the authenticator operation, inputs the same ciphertext block data as the ciphertext block data input to the decryption unit, performs data processing, and outputs the intermediate result of the authenticator operation A decryption apparatus comprising: an authenticator generation unit that feeds back an intermediate result of an authenticator operation by a second feedback loop and generates an authenticator for confirming ciphertext integrity.
上記復号部と認証子生成部とは、1つの復号モジュールと、1つのフィードバックループとを兼用して復号処理と認証子生成処理とを交互に行うとともに、
上記1つのフィードバックループは、
復号処理と認証子生成処理との結果をそれぞれ記録し出力するメモリと、
復号処理と認証生成処理とを交互に実行するために、メモリから復号処理と認証子生成処理との結果を交互に選択して復号モジュールに出力するセレクタと
を備えたことを特徴とする請求項10記載の復号装置。
The decryption unit and the authenticator generation unit alternately perform a decryption process and an authenticator generation process using one decryption module and one feedback loop.
The one feedback loop is
A memory for recording and outputting the results of the decryption process and the authenticator generation process, and
A selector for alternately selecting a result of the decryption process and the authenticator generation process from the memory and outputting the result to the decryption module in order to alternately execute the decryption process and the authentication generation process. The decoding device according to 10.
1つ以上の暗号文ブロックデータからなる暗号文を復号ユニットにより平文に復号し、かつ、暗号文に対して暗号文の完全性を確認するための認証子を生成する復号方法において、
暗号文ブロックデータCi を復号ユニットへフィードバックする第1のフィードバック工程を有し、暗号文ブロックデータを入力し、第1のフィードバックループにより暗号文ブロックデータCiをフィードバックさせ復号処理を行い、平文ブロックデータを出力する復号工程と、
認証子演算途中結果をフィードバックする第2のフィードバック工程を有し、復号工程に入力される暗号文ブロックデータと同一の暗号文ブロックデータを入力し、データ処理を行い認証子演算途中結果を出力し、第2のフィードバック工程により認証子演算途中結果をフィードバックさせ、暗号文の完全性を確認するための認証子を生成する認証子生成工程と
を備えたことを特徴とする復号方法。
In a decryption method for decrypting a ciphertext composed of one or more ciphertext block data into a plaintext by a decryption unit and generating an authenticator for confirming the integrity of the ciphertext with respect to the ciphertext,
A first feedback step of feeding back the ciphertext block data C i to the decryption unit, the ciphertext block data is input, the ciphertext block data C i is fed back by the first feedback loop, and decryption processing is performed; A decoding step of outputting block data;
It has a second feedback step that feeds back the intermediate result of the authenticator operation, inputs the same ciphertext block data as the ciphertext block data input to the decryption step, performs data processing, and outputs the intermediate result of the authenticator operation A decryption method comprising: an authenticator generation step of generating an authenticator for feeding back an intermediate result of the authenticator operation in the second feedback step and confirming the integrity of the ciphertext.
上記請求項3記載の暗号化方法の各工程をコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which a program for causing a computer to execute each step of the encryption method according to claim 3 is recorded. 上記請求項6記載の復号方法の各工程をコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which a program for causing a computer to execute each step of the decoding method according to claim 6 is recorded. 上記請求項9記載の暗号化方法の各工程をコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which a program for causing a computer to execute each step of the encryption method according to claim 9 is recorded. 上記請求項12記載の復号方法の各工程をコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which a program for causing a computer to execute each step of the decoding method according to claim 12 is recorded. データを入力して暗号化し、暗号データを出力する暗号化部と、
暗号化部が出力した暗号データを入力して暗号文の完全性を保証するための認証子を生成する認証子生成部と
を備え、
認証子生成部は、暗号化部によるデータの暗号化が完了する前に認証子の生成を開始することを特徴とする暗号化装置。
An encryption unit that inputs and encrypts data and outputs encrypted data;
An authenticator generating unit that inputs the encrypted data output by the encryption unit and generates an authenticator for ensuring the integrity of the ciphertext;
The authenticator generation unit starts generating an authenticator before data encryption by the encryption unit is completed.
データを入力して復号し、復号データを出力する復号部と、
復号部が入力したデータを入力して暗号文の完全性を保証するための認証子を生成する認証子生成部と
を備え、
認証子生成部は、復号部によるデータの復号が完了する前に認証子の生成を開始することを特徴とする復号装置。
A decoding unit for inputting and decoding data and outputting decoded data;
An authenticator generation unit that inputs the data input by the decryption unit and generates an authenticator for ensuring the integrity of the ciphertext;
The authenticator generation unit starts generating an authenticator before the decoding of data by the decryption unit is completed.
データを入力して暗号化し、暗号データを出力する暗号化工程と、
暗号化工程が出力した暗号データを入力して暗号文の完全性を保証するための認証子を生成する認証子生成工程と
を備え、
認証子生成工程は、暗号化工程によるデータの暗号化が完了する前に認証子の生成を開始することを特徴とする暗号化方法。
An encryption process for inputting and encrypting data and outputting encrypted data;
An authenticator generation step for generating an authenticator for inputting the encrypted data output by the encryption step and ensuring the integrity of the ciphertext;
The authenticator generation step starts the generation of the authenticator before the data encryption by the encryption step is completed.
データを入力して復号し、復号データを出力する復号工程と、
復号工程が入力したデータを入力して暗号文の完全性を保証するための認証子を生成する認証子生成工程と
を備え、
認証子生成工程は、復号工程によるデータの復号が完了する前に認証子の生成を開始することを特徴とする復号方法。
A decoding step of inputting and decoding the data and outputting the decoded data;
An authenticator generation step for generating an authenticator for inputting the data input by the decryption step and guaranteeing the integrity of the ciphertext;
The authenticator generation step starts generation of an authenticator before the decryption of data by the decryption step is completed.
上記請求項19記載の暗号化方法の各工程をコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which a program for causing a computer to execute each step of the encryption method according to claim 19 is recorded. 上記請求項20記載の復号方法の各工程をコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium recording a program for causing a computer to execute each step of the decoding method according to claim 20.
JP2007086720A 2000-01-14 2007-03-29 Method and apparatus for encryption, method and apparatus for decryption, and computer-readable recording medium storing program Pending JP2007184000A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007086720A JP2007184000A (en) 2000-01-14 2007-03-29 Method and apparatus for encryption, method and apparatus for decryption, and computer-readable recording medium storing program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2000005161 2000-01-14
JP2007086720A JP2007184000A (en) 2000-01-14 2007-03-29 Method and apparatus for encryption, method and apparatus for decryption, and computer-readable recording medium storing program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2001552574A Division JP4036648B2 (en) 2000-01-14 2000-12-22 ENCRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION DEVICE, DECRYPTION METHOD, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING PROGRAM

Publications (1)

Publication Number Publication Date
JP2007184000A true JP2007184000A (en) 2007-07-19

Family

ID=38339962

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007086720A Pending JP2007184000A (en) 2000-01-14 2007-03-29 Method and apparatus for encryption, method and apparatus for decryption, and computer-readable recording medium storing program

Country Status (1)

Country Link
JP (1) JP2007184000A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530929A (en) * 2012-07-02 2014-01-22 航天信息股份有限公司 Method for scheduling decryption machines
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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63225840A (en) * 1987-03-03 1988-09-20 Yokogawa Hewlett Packard Ltd Information storage system
JPH0697932A (en) * 1992-03-25 1994-04-08 Motorola Inc Method and apparatus for encoding of communication signal
WO1998057461A1 (en) * 1997-06-07 1998-12-17 Deutsche Telekom Ag Device for carrying out a block cipher method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63225840A (en) * 1987-03-03 1988-09-20 Yokogawa Hewlett Packard Ltd Information storage system
JPH0697932A (en) * 1992-03-25 1994-04-08 Motorola Inc Method and apparatus for encoding of communication signal
WO1998057461A1 (en) * 1997-06-07 1998-12-17 Deutsche Telekom Ag Device for carrying out a block cipher method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530929A (en) * 2012-07-02 2014-01-22 航天信息股份有限公司 Method for scheduling decryption machines
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

Similar Documents

Publication Publication Date Title
US7184549B2 (en) Method and apparatus for encryption, method and apparatus for decryption, and computer-readable medium storing program
JP3864675B2 (en) Common key encryption device
EP1063811B1 (en) Cryptographic apparatus and method
JP4071496B2 (en) Method and apparatus for encryption and decryption of digital video content transmission
KR20100069610A (en) Methods and devices for a chained encryption mode
JP4036648B2 (en) ENCRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION DEVICE, DECRYPTION METHOD, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING PROGRAM
JPH05500298A (en) encryption device
JP2007184000A (en) Method and apparatus for encryption, method and apparatus for decryption, and computer-readable recording medium storing program
JP4857230B2 (en) Pseudorandom number generator and encryption processing device using the same
JP4287397B2 (en) Ciphertext generation apparatus, ciphertext decryption apparatus, ciphertext generation program, and ciphertext decryption program
AU2003203427B2 (en) Encryptor, encrypting method, decryptor, decrypting method, and computer readable recording medium having program stored therein
CA2496539C (en) Encryptor, encrypting method, decryptor, decrypting method, and computer readable recording medium having program stored therein
JP2005309148A (en) Data converter and the data conversion method
JP2001285278A (en) Encryption communication method and encryption communication system
JP4752239B2 (en) Common key encryption method and apparatus
JP3864798B2 (en) Common key encryption decryption device
MXPA01009243A (en) Method and apparatus for encryption, method and apparatus for decryption, and computer-readable medium storing program
JPH09233065A (en) Ciphering device and ciphering method
JP2007013503A (en) Encryption device and method and decryption device and method
JPH10303883A (en) Enciphering method
JP2006279489A (en) Encryption and decryption system, and message encryption and decryption program
JP2001222218A (en) Device and method for ciphering, device and method for deciphering, cipher system and recording medium which stores the program
JP2007206582A (en) Secrecy system, encryption device and decryption device used for the same
JP2004356783A (en) Communication system, communication terminal for use therein and its operation control method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100209

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100325

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100420

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100817