JP2003333036A - Message authentication device, message authenticating method, message authenticating program, and computer- readable recording medium with the program stored thereon - Google Patents

Message authentication device, message authenticating method, message authenticating program, and computer- readable recording medium with the program stored thereon

Info

Publication number
JP2003333036A
JP2003333036A JP2002134367A JP2002134367A JP2003333036A JP 2003333036 A JP2003333036 A JP 2003333036A JP 2002134367 A JP2002134367 A JP 2002134367A JP 2002134367 A JP2002134367 A JP 2002134367A JP 2003333036 A JP2003333036 A JP 2003333036A
Authority
JP
Japan
Prior art keywords
key
exclusive
block
encryption
length
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
JP2002134367A
Other languages
Japanese (ja)
Inventor
Shiho Moriai
志帆 盛合
Hideki Imai
秀樹 今井
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2002134367A priority Critical patent/JP2003333036A/en
Publication of JP2003333036A publication Critical patent/JP2003333036A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the process cost in a message authentication, without impairing security in XCBC. <P>SOLUTION: For a digital data having a data length equal to a multiple of its block length, its final block is exclusive-ORed with either of a key K1 and another key K2 to encipher the data. If the data length of the digital data is not a multiple of the block length, 1 is added to the tail end of the final block, and the data with 0 further added so as to be within the block length is exclusive-ORed with either of a key K2 and a key K1 different from either of the key K1 and the other key K2 to encrypt the data. <P>COPYRIGHT: (C)2004,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、情報通信等におい
てデジタル情報の偽造防止、改ざん検出、完全性保証を
目的としたメッセージ認証装置、メッセージ認証方法と
メッセージ認証プログラムおよび該プログラムを記録し
たコンピュータ読取り可能な記録媒体に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a message authenticating device, a message authenticating method and a message authenticating program for the purpose of preventing forgery, tampering detection and integrity assurance of digital information in information communication and the like, and a computer reading recording the program. It relates to a possible recording medium.

【0002】[0002]

【従来の技術】メッセージ認証コード(Message Authen
tication Code:MAC)は、メッセージと共に送ることに
よって検証者側で判定され、デジタル情報の偽造防止、
改ざん検出、完全性保証のために利用されるものであ
る。特に、CBC(Cipher block chaining)MACと呼ばれ
るメッセージ認証コードは、下記(ANSI X9.19及びISO/
IEC9797-1)に示すようにアメリカであるいは国際的に
規格化されており、固定メッセージ長の場合には安全で
広く利用されている。 ANSI X9.19(American national standard-Financial
institution retail message authentication, ASC X9
Secretariat-American Bankers Association,1986.) ISO/IEC9797-1(Information Technology-Security Te
chniques-Data integrity mechanism using a cryptogr
aphic check function employing a block cipher algo
rithm International Organization for Standards,19
99.Second Edition.) 図4は、CBC MACのアルゴリズムを示しており、Mi(i=
1…m)はメッセージをある固定ブロック長のブロックに
分割したものを示し、Eはブロック暗号、Kはブロック
暗号Eで用いられる鍵、EXは排他的論理和、Tはメッセ
ージ認証コードを示す。
2. Description of the Related Art A message authentication code (Message Authen
The tication code (MAC) is determined by the verifier by sending it together with the message to prevent forgery of digital information,
It is used for tampering detection and integrity assurance. In particular, the message authentication code called CBC (Cipher block chaining) MAC is as follows (ANSI X9.19 and ISO /
It is standardized in the United States or internationally as shown in (IEC9797-1), and is safe and widely used in the case of fixed message length. ANSI X9.19 (American national standard-Financial
institution retail message authentication, ASC X9
Secretariat-American Bankers Association, 1986.) ISO / IEC9797-1 (Information Technology-Security Te
chniques-Data integrity mechanism using a cryptogr
aphic check function employing a block cipher algo
rithm International Organization for Standards, 19
99.Second Edition.) FIG. 4 shows the algorithm of CBC MAC, Mi (i =
1 ... m) shows a message divided into blocks of a fixed block length, E is a block cipher, K is a key used in the block cipher E, EX is an exclusive OR, and T is a message authentication code.

【0003】このCBC MACは、メッセージ長が固定なら
ば安全である、言い換えればメッセージ長が固定ブロッ
ク長の整数倍であれば安全であることが下記文献にて証
明されている。
The CBC MAC has been proved to be safe if the message length is fixed, in other words, safe if the message length is an integral multiple of the fixed block length.

【0004】M.Bellare, J. Killian, and P. Rogawa
y,"The security of the cipher block chaining mess
age autbentication code,"Journal of Computer and
System Sciences,Vol.61,No.3,December 2000,PP.3
62-399. Preliminary version was in Advances in Cry
ptology-CRYPTO'94,LNCS 839,Springer-Verlag,199
4. しかしながら、メッセージ長が可変である時には、MAC
が偽造される可能性が生じることが知られる。従って、
CBC MACは、ブロック長の整数倍長のメッセージしか扱
えない。
M. Bellare, J. Killian, and P. Rogawa
y, "The security of the cipher block chaining mess
age autbentication code, "Journal of Computer and
System Sciences, Vol.61, No.3, December 2000, PP.3
62-399. Preliminary version was in Advances in Cry
ptology-CRYPTO'94, LNCS 839, Springer-Verlag, 199
Four. However, when the message length is variable, the MAC
It is known that there is a possibility that forgery will occur. Therefore,
CBC MAC can only handle messages that are an integral multiple of the block length.

【0005】この方式を改良したのが下記文献に提案さ
れているXCBC方式である。
The XCBC system proposed in the following document is an improvement of this system.

【0006】J.Black and P.Rogaway,"CBC MACs for
arbitrarily-1ength messages:The three-key constr
uctions,"Advances in Cryptology-CRYPTO2000,LNCS
1880,PP.197-215,Springer-Verlag,2000. 図5は、XCBCのアルゴリズムを示しており、Mi(i=1…
m)はメッセージをある固定のブロック長に分割したも
のを示し、Eはブロック暗号、K1はブロック暗号で用
いられる鍵、EXは排他的論理和、Tはメッセージ認証コ
ードを示す。
J. Black and P. Rogaway, "CBC MACs for
arbitrarily-1ength messages: The three-key constr
uctions, "Advances in Cryptology-CRYPTO2000, LNCS
1880, PP.197-215, Springer-Verlag, 2000. FIG. 5 shows the XCBC algorithm, and Mi (i = 1 ...
m) indicates a message divided into a certain fixed block length, E indicates a block cipher, K1 indicates a key used in the block cipher, EX indicates an exclusive OR, and T indicates a message authentication code.

【0007】このXCBCが前述のCBC MACと異なる点は、
(1)メッセージ長がブロック長の倍数である場合(図
5(a))は、最終ブロックに前段の暗号結果と鍵K2
との排他的論理和をとって暗号化を行ない、(2)メッ
セージ長がブロック長の倍数でない場合(図5(b))
は、最終ブロックの末尾に1を付加し、さらにブロック
長に相当する(ぴったり収まる)だけの0を付加したデ
ータを前段の暗号結果と鍵K3と排他的論理和をとって暗
号化を行なう、という点である。
The point that this XCBC differs from the above-mentioned CBC MAC is that
(1) When the message length is a multiple of the block length (FIG. 5A), the encryption result and the key K2 of the preceding stage are added to the final block.
(2) When the message length is not a multiple of the block length when encrypted by performing an exclusive OR with and (2)
Adds 1 to the end of the last block and further adds 0 corresponding to the block length (fits exactly) to obtain the encryption result of the preceding stage and the key K3 by exclusive OR, and encrypt the data. That is the point.

【0008】このために、XCBCでは 次の特徴を生ず
る。(1)任意長のメッセージが扱える。(2)ブロッ
ク暗号Eによる暗号化回数が最小である(|M|/n回:M
はメッセージ長、nはブロック長のnビット)。(3)暗
号化のための鍵セットアップ回数が最小(1回)であ
る。(4)証明可能安全性をもつ(ブロック暗号を疑似
ランダム置換と仮定すると、疑似ランダム関数であるこ
とが証明できる。)。
For this reason, the following characteristics occur in XCBC. (1) A message of arbitrary length can be handled. (2) The number of times of encryption by the block cipher E is minimum (| M | / n times: M
Is the message length, n is the block length n bits). (3) The number of key setups for encryption is minimal (once). (4) It has provable security (assuming that the block cipher is pseudorandom permutation, it can be proved to be a pseudorandom function).

【0009】[0009]

【発明が解決しようとする課題】しかしながら、図4に
示すCBC MACが鍵K1のみを必要としていたのに対し、X
CBCでは安全性を証明するために、互いに独立な3つの鍵
K1、K2、K3を必要とする。メッセージ認証のため
に、暗号化の鍵とは別にK1、K2、K3を受信者と送
信者との間で事前に共通化し、配送したり各自で計算す
るなどすることは、コスト増につながるほか、従来方式
のインターフェースとの互換性を保つことを困難にさせ
ることもある。
However, while the CBC MAC shown in FIG. 4 requires only the key K1, X
CBC requires three independent keys K1, K2 and K3 to prove security. For message authentication, sharing K1, K2, and K3 separately from the encryption key between the receiver and the sender in advance for delivery and calculation by themselves will increase costs. , It may make it difficult to maintain compatibility with conventional interfaces.

【0010】このため、K1、K2、K3の事前配送を
不要とするための解決策として、XCBCの鍵K1、K2、
K3の導出方法が下記コメントに示されている。
Therefore, as a solution for eliminating the need for pre-delivery of K1, K2, and K3, XCBC keys K1, K2, and
The method of deriving K3 is shown in the comments below.

【0011】J. Black and P.Rogaway,"A Suggestio
n for Handling Arbitrarily-Length Messages with th
e CBC MAC,"Comments to NIST concerning AES Modes
of Operations, October,2000. このコメントによると、XCBCの鍵K1、K2、K3は暗
号化用の鍵kとnビットの定数Const1A、 ConstlB、Cons
t2、Const3を用いて以下のように導出できることになる K1=(Ek(Const1A)||Ek(Const1B))の最初のkビ
ット、 K2=Ek(Const2)、 K3=Ek(Const3) しかしながら、この定数によりK1、K2、K3の事前
配送が不要となっても、上式を計算することによる鍵K
2、K3の導出にかかる暗号化回数を含めると、全体の
処理コストが減ったとは言い難いというのが現状であ
る。
J. Black and P. Rogaway, "A Suggestio
n for Handling Arbitrarily-Length Messages with th
e CBC MAC, "Comments to NIST concerning AES Modes
According to this comment, XCBC keys K1, K2, and K3 are encryption keys k and n-bit constants Const1A, ConstlB, and Cons.
The first k bits of K1 = (Ek (Const1A) || Ek (Const1B)), K2 = Ek (Const2), K3 = Ek (Const3) which can be derived using t2 and Const3 as Even if K1, K2, and K3 need not be pre-delivered due to the constant, the key K calculated by the above equation
2. Including the number of encryptions required to derive K3, it is difficult to say that the overall processing cost has decreased.

【0012】本発明は、上述の問題を解決するもので、
XCBCにおいて安全性を損なうことなく処理コストを削減
するメッセージ認証装置、メッセージ認証方法とメッセ
ージ認証プログラムおよび該プログラムを記録したコン
ピュータ読取り可能な記録媒体を提供する。
The present invention solves the above-mentioned problems.
(EN) Provided are a message authentication device, a message authentication method, a message authentication program, and a computer-readable recording medium which records the program, which can reduce processing cost in XCBC without impairing security.

【0013】[0013]

【課題を解決するための手段】この目的を達成するため
に、本発明に記載のメッセージ認証装置は、入力処理部
においてディジタルデータのデータ長を固定ブロック長
のブロックに分割した各ブロックに対して、暗号化処理
部において最初のブロックを鍵K1で暗号化し、排他的
論理和処理部においてその暗号化の結果と次のブロック
との排他的論理和をとり、暗号化処理部においてその排
他的論理和の結果を鍵K1で暗号化し、排他的論理和処
理部においてその暗号化の結果と更に次のブロックとの
排他的論理和をとるという手順を連鎖的に繰り返し、デ
ィジタルデータのデータ長がブロック長の倍数でない最
終ブロックの場合ではパディング処理部においてデータ
を付加してブロック長としたうえで前段の暗号化の結果
と排他的論理和をとり、暗号化処理部においてその排他
的論理和の結果を鍵K1で暗号化し、その暗号化の結果
をメッセージ認証モ-ドとして出力するメッセージ認証
装置において、前記ディジタルデータのデータ長がブロ
ック長の倍数である場合は、最終ブロックに鍵K1及び
別の鍵K2のいずれか一方の鍵との排他的論理和をとっ
て暗号化を行ない、前記ディジタルデータのデータ長が
ブロック長の倍数でない場合は、最終ブロックの末尾に
1を付加し、さらにブロック長に収まるよう0を付加し
た(つまりパディングした)データを前記鍵K1及び別
の鍵K2のいずれか一方の鍵とは異なる別の鍵K2及び
鍵K1のいずれか一方の鍵との排他的論理和をとって暗
号化を行なうことを要旨とする。
In order to achieve this object, the message authentication device according to the present invention provides an input processing unit for each block obtained by dividing the data length of digital data into blocks of fixed block length. , The first block is encrypted with the key K1 in the encryption processing unit, the result of the encryption is exclusive-ORed with the next block in the exclusive-OR processing unit, and the exclusive-logical logic is obtained in the encryption processing unit. The procedure of encrypting the result of the sum with the key K1 and taking the exclusive OR of the result of the encryption and the next block in the exclusive OR processing unit is repeated in a chain, and the data length of the digital data is the block. In the case of the final block that is not a multiple of the length, the padding processing unit adds the data to the block length, and then the exclusive OR with the result of the encryption in the previous stage. In the message authentication device that encrypts the result of the exclusive OR with the key K1 in the encryption processing unit and outputs the result of the encryption as the message authentication mode, the data length of the digital data is the block length. If it is a multiple, encryption is performed by taking the exclusive OR of either the key K1 or another key K2 in the final block, and if the data length of the digital data is not a multiple of the block length. , At the end of the last block
One of the key K2 and the key K1 different from the one of the key K1 and the other key K2 is added to the data to which 1 is added and 0 is added (that is, padded) so as to fit in the block length. The gist is to perform an exclusive OR with the key of to perform encryption.

【0014】この発明によれば、XCBCの利点を保持した
まま従来のような三つの鍵を用いることなく二つの鍵で
済むことになり、従来の三つ目の鍵を事前に共有するた
めの処理コスト(送信あるいは計算コスト)を削減でき
処理速度の向上にも寄与する。また、ソフトウェア実装
の場合、実行時に従来の三つ目の鍵をメモリからロード
するコスト及びこのためのワークエリアを削減でき処理
速度の向上や省メモリ化が図られる。更に、ハードウェ
ア実装の場合、従来の三つ目の鍵を格納するレジスタを
削減でき省電力が図られる。
According to the present invention, it is possible to use two keys without using the conventional three keys while maintaining the advantage of XCBC, and to share the third conventional key in advance. The processing cost (transmission or calculation cost) can be reduced and the processing speed can be improved. Further, in the case of software implementation, the cost of loading the conventional third key from the memory at the time of execution and the work area for this can be reduced, and the processing speed can be improved and the memory can be saved. Furthermore, in the case of hardware implementation, it is possible to reduce the number of conventional registers that store the third key and save power.

【0015】また、本発明記載のメッセージ認証装置
は、入力処理部においてディジタルデータのデータ長を
固定ブロック長のブロックに分割した各ブロックに対し
て、暗号化処理部において最初のブロックを鍵K1で暗
号化し、排他的論理和処理部においてその暗号化の結果
と次のブロックとの排他的論理和をとり、暗号化処理部
においてその排他的論理和の結果を鍵K1で暗号化し、
排他的論理和処理部においてその暗号化の結果と更に次
のブロックとの排他的論理和をとるという手順を連鎖的
に繰り返し、ディジタルデータのデータ長がブロック長
の倍数でない最終ブロックの場合ではパディング処理部
においてデータを付加してブロック長としたうえで前段
の暗号化の結果と排他的論理和をとり、暗号化処理部に
おいてその排他的論理和の結果を鍵K1で暗号化し、そ
の暗号化の結果をメッセージ認証モ−ドとして出力する
メッセージ認証装置において、前記ディジタルデータの
データ長がブロック長の倍数である場合は、最終ブロッ
クに鍵K1と別の鍵K2との排他的論理和による鍵及び
別の鍵K2のいずれか一方の鍵との排他的論理和をとっ
て暗号化を行ない、前記ディジタルデータのデータ長が
ブロック長の倍数でない場合は、最終ブロックの末尾に
1を付加し、さらにブロック長に収まるよう0を付加し
たデータを前記鍵K1と別の鍵K2との排他的論理和に
よる鍵及び別の鍵K2のいずれか一方の鍵とは異なる別
の鍵K2及び鍵K1と別の鍵K2との排他的論理和によ
る鍵のいずれか一方の鍵との排他的論理和をとって暗号
化を行なうことを要旨とする。
Further, in the message authentication device according to the present invention, for each block obtained by dividing the data length of the digital data into blocks having a fixed block length in the input processing unit, the first block in the encryption processing unit is the key K1. Encryption, and the exclusive OR processing unit takes the exclusive OR of the result of the encryption and the next block, and the encryption processing unit encrypts the result of the exclusive OR with the key K1,
In the exclusive OR processing block, the procedure of taking the exclusive OR of the encryption result and the next block is repeated in a chained manner, and padding is performed in the case of the final block where the data length of the digital data is not a multiple of the block length. In the processing unit, the data is added to obtain the block length, and the result of the encryption in the previous stage is subjected to exclusive OR, and in the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and the encryption is performed. In a message authentication device which outputs the result of the above as a message authentication mode, when the data length of the digital data is a multiple of the block length, a key obtained by exclusive OR of the key K1 and another key K2 in the final block. And another key K2 is used to perform an exclusive OR with one of the keys to perform encryption, and the data length of the digital data is a multiple of the block length. If not, at the end of the last block
Another key different from either one of the key obtained by exclusive OR of the key K1 and the other key K2 and the data obtained by adding 0 so as to fit in the block length. The gist is to perform the exclusive OR of K2 and the key K1 and another key K2 with one of the keys for encryption.

【0016】この発明においても、XCBCの利点を保持し
たまま従来のような三つの鍵を用いることなく二つの鍵
で済むことになり、従来の三つ目の鍵を事前共有するた
めの処理コスト(送信あるいは計算コスト)を削減でき
処理速度の向上にも寄与する。また、ソフトウェア実装
の場合、実行時に従来の三つ目の鍵をメモリからロード
するコスト及びこのためのワークエリアを削減でき処理
速度の向上や省メモリ化が図られる。更に、ハードウェ
ア実装の場合、従来の三つ目の鍵を格納するレジスタを
削減でき省電力が図られる。
Also in the present invention, it is possible to use only two keys without using the conventional three keys while maintaining the advantage of XCBC, and the processing cost for pre-sharing the third key of the related art. (Transmission or calculation cost) can be reduced and the processing speed can be improved. Further, in the case of software implementation, the cost of loading the conventional third key from the memory at the time of execution and the work area for this can be reduced, and the processing speed can be improved and the memory can be saved. Furthermore, in the case of hardware implementation, it is possible to reduce the number of conventional registers that store the third key and save power.

【0017】更に、本発明記載のメッセージ認証装置
は、入力処理部においてディジタルデータのデータ長を
固定ブロック長のブロックに分割した各ブロックに対し
て、暗号化処理部において最初のブロックを鍵K1で暗
号化し、排他的論理和処理部においてその暗号化の結果
と次のブロックとの排他的論理和をとり、暗号化処理部
においてその排他的論理和の結果を鍵K1で暗号化し、
排他的論理和処理部においてその暗号化の結果と更に次
のブロックとの排他的論理和をとるという手順を連鎖的
に繰り返し、ディジタルデータのデータ長がブロック長
の倍数でない最終ブロックの場合ではパディング処理部
においてデータを付加してブロック長としたうえで前段
の暗号化の結果と排他的論理和をとり、暗号化処理部に
おいてその排他的論理和の結果を鍵K1で暗号化し、そ
の暗号化の結果をメッセージ認証モ−ドとして出力する
メッセージ認証装置において、前記ディジタルデータの
データ長がブロック長の倍数である場合は、最終ブロッ
クに鍵K1と別の鍵K2との排他的論理和による鍵及び
鍵K1のいずれか一方の鍵との排他的論理和をとって暗
号化を行ない、前記ディジタルデータのデータ長がブロ
ック長の倍数でない場合は、最終ブロックの末尾に1を
付加し、さらにブロック長に収まるよう0を付加したデ
ータを前記鍵K1と別の鍵K2との排他的論理和による
鍵及び鍵K1のいずれか一方の鍵とは異なる鍵K1及び
鍵K1と別の鍵K2との排他的論理和による鍵のいずれ
か一方の鍵との排他的論理和をとって暗号化を行なうこ
とを要旨とする。
Furthermore, in the message authentication device according to the present invention, for each block obtained by dividing the data length of the digital data into blocks of fixed block length in the input processing unit, the first block in the encryption processing unit is the key K1. Encryption, and the exclusive OR processing unit takes the exclusive OR of the result of the encryption and the next block, and the encryption processing unit encrypts the result of the exclusive OR with the key K1,
In the exclusive OR processing block, the procedure of taking the exclusive OR of the encryption result and the next block is repeated in a chained manner, and padding is performed in the case of the final block where the data length of the digital data is not a multiple of the block length. In the processing unit, the data is added to obtain the block length, and the result of the encryption in the previous stage is subjected to exclusive OR, and in the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and the encryption is performed. In a message authentication device which outputs the result of the above as a message authentication mode, when the data length of the digital data is a multiple of the block length, a key obtained by exclusive OR of the key K1 and another key K2 in the final block. And the key K1 is used to perform an exclusive OR with one of the keys for encryption, and the data length of the digital data is not a multiple of the block length. In this case, one of the key K1 and the key obtained by exclusive ORing the data in which 1 is added to the end of the last block and 0 is added so that it fits in the block length and the key K1 and another key K2 are added. The key is to perform the exclusive OR of the key K1 different from the key K1 and the key K1 and the other key K2, and perform the exclusive OR with any one of the keys.

【0018】そして、この発明においても、XCBCの利点
を保持したまま従来のような三つの鍵を用いることなく
二つの鍵で済むことになり、従来の三つ目の鍵を事前共
有するための処理コスト(送信あるいは計算コスト)を
削減でき処理速度の向上にも寄与する。また、ソフトウ
ェア実装の場合、実行時に従来の三つ目の鍵をメモリか
らロードするコスト及びこのためのワークエリアを削減
でき処理速度の向上や省メモリ化が図られる。更に、ハ
ードウェア実装の場合、従来の三つ目の鍵を格納するレ
ジスタを削減でき省電力が図られる。
Also, in the present invention, it is possible to use two keys without using the conventional three keys while maintaining the advantage of XCBC, and the conventional third key can be shared in advance. The processing cost (transmission or calculation cost) can be reduced and the processing speed can be improved. Further, in the case of software implementation, the cost of loading the conventional third key from the memory at the time of execution and the work area for this can be reduced, and the processing speed can be improved and the memory can be saved. Furthermore, in the case of hardware implementation, it is possible to reduce the number of conventional registers that store the third key and save power.

【0019】また、本発明記載のメッセージ認証方法と
メッセージ認証プログラムおよび該プログラムを記録し
たコンピュータ読取り可能な記録媒体においても、同様
な作用効果と同様な作用効果を奏する。
The message authenticating method, the message authenticating program, and the computer-readable recording medium recording the program according to the present invention also have the same operational effect.

【0020】[0020]

【発明の実施の形態】以下、図面を用いて本発明の実施
の形態を説明する。図3は、本発明の一実施の形態に係
るメッセージ認証装置の構成を示すブロック図である。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. FIG. 3 is a block diagram showing the configuration of the message authentication device according to the embodiment of the present invention.

【0021】図3において、入力処理部1は、平文のメ
ッセージであるディジタルデータをある固定のブロック
長に分割する。暗号化処理部2は、固定ブロック長に分
割された入力処理部1からの各ブロックの入力データに
対し鍵データを用いて暗号文を生成する。この場合、前
段ブロックの暗号文も入力データとされ最終ブロックで
は鍵データも入力データとされる。排他的論理和処理部
3は、複数の入力データの排他的論理和を計算する。パ
ディング処理部4は最終ブロックにてブロック長に満た
ないデータにデータ付加処理を行なう。
In FIG. 3, the input processing section 1 divides digital data, which is a plaintext message, into a certain fixed block length. The encryption processing unit 2 uses the key data for the input data of each block from the input processing unit 1 divided into fixed block lengths to generate a ciphertext. In this case, the ciphertext of the preceding block is also input data, and the key data is also input data in the final block. The exclusive OR processing unit 3 calculates the exclusive OR of a plurality of input data. The padding processing unit 4 performs data addition processing on the data which is less than the block length in the final block.

【0022】このようなメッセージ認証装置は、次の手
順でメッセージ認証コードを得る。まず、入力処理部1
においてディジタルデータを所定の固定ブロック長に分
割する。次に、暗号化処理部2において最初のブロック
を鍵K1で暗号化する。次いで、排他的論理和処理部3
においてその暗号結果(暗号文)と次段のブロックとの
排他的論理和をとる。さらに、暗号化処理部2において
その結果を鍵1で暗号化し、排他的論理和処理部3にお
いてその暗号化結果と更に次段のブロックと排他的論理
和をとる。この手順を連鎖的に繰り返す。最終ブロック
については、パディング処理部4において固定ブロック
のブロック長に満たないディジタルデータにデータを付
加し、暗号化処理部2においてその結果を鍵K1で暗号
化し、その暗号化結果をメッセージ認証コードとして出
力する。
Such a message authentication device obtains a message authentication code by the following procedure. First, the input processing unit 1
In, the digital data is divided into a predetermined fixed block length. Next, the encryption processing unit 2 encrypts the first block with the key K1. Next, the exclusive OR processing unit 3
At, the exclusive result of the cipher result (cipher text) and the next block is calculated. Further, the encryption processing unit 2 encrypts the result with the key 1, and the exclusive OR processing unit 3 takes an exclusive OR with the encryption result and the block of the next stage. This procedure is repeated in a chain. For the final block, the padding processing unit 4 adds data to the digital data that is less than the block length of the fixed block, the encryption processing unit 2 encrypts the result with the key K1, and the encrypted result is used as a message authentication code. Output.

【0023】このとき、ディジタルデータ長がブロック
長の倍数である場合は、最終ブロックに上記とは別の鍵
K2と排他的論理和をとって暗号化を行ない、データ長
がブロック長の倍数でない場合は、最終ブロックの末尾
に1を付加し、さらにブロック長に収まるよう0を付加
したデータを上記と同じ鍵K1と排他的論理和をとって
暗号化を行なう。
At this time, if the digital data length is a multiple of the block length, the final block is subjected to exclusive OR with another key K2 different from the above for encryption, and the data length is not a multiple of the block length. In this case, 1 is added to the end of the final block, and 0 is added to the data so that it fits within the block length, and the data is exclusive ORed with the same key K1 as above to perform encryption.

【0024】図1は、この実施形態1のアルゴリズムを
示す図である。図1において、Mi(i=1…m;自然数
(以下、同様))はメッセージをある固定のブロック長
に分割したものを示し、Eはブロック暗号、K1、K2
は鍵、EXは排他的論理和、Tはメッセージ認証コード
を示す。
FIG. 1 is a diagram showing the algorithm of the first embodiment. In FIG. 1, Mi (i = 1 ... m; natural number (hereinafter, the same)) indicates that the message is divided into a certain fixed block length, and E is a block cipher, K1, K2.
Is a key, EX is an exclusive OR, and T is a message authentication code.

【0025】まず、メッセージをある固定ブロック長に
分割する。このブロック長は利用するブロック暗号のブ
ロック長と合わせるのが普通であり、64ビットあるいは
128ビットとすることが多い。次に、最初のブロックを
ブロック暗号Eを用いて鍵K1で暗号化し、その暗号化
結果と次段のブロックとの排他的論理和をとる。
First, the message is divided into certain fixed block lengths. This block length is usually the same as the block length of the block cipher to be used, 64 bits or
It is often 128 bits. Next, the first block is encrypted with the key K1 using the block cipher E, and the result of the encryption and the block of the next stage are exclusive-ORed.

【0026】更に、その結果をプロック暗号Eを用いて
鍵K1で暗号化し、その暗号化結果と次段のブロックと
の排他的論理和をとるという手順を連鎖的に繰り返す。
Furthermore, the procedure of encrypting the result with the key K1 using the block cipher E and taking the exclusive OR of the encrypted result and the block of the next stage is repeated in a chain.

【0027】最終ブロックでは、データ長がブロック長
の倍数である場合は、最終ブロックに鍵K2と排他的論
理和をとって暗号化を行ない、データ長がブロック長の
倍数でない場合は、最終ブロックの末尾に1を付加し、
更にブロック長に収まるよう0を付加したデータを鍵K
1と排他的論理和をとって暗号化を行なう。
In the final block, if the data length is a multiple of the block length, the final block is subjected to exclusive OR with the key K2 for encryption. If the data length is not a multiple of the block length, the final block Add 1 to the end of
Further, the data with 0 added so that it fits in the block length is key K
Encryption is performed by taking the exclusive OR with 1.

【0028】ここで、メッセージ長がブロック長の整数
倍のとき(パディングなし)とそれ以外の場合(パディ
ングあり)とでは、異なる鍵K1とK2を用いている。
なお、この鍵K1とK2とは、交換することができる。
この実施の形態では、パディングなしの場合に鍵K2を
用い、パディングありの場合に鍵K1を用いることとし
ている。これは、メッセージ長がブロック長の整数倍で
ない場合パディングありのケースが多いと予想され、実
用上多いとされるケースを鍵K1を使い鍵K2のロード
が不要となる「軽い」処理に当てたものである。アプリ
ケーションや実装に応じて処理が軽くなるように鍵K1
とK2を交換することができる。
Here, different keys K1 and K2 are used when the message length is an integral multiple of the block length (no padding) and in other cases (with padding).
The keys K1 and K2 can be exchanged.
In this embodiment, the key K2 is used without padding, and the key K1 is used with padding. This is because it is expected that there will be many cases with padding when the message length is not an integer multiple of the block length, and the case that is considered to be practically large is applied to the "light" processing that uses the key K1 and does not require loading of the key K2. It is a thing. Key K1 to make the processing light depending on the application and implementation
And K2 can be exchanged.

【0029】実施形態2図2は、別の実施形態を示す図
である。実施形態1と実施形態2とで異なる点は最終ブ
ロックの処理のみであり、デ−タ長がブロック長の倍数
である場合は、最終ブロックに鍵K2との排他的論理和
をとって暗号化を行ない、データ長がブロック長の倍数
でない場合は、最終ブロックの末尾に1を付加し、更に
ブロック長に収まるよう0を付加したデータを鍵K1と
K2との排他的論理和をとった新たな鍵にて暗号化を行
なう。
Embodiment 2 FIG. 2 is a diagram showing another embodiment. The difference between the first embodiment and the second embodiment is only the processing of the final block, and when the data length is a multiple of the block length, the final block is encrypted by exclusive ORing with the key K2. If the data length is not a multiple of the block length, 1 is added to the end of the last block, and 0 is added so that it fits within the block length. The data is exclusive ORed with the keys K1 and K2. Encryption with a key.

【0030】なお、本実施形態においてもメッセージ長
がブロック長の整数倍の時(パディングなし)とそれ以
外の場合(パディングあり)で用いる鍵K1とK2との
排他的論理和の鍵と鍵K2とは交換可能である。
Also in this embodiment, the key K2 and the exclusive OR of the keys K1 and K2 used when the message length is an integral multiple of the block length (no padding) and in other cases (with padding). And are exchangeable.

【0031】また、本実施形態においては鍵K1とK2
との排他的論理和の鍵と鍵K2とを用いたのであるが、
鍵K1とK2との排他的論理和の鍵と鍵K1とを用いる
こともでき、これらの交換も可能である。
Further, in this embodiment, the keys K1 and K2 are used.
The key of the exclusive OR with the key K2 is used.
It is also possible to use the exclusive OR key of the keys K1 and K2 and the key K1 and exchange them.

【0032】[0032]

【発明の効果】以上説明したようにこの発明によれば、
XCBCの利点を保持したまま従来のような三つの鍵を用い
ることなく二つの鍵で済むことになり、従来の三つ目の
鍵を事前共有するための処理コスト(送信あるいは計算
コスト)を削減でき処理速度の向上にも寄与する。ま
た、ソフトウェア実装の場合、実行時に従来の三つ目の
鍵をメモリからロードするコスト及びこのためのワーク
エリアを削減でき処理速度の向上や省メモリ化が図られ
る。更に、ハードウェア実装の場合、従来の三つ目の鍵
を格納するレジスタを削減でき省電力が図られる。な
お、CBC MACの改良方式のうち本発明は、暗号化回数、
鍵セットアップ回数、鍵長とも最小になっている。
As described above, according to the present invention,
While maintaining the advantages of XCBC, two keys can be used without using the conventional three keys, and the processing cost (transmission or calculation cost) for pre-sharing the conventional third key is reduced. It also contributes to the improvement of processing speed. Further, in the case of software implementation, the cost of loading the conventional third key from the memory at the time of execution and the work area for this can be reduced, and the processing speed can be improved and the memory can be saved. Furthermore, in the case of hardware implementation, it is possible to reduce the number of conventional registers that store the third key and save power. Among the improved methods of CBC MAC, the present invention is
Both the key setup count and key length are minimized.

【図面の簡単な説明】[Brief description of drawings]

【図1】実施形態1のアルゴリズムを示す図である。FIG. 1 is a diagram showing an algorithm of a first embodiment.

【図2】実施形態2のアルゴリズムを示す図である。FIG. 2 is a diagram showing an algorithm of a second embodiment.

【図3】メッセージ認証装置一例のブロック図である。FIG. 3 is a block diagram of an example of a message authentication device.

【図4】従来例CBC MACの構成図である。FIG. 4 is a block diagram of a conventional CBC MAC.

【図5】従来例XCBCの構成図である。FIG. 5 is a block diagram of a conventional example XCBC.

【符号の説明】[Explanation of symbols]

1 入力処理部 2 暗号化処理部 3 排他的論理回路処理部 4 パディング処理部 Mi 分割したブロック E ブロック暗号 K1、K2 鍵、 EX 排他的論理和。 1 Input processing section 2 Encryption processing unit 3 Exclusive logic circuit processor 4 padding processing section Mi divided blocks E block cipher K1, K2 keys, EX Exclusive OR.

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 入力処理部においてディジタルデータの
データ長を固定ブロック長のブロックに分割した各ブロ
ックに対して、暗号化処理部において最初のブロックを
鍵K1で暗号化し、排他的論理和処理部においてその暗
号化の結果と次のブロックとの排他的論理和をとり、暗
号化処理部においてその排他的論理和の結果を鍵K1で
暗号化し、排他的論理和処理部においてその暗号化の結
果と更に次のブロックとの排他的論理和をとるという手
順を連鎖的に繰り返し、ディジタルデータのデータ長が
ブロック長の倍数でない最終ブロックの場合ではパデイ
ング処理部においてデータを付加してブロック長とした
うえで前段の暗号化の結果と排他的論理和をとり、暗号
化処理部においてその排他的論理和の結果を鍵K1で暗
号化し、その暗号化の結果をメッセージ認証モードとし
て出力するメッセージ認証装置において、 前記ディジタルデータのデータ長がブロック長の倍数で
ある場合は、最終ブロックに鍵K1及び別の鍵K2のい
ずれか一方の鍵との排他的論理和をとって暗号化を行な
い、 前記ディジタルデータのデータ長がブロック長の倍数で
ない場合は、最終ブロックの末尾に1を付加し、さらに
ブロック長に収まるよう0を付加したデータを前記鍵K
1及び別の鍵K2のいずれか一方の鍵とは異なる別の鍵
K2及び鍵K1のいずれか一方の鍵との排他的論理和を
とって暗号化を行なう、ことを特徴とするメッセージ認
証装置。
1. An exclusive OR processing unit for encrypting the first block of a block obtained by dividing the data length of digital data into blocks having a fixed block length in an input processing unit with a key K1. At X, an exclusive OR of the result of the encryption and the next block is taken, and at the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and at the exclusive OR processing unit, the result of the encryption. Then, the procedure of taking the exclusive OR with the next block is repeated in a chained manner, and in the case of the final block in which the data length of the digital data is not a multiple of the block length, data is added in the padding processing unit to obtain the block length. Then, the exclusive OR is obtained with the result of the encryption in the previous stage, and the result of the exclusive OR is encrypted with the key K1 in the encryption processing unit, and the encryption is performed. In a message authentication device that outputs the result of (1) as a message authentication mode, if the data length of the digital data is a multiple of the block length, the last block is exclusive with either one of the key K1 and another key K2. If the digital data is not a multiple of the block length, the data is added with 1 at the end of the final block, and 0 is added so that it fits within the block length.
1 and another key K2, and a message authentication device characterized by performing an exclusive OR with another key K2 or key K1 different from the other key to perform encryption. .
【請求項2】 入力処理部においてディジタルデータの
データ長を固定ブロック長のブロックに分割した各ブロ
ックに対して、暗号化処理部において最初のブロックを
鍵K1で暗号化し、排他的論理和処理部においてその暗
号化の結果と次のブロックとの排他的論理和をとり、暗
号化処理部においてその排他的論理和の結果を鍵K1で
暗号化し、排他的論理和処理部においてその暗号化の結
果と更に次のブロックとの排他的論理和をとるという手
順を連鎖的に繰り返し、ディジタルデータのデータ長が
ブロック長の倍数でない最終ブロックの場合ではパデイ
ング処理部においてデータを付加してブロック長とした
うえで前段の暗号化の結果と排他的論理和をとり、暗号
化処理部においてその排他的論理和の結果を鍵K1で暗
号化し、その暗号化の結果をメッセージ認証モードとし
て出力するメッセージ認証装置において、 前記ディジタルデータのデータ長がブロック長の倍数で
ある場合は、最終ブロックに鍵K1と別の鍵K2との排
他的論理和による鍵及び別の鍵K2のいずれか一方の鍵
との排他的論理和をとって暗号化を行ない、 前記ディジタルデータのデータ長がブロック長の倍数で
ない場合は、最終ブロックの末尾に1を付加し、さらに
ブロック長に収まるよう0を付加したデータを前記鍵K
1と別の鍵K2との排他的論理和による鍵及び別の鍵K
2のいずれか一方の鍵とは異なる別の鍵K2及び鍵K1
と別の鍵K2との排他的論理和による鍵のいずれか一方
の鍵との排他的論理和をとって暗号化を行なう、ことを
特徴とするメッセージ認証装置。
2. An exclusive OR processing unit for encrypting the first block of the block obtained by dividing the data length of the digital data into blocks having a fixed block length in the input processing unit by the key K1 in the encryption processing unit. At X, an exclusive OR of the result of the encryption and the next block is taken, and at the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and at the exclusive OR processing unit, the result of the encryption. Then, the procedure of taking the exclusive OR with the next block is repeated in a chained manner, and in the case of the final block in which the data length of the digital data is not a multiple of the block length, data is added in the padding processing unit to obtain the block length. Then, the exclusive OR is obtained with the result of the encryption in the previous stage, and the result of the exclusive OR is encrypted with the key K1 in the encryption processing unit, and the encryption is performed. In the message authentication device for outputting the result of the above as a message authentication mode, when the data length of the digital data is a multiple of the block length, a key obtained by exclusive OR of the key K1 and another key K2 in the final block and another key When the data length of the digital data is not a multiple of the block length, 1 is added to the end of the final block and the block is added to the block. The data with 0 added so that it fits in the length is the key K
Key by exclusive OR of 1 and another key K2 and another key K
Another key K2 and key K1 different from one of the keys 2
And a different key K2, the message is authenticated by exclusive OR with either one of the keys.
【請求項3】 入力処理部においてディジタルデータの
データ長を固定ブロック長のブロックに分割した各ブロ
ックに対して、暗号化処理部において最初のブロックを
鍵K1で暗号化し、排他的論理和処理部においてその暗
号化の結果と次のブロックとの排他的論理和をとり、暗
号化処理部においてその排他的論理和の結果を鍵K1で
暗号化し、排他的論理和処理部においてその暗号化の結
果と更に次のブロックとの排他的論理和をとるという手
順を連鎖的に繰り返し、ディジタルデータのデータ長が
ブロック長の倍数でない最終ブロックの場合ではパデイ
ング処理部においてデータを付加してブロック長とした
うえで前段の暗号化の結果と排他的論理和をとり、暗号
化処理部においてその排他的論理和の結果を鍵K1で暗
号化し、その暗号化の結果をメッセージ認証モ−ドとし
て出力するメッセージ認証装置において、 前記ディジタルデータのデータ長がブロック長の倍数で
ある場合は、最終ブロックに鍵K1と別の鍵K2との排
他的論理和による鍵及び鍵K1のいずれか一方の鍵との
排他的論理和をとって暗号化を行ない、 前記ディジタルデータのデータ長がブロック長の倍数で
ない場合は、最終ブロックの末尾に1を付加し、さらに
ブロック長に収まるよう0を付加したデータを前記鍵K
1と別の鍵K2との排他的論理和による鍵及び鍵K1の
いずれか一方の鍵とは異なる鍵K1及び鍵K1と別の鍵
K2との排他的論理和による鍵のいずれか一方の鍵との
排他的論理和をとって暗号化を行なう、ことを特徴とし
たメッセージ認証装置。
3. An exclusive OR processing unit for encrypting the first block of the block obtained by dividing the data length of the digital data into blocks having a fixed block length in the input processing unit with the key K1 in the encryption processing unit. At X, an exclusive OR of the result of the encryption and the next block is taken, and at the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and at the exclusive OR processing unit, the result of the encryption. Then, the procedure of taking the exclusive OR with the next block is repeated in a chained manner, and in the case of the final block in which the data length of the digital data is not a multiple of the block length, data is added in the padding processing unit to obtain the block length. Then, the exclusive OR is obtained with the result of the encryption in the previous stage, and the result of the exclusive OR is encrypted with the key K1 in the encryption processing unit, and the encryption is performed. In a message authentication device for outputting the result of the above as a message authentication mode, when the data length of the digital data is a multiple of the block length, a key obtained by exclusive OR of the key K1 and another key K2 in the final block. And the key K1 is used for exclusive OR operation for encryption. If the data length of the digital data is not a multiple of the block length, 1 is added to the end of the final block, and the block is further added. The data with 0 added so that it fits in the length is the key K
One of the key K1 and the key of the key K1 different from either one of the key K1 and the key of the key K1 and the key of the exclusive OR of the key K1 and another key K2 A message authentication device characterized by performing an exclusive OR with and performing encryption.
【請求項4】 入力処理部においてディジタルデータの
データ長を固定ブロック長のブロックに分割した各ブロ
ックに対して、暗号化処理部において最初のブロックを
鍵K1で暗号化し、排他的論理和処理部においてその暗
号化の結果と次のブロックとの排他的論理和をとり、暗
号化処理部においてその排他的論理和の結果を鍵K1で
暗号化し、排他的論理和処理部においてその暗号化の結
果と更に次のブロックとの排他的論理和をとるという手
順を連鎖的に繰り返し、 ディジタルデータのデータ長がブロック長の倍数でない
最終ブロックの場合ではパデイング処理部においてデー
タを付加してブロック長としたうえで前段の暗号化の結
果と排他的論理和をとり、暗号化処理部においてその排
他的論理和の結果を鍵K1で暗号化し、その暗号化の結
果をメッセージ認証モ−ドとして出力するメッセージ認
証方法において、 前記ディジタルデータのデータ長がブロック長の倍数で
ある場合は、最終ブロックに鍵K1及び別の鍵K2のい
ずれか一方の鍵との排他的論理和をとって暗号化を行な
い、 前記ディジタルデータのデータ長がブロック長の倍数で
ない場合は、最終ブロックの末尾に1を付加し、さらに
ブロック長に収まるよう0を付加したデータを前記鍵K
1及び別の鍵K2のいずれか一方の鍵とは異なる別の鍵
K2及び鍵K1のいずれか一方の鍵との排他的論理和を
とって暗号化を行なう、ことを特徴としたメッセージ認
証方法。
4. The exclusive OR processing unit encrypts the first block with a key K1 in the encryption processing unit for each block obtained by dividing the data length of digital data into blocks of fixed block length in the input processing unit. At X, an exclusive OR of the result of the encryption and the next block is taken, and at the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and at the exclusive OR processing unit, the result of the encryption. Then, the procedure of taking the exclusive OR with the next block is repeated in a chained manner, and in the case of the final block in which the data length of the digital data is not a multiple of the block length, data is added in the padding processing unit to obtain the block length. Then, the exclusive OR is obtained with the result of the encryption in the previous stage, and the result of the exclusive OR is encrypted with the key K1 in the encryption processing unit. In the message authentication method for outputting the result as the message authentication mode, in the case where the data length of the digital data is a multiple of the block length, the key K1 or another key K2 is added to the final block. When the data length of the digital data is not a multiple of the block length, encryption is performed by exclusive OR, and 1 is added to the end of the final block, and 0 is added so that the data fits within the block length. Key K
1 and another key K2, and a message authentication method characterized by performing an exclusive OR with another key K2 or key K1 different from the other key to perform encryption. .
【請求項5】 入力処理部においてディジタルデータの
データ長を固定ブロック長のブロックに分割した各ブロ
ックに対して、暗号化処理部において最初のブロックを
鍵K1で暗号化し、排他的論理和処理部においてその暗
号化の結果と次のブロックとの排他的論理和をとり、暗
号化処理部においてその排他的論理和の結果を鍵K1で
暗号化し、排他的論理和処理部においてその暗号化の結
果と更に次のブロックとの排他的論理和をとるという手
順を連鎖的に繰り返し、ディジタルデータのデータ長が
ブロック長の倍数でない最終ブロックの場合ではパデイ
ング処理部においてデータを付加してブロック長とした
うえで前段の暗号化の結果と排他的論理和をとり、暗号
化処理部においてその排他的論理和の結果を鍵K1で暗
号化し、その暗号化の結果をメッセージ認証モ−ドとし
て出力するメッセージ認証方法において、 前記ディジタルデータのデータ長がブロック長の倍数で
ある場合は、最終ブロックに鍵K1と別の鍵K2との排
他的論理和による鍵及び別の鍵K2のいずれか一方の鍵
との排他的論理和をとって暗号化を行ない、 前記ディジタルデータのデータ長がブロック長の倍数で
ない場合は、最終ブロックの末尾に1を付加し、さらに
ブロック長に収まるよう0を付加したデータを前記鍵K
1と別の鍵K2との排他的論理和による鍵及び別の鍵K
2のいずれか一方の鍵とは異なる別の鍵K2及び鍵K1
と別の鍵K2との排他的論理和による鍵のいずれか一方
の鍵との排他的論理和をとって暗号化を行なう、ことを
特徴としたメッセージ認証方法。
5. An exclusive OR processing unit for encrypting the first block of the block obtained by dividing the data length of the digital data into blocks having a fixed block length in the input processing unit with the key K1 in the encryption processing unit. At X, an exclusive OR of the result of the encryption and the next block is taken, and at the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and at the exclusive OR processing unit, the result of the encryption. Then, the procedure of taking the exclusive OR with the next block is repeated in a chained manner, and in the case of the final block in which the data length of the digital data is not a multiple of the block length, data is added in the padding processing unit to obtain the block length. Then, the exclusive OR is obtained with the result of the encryption in the previous stage, and the result of the exclusive OR is encrypted with the key K1 in the encryption processing unit, and the encryption is performed. In the message authentication method for outputting the result as the message authentication mode, when the data length of the digital data is a multiple of the block length, a key obtained by exclusive OR of the key K1 and another key K2 in the final block. And another key K2 is used for exclusive OR operation for encryption, and when the data length of the digital data is not a multiple of the block length, 1 is added to the end of the final block, Further, the data with 0 added so that it fits in the block length is the key K
Key by exclusive OR of 1 and another key K2 and another key K
Another key K2 and key K1 different from one of the keys 2
And a different key K2, the message is authenticated by exclusive OR with either one of the keys.
【請求項6】 入力処理部においてディジタルデータの
データ長を固定ブロック長のブロックに分割した各ブロ
ックに対して、暗号化処理部において最初のブロックを
鍵K1で暗号化し、排他的論理和処理部においてその暗
号化の結果と次のブロックとの排他的論理和をとり、暗
号化処理部においてその排他的論理和の結果を鍵K1で
暗号化し、排他的論理和処理部においてその暗号化の結
果と更に次のブロックとの排他的論理和をとるという手
順を連鎖的に繰り返し、ディジタルデータのデータ長が
ブロック長の倍数でない最終ブロックの場合ではパデイ
ング処理部においてデータを付加してブロック長とした
うえで前段の暗号化の結果と排他的論理和をとり、暗号
化処理部においてその排他的論理和の結果を鍵K1で暗
号化し、その暗号化の結果をメッセージ認証モ−ドとし
て出力するメッセージ認証方法において、 前記ディジタルデータのデータ長がブロック長の倍数で
ある場合は、最終ブロックに鍵K1と別の鍵K2との排
他的論理和による鍵及び鍵K1のいずれか一方の鍵との
排他的論理和をとって暗号化を行ない、 前記ディジタルデータのデータ長がブロック長の倍数で
ない場合は、最終ブロックの末尾に1を付加し、さらに
ブロック長に収まるよう0を付加したデータを前記鍵K
1と別の鍵K2との排他的論理和による鍵及び鍵K1の
いずれか一方の鍵とは異なる鍵K1及び鍵K1と別の鍵
K2との排他的論理和による鍵のいずれか一方の鍵との
排他的論理和をとって暗号化を行なう、ことを特徴とし
たメッセージ認証方法。
6. An exclusive OR processing unit that encrypts the first block of the digital data in the input processing unit into blocks of a fixed block length by the encryption processing unit by encrypting the first block with the key K1. At X, an exclusive OR of the result of the encryption and the next block is taken, and at the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and at the exclusive OR processing unit, the result of the encryption. Then, the procedure of taking the exclusive OR with the next block is repeated in a chained manner, and in the case of the final block in which the data length of the digital data is not a multiple of the block length, data is added in the padding processing unit to obtain the block length. Then, the exclusive OR is obtained with the result of the encryption in the previous stage, and the result of the exclusive OR is encrypted with the key K1 in the encryption processing unit, and the encryption is performed. In the message authentication method for outputting the result as the message authentication mode, when the data length of the digital data is a multiple of the block length, a key obtained by exclusive OR of the key K1 and another key K2 in the final block. And the key K1 is used for exclusive OR operation for encryption. If the data length of the digital data is not a multiple of the block length, 1 is added to the end of the final block, and the block is further added. The data with 0 added so that it fits in the length is the key K
One of the key K1 and the key of the key K1 different from either one of the key K1 and the key of the key K1 and the key of the exclusive OR of the key K1 and another key K2 A message authentication method characterized by performing an exclusive OR with and performing encryption.
【請求項7】 入力処理部においてディジタルデータの
データ長を固定ブロック長のブロックに分割した各ブロ
ックに対して、暗号化処理部において最初のブロックを
鍵K1で暗号化し、排他的論理和処理部においてその暗
号化の結果と次のブロックとの排他的論理和をとり、暗
号化処理部においてその排他的論理和の結果を鍵K1で
暗号化し、排他的論理和処理部においてその暗号化の結
果と更に次のブロックとの排他的論理和をとるという手
順を連鎖的に繰り返し、ディジタルデータのデータ長が
ブロック長の倍数でない最終ブロックの場合ではパデイ
ング処理部においてデータを付加してブロック長とした
うえで前段の暗号化の結果と排他的論理和をとり、暗号
化処理部においてその排他的論理和の結果を鍵K1で暗
号化し、その暗号化の結果をメッセージ認証モ−ドとし
て出力するメッセージ認証プログラムにおいて、 前記ディジタルデータのデータ長がブロック長の倍数で
ある場合は、最終ブロックに鍵K1及び別の鍵K2のい
ずれか一方の鍵との排他的論理和をとって暗号化を行な
い、 前記ディジタルデータのデータ長がブロック長の倍数で
ない場合は、最終ブロックの末尾に1を付加し、さらに
ブロック長に収まるよう0を付加したデータを前記鍵K
1及び別の鍵K2のいずれか一方の鍵とは異なる別の鍵
K2及び鍵K1のいずれか一方の鍵との排他的論理和を
とって暗号化を行なう、ことを特徴とするメッセージ認
証プログラム。
7. The exclusive OR processing unit encrypts the first block with a key K1 in the encryption processing unit for each block obtained by dividing the data length of digital data into blocks of fixed block length in the input processing unit. At X, an exclusive OR of the result of the encryption and the next block is taken, and at the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and at the exclusive OR processing unit, the result of the encryption. Then, the procedure of taking the exclusive OR with the next block is repeated in a chained manner, and in the case of the final block in which the data length of the digital data is not a multiple of the block length, data is added in the padding processing unit to obtain the block length. Then, the exclusive OR is obtained with the result of the encryption in the previous stage, and the result of the exclusive OR is encrypted with the key K1 in the encryption processing unit, and the encryption is performed. In a message authentication program that outputs the result of (1) as a message authentication mode, if the data length of the digital data is a multiple of the block length, the last block is a key K1 or another key K2. When the data length of the digital data is not a multiple of the block length, encryption is performed by exclusive OR, and 1 is added to the end of the final block, and 0 is added so that the data fits within the block length. Key K
1 and another key K2, and a message authentication program characterized by performing an exclusive OR operation with another key K2 or key K1 different from the other key to perform encryption. .
【請求項8】 入力処理部においてディジタルデータの
データ長を固定ブロック長のブロックに分割した各ブロ
ックに対して、暗号化処理部において最初のブロックを
鍵K1で暗号化し、排他的論理和処理部においてその暗
号化の結果と次のブロックとの排他的論理和をとり、暗
号化処理部においてその排他的論理和の結果を鍵K1で
暗号化し、排他的論理和処理部においてその暗号化の結
果と更に次のブロックとの排他的論理和をとるという手
順を連鎖的に繰り返し、ディジタルデータのデータ長が
ブロック長の倍数でない最終ブロックの場合ではパデイ
ング処理部においてデータを付加してブロック長とした
うえで前段の暗号化の結果と排他的論理和をとり、暗号
化処理部においてその排他的論理和の結果を鍵K1で暗
号化し、その暗号化の結果をメッセージ認証モ−ドとし
て出力するメッセージ認証プログラムにおいて、 前記ディジタルデータのデータ長がブロック長の倍数で
ある場合は、最終ブロックに鍵K1と別の鍵K2との排
他的論理和による鍵及び別の鍵K2のいずれか一方の鍵
との排他的論理和をとって暗号化を行ない、 前記ディジタルデータのデータ長がブロック長の倍数で
ない場合は、最終ブロックの末尾に1を付加し、 さらにブロック長に収まるよう0を付加したデータを前
記鍵K1と別の鍵K2との排他的論理和による鍵及び別
の鍵K2のいずれか一方の鍵とは異なる別の鍵K2及び
鍵K1と別の鍵K2との排他的論理和による鍵のいずれ
か一方の鍵との排他的論理和をとって暗号化を行なう、
ことを特徴とするメッセージ認証プログラム。
8. The exclusive OR processing unit encrypts the first block with a key K1 in the encryption processing unit for each block obtained by dividing the data length of digital data into blocks having a fixed block length in the input processing unit. At X, an exclusive OR of the result of the encryption and the next block is taken, and at the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and at the exclusive OR processing unit, the result of the encryption. Then, the procedure of taking the exclusive OR with the next block is repeated in a chained manner, and in the case of the final block in which the data length of the digital data is not a multiple of the block length, data is added in the padding processing unit to obtain the block length. Then, the exclusive OR is obtained with the result of the encryption in the previous stage, and the result of the exclusive OR is encrypted with the key K1 in the encryption processing unit, and the encryption is performed. In a message authentication program which outputs the result of the above as a message authentication mode, when the data length of the digital data is a multiple of the block length, a key obtained by exclusive OR of the key K1 and another key K2 in the final block. And another key K2 is used for exclusive OR operation for encryption, and when the data length of the digital data is not a multiple of the block length, 1 is added to the end of the final block, Further, data to which 0 is added so as to fit in the block length is obtained by exclusive OR of the key K1 and another key K2, and another key K2 and key K1 different from one of the other keys K2 and K2. Encryption is performed by taking the exclusive OR with either one of the keys by the exclusive OR with another key K2,
A message authentication program characterized in that
【請求項9】 入力処理部においてディジタルデータの
データ長を固定ブロック長のブロックに分割した各ブロ
ックに対して、暗号化処理部において最初のブロックを
鍵K1で暗号化し、排他的論理和処理部においてその暗
号化の結果と次のブロックとの排他的論理和をとり、暗
号化処理部においてその排他的論理和の結果を鍵K1で
暗号化し、排他的論理和処理部においてその暗号化の結
果と更に次のブロックとの排他的論理和をとるという手
順を連鎖的に繰り返し、ディジタルデータのデータ長が
ブロック長の倍数でない最終ブロックの場合ではパデイ
ング処理部においてデータを付加してブロック長とした
うえで前段の暗号化の結果と排他的論理和をとり、暗号
化処理部においてその排他的論理和の結果を鍵K1で暗
号化し、その暗号化の結果をメッセージ認証モ−ドとし
て出力するメッセージ認証プログラムにおいて、 前記ディジタルデータのデータ長がブロック長の倍数で
ある場合は、最終ブロックに鍵K1と別の鍵K2との排
他的論理和による鍵及び鍵K1のいずれか一方の鍵との
排他的論理和をとって暗号化を行ない、 前記ディジタルデータのデータ長がブロック長の倍数で
ない場合は、最終ブロックの末尾に1を付加し、さらに
ブロック長に収まるよう0を付加したデータを前記鍵K
1と別の鍵K2との排他的論理和による鍵及び鍵K1の
いずれか一方の鍵とは異なる鍵K1及び鍵K1と別の鍵
K2との排他的論理和による鍵のいずれか一方の鍵との
排他的論理和をとって暗号化を行なう、ことを特徴とし
たメッセージ認証プログラム。
9. An exclusive OR processing unit for encrypting a first block of a block obtained by dividing the data length of digital data into blocks having a fixed block length in an input processing unit by a key K1 in an encryption processing unit. At X, an exclusive OR of the result of the encryption and the next block is taken, and at the encryption processing unit, the result of the exclusive OR is encrypted with the key K1, and at the exclusive OR processing unit, the result of the encryption. Then, the procedure of taking the exclusive OR with the next block is repeated in a chained manner, and in the case of the final block in which the data length of the digital data is not a multiple of the block length, data is added in the padding processing unit to obtain the block length. Then, the exclusive OR is obtained with the result of the encryption in the previous stage, and the result of the exclusive OR is encrypted with the key K1 in the encryption processing unit, and the encryption is performed. In a message authentication program which outputs the result of the above as a message authentication mode, when the data length of the digital data is a multiple of the block length, a key obtained by exclusive OR of the key K1 and another key K2 in the final block. And the key K1 is used for exclusive OR operation for encryption. If the data length of the digital data is not a multiple of the block length, 1 is added to the end of the final block, and the block is further added. The data with 0 added so that it fits in the length is the key K
One of the key K1 and the key of the key K1 different from either one of the key K1 and the key of the key K1 and the key of the exclusive OR of the key K1 and another key K2 A message authentication program characterized by performing an exclusive-OR with and performing encryption.
【請求項10】 請求項7乃至9のいずれか1項に記載
のメッセージ認証プログラムを記録したコンピュータ読
取り可能な記録媒体。
10. A computer-readable recording medium recording the message authentication program according to claim 7.
JP2002134367A 2002-05-09 2002-05-09 Message authentication device, message authenticating method, message authenticating program, and computer- readable recording medium with the program stored thereon Pending JP2003333036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002134367A JP2003333036A (en) 2002-05-09 2002-05-09 Message authentication device, message authenticating method, message authenticating program, and computer- readable recording medium with the program stored thereon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002134367A JP2003333036A (en) 2002-05-09 2002-05-09 Message authentication device, message authenticating method, message authenticating program, and computer- readable recording medium with the program stored thereon

Publications (1)

Publication Number Publication Date
JP2003333036A true JP2003333036A (en) 2003-11-21

Family

ID=29697037

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002134367A Pending JP2003333036A (en) 2002-05-09 2002-05-09 Message authentication device, message authenticating method, message authenticating program, and computer- readable recording medium with the program stored thereon

Country Status (1)

Country Link
JP (1) JP2003333036A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007052477A1 (en) 2005-11-04 2007-05-10 Nec Corporation Message authentication device, message authentication method, message authentication program, and recording medium therefor
WO2008105343A1 (en) * 2007-02-28 2008-09-04 Nec Corporation Message authentication device
US10153896B2 (en) 2014-09-05 2018-12-11 Samsung Electronics Co., Ltd. Method and device for data encrypting
CN111052670A (en) * 2017-09-01 2020-04-21 三菱电机株式会社 Encryption device, decryption device, encryption method, decryption method, encryption program, and decryption program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007052477A1 (en) 2005-11-04 2007-05-10 Nec Corporation Message authentication device, message authentication method, message authentication program, and recording medium therefor
US8589688B2 (en) 2005-11-04 2013-11-19 Nec Corporation Message authentication device, message authentication method, message authentication program and storage medium therefor
WO2008105343A1 (en) * 2007-02-28 2008-09-04 Nec Corporation Message authentication device
US10153896B2 (en) 2014-09-05 2018-12-11 Samsung Electronics Co., Ltd. Method and device for data encrypting
CN111052670A (en) * 2017-09-01 2020-04-21 三菱电机株式会社 Encryption device, decryption device, encryption method, decryption method, encryption program, and decryption program
CN111052670B (en) * 2017-09-01 2024-02-09 三菱电机株式会社 Encryption device, decryption device, encryption method, decryption method, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
JP2575558B2 (en) Public key use control method and apparatus
US6199162B1 (en) Block cipher method
US20080084996A1 (en) Authenticated encryption method and apparatus
AU2011363942B2 (en) Method and system for protecting execution of cryptographic hash functions
US10009171B2 (en) Construction and uses of variable-input-length tweakable ciphers
US7415109B2 (en) Partial encryption and full authentication of message blocks
US7860241B2 (en) Simple universal hash for plaintext aware encryption
US11546135B2 (en) Key sequence generation for cryptographic operations
JP5704159B2 (en) Block encryption device, block decryption device, block encryption method, block decryption method, and program
KR20050027254A (en) Efficient encryption and authentication for data processing systems
US7894608B2 (en) Secure approach to send data from one system to another
WO2014136386A1 (en) Tag generation device, tag generation method, and tag generation program
US7254233B2 (en) Fast encryption and authentication for data processing systems
WO2013065241A1 (en) Incremental mac tag generation device, method, and program, and message authentication device
Black Authenticated Encryption.
US20230093437A1 (en) Scrambler Apparatus And Method In Particular For Cryptographic Applications, And Descrambler Apparatus And Method Therefor
WO1999014889A1 (en) Improved block cipher method
JP2003333036A (en) Message authentication device, message authenticating method, message authenticating program, and computer- readable recording medium with the program stored thereon
US7092524B1 (en) Device for and method of cryptographically wrapping information
JP6631989B2 (en) Encryption device, control method, and program
US20030198342A1 (en) System and method for implementing a hash algorithm
KR100494560B1 (en) Real time block data encryption/decryption processor using Rijndael block cipher and method therefor
Saudagar et al. Image Encryption based on Advanced Encryption Standard (AES)
Liu Software protection with encryption and verification
JP2004347885A (en) Encryption device processing method, decryption device processing method, device and program for same