JP2013182148A - Information processing apparatus, information processing method, and program - Google Patents

Information processing apparatus, information processing method, and program Download PDF

Info

Publication number
JP2013182148A
JP2013182148A JP2012046308A JP2012046308A JP2013182148A JP 2013182148 A JP2013182148 A JP 2013182148A JP 2012046308 A JP2012046308 A JP 2012046308A JP 2012046308 A JP2012046308 A JP 2012046308A JP 2013182148 A JP2013182148 A JP 2013182148A
Authority
JP
Japan
Prior art keywords
data
key
processing
bit slice
bit
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
JP2012046308A
Other languages
Japanese (ja)
Inventor
Seiichi Matsuda
誠一 松田
Shiho Moriai
志帆 盛合
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2012046308A priority Critical patent/JP2013182148A/en
Publication of JP2013182148A publication Critical patent/JP2013182148A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To accelerate cipher processing by software (program).SOLUTION: According to a program defining a cipher processing sequence, data conversion processing S121 generates bit slice expression data based on two or more pieces of plaintext data, key conversion processing S111 generates a bit slice expression key based on a cipher key of each plaintext, key schedule processing S112 generates a round key based on the bit slice expression key, cipher processing S122 executes cipher processing including computation of a block unit of the bit slice expression data, movement, round key application computation, etc., and data inverse conversion processing S123 generates two or more pieces of ciphered data corresponding to the two or more pieces of plaintext data by data inverse conversion to cipher processing results. In the key schedule processing S112 of generating the round key, the round key is generated by the processing of the computation and movement or the like of a bit slice expression key block unit composed of the data of the same order of the bit of the respective cipher keys configuring the bit slice expression key.

Description

本開示は、情報処理装置、および情報処理方法、並びにプログラムに関する。さらに詳細には、大量データの暗号処理の高速化を実現する情報処理装置、および情報処理方法、並びにプログラムに関する。   The present disclosure relates to an information processing device, an information processing method, and a program. More specifically, the present invention relates to an information processing apparatus, an information processing method, and a program that realize high-speed encryption processing of a large amount of data.

情報化社会が発展すると共に、扱う情報を安全に守るための情報セキュリティ技術の重要性が増してきている。情報セキュリティ技術の構成要素の一つとして暗号技術があり、現在では様々な製品やシステムで暗号技術が利用されている。   With the development of the information society, the importance of information security technology for safeguarding the information handled is increasing. One of the components of information security technology is encryption technology, which is currently used in various products and systems.

例えばインターネット等のネットワークを介した通信が盛んに行われており、また、PC、携帯端末、RFIDや様々なセンサ等の多種多様なデバイスがネットワークに接続し通信が行われている。このような環境の中で、個人のプライバシーを保護しながら利便性を高めるネットワーク社会を実現するための情報セキュリティ技術が不可欠となり、安全性が高く、かつ高速処理の可能な暗号技術が求められている。   For example, communication via a network such as the Internet is actively performed, and various devices such as a PC, a portable terminal, an RFID, and various sensors are connected to the network for communication. In such an environment, information security technology for realizing a network society that enhances convenience while protecting personal privacy is indispensable, and encryption technology that is safe and capable of high-speed processing is required. Yes.

例えば個人の所有する端末から送信される情報や、家に設置されたセンサを介して取得された情報をサーバが収集し、サーバが収集情報に対して様々なデータ処理や解析を行うシステムが利用されている。
具体的には、例えば家庭やオフィスにセンサを配置して電力消費量を管理するシステムや、独居老人宅にセンサを配置して健康・安全管理に利用するサービス、道路や車両にセンサを配置して渋滞検知・緩和に利用する交通システムなどである。
For example, a server collects information transmitted from a terminal owned by an individual or information acquired through a sensor installed at home, and the server uses a system that performs various data processing and analysis on the collected information Has been.
Specifically, for example, a system that installs sensors in homes and offices to manage power consumption, a service that is used for health and safety management by placing sensors in single-person nursing homes, and sensors on roads and vehicles. Traffic systems used to detect and relieve traffic jams.

このようなシステムにおいて収集するデータには、個人のプライバシー情報を含む場合が多く、プライバシー保護のためにデータを暗号化することが望まれる。しかしながら、小型ハードウェア実装向けに設計された軽量暗号アルゴリズムでない従来の暗号アルゴリズムを実装したハードウェアはモジュール規模が大きく、例えばRFIDやセンサ等の小型装置に搭載するのが困難である。また、低コストでの実現も難しく、さらに消費電力が大きくバッテリ交換の頻度が高くなるなど運用性の点などで多くの課題がある。   Data collected in such a system often includes personal privacy information, and it is desirable to encrypt the data for privacy protection. However, hardware mounted with a conventional cryptographic algorithm that is not a lightweight cryptographic algorithm designed for mounting on a small hardware has a large module scale and is difficult to mount on a small device such as an RFID or a sensor. In addition, there are many problems in terms of operability, such as difficulty in realization at low cost, and high power consumption and high frequency of battery replacement.

このような中、ハードウェア規模やメモリ等のリソースが限られた機器や、省電力性が求められる機器への実装に適した軽量暗号技術(Lightweight cryptography)へのニーズが高まっている。
このようなニーズを受けて、軽量暗号技術の研究開発が進んでおり、近年、小型ハードウェア実装の観点で優れた新しい軽量ブロック暗号がいくつか提案されている。代表例としてPRESENT,CLEFIA,KATAN,Piccoloなどがある。
Under such circumstances, there is a growing need for lightweight encryption technology suitable for mounting on devices with limited resources such as hardware scale and memory, and devices that require power saving.
In response to these needs, research and development of lightweight encryption technology is progressing, and in recent years, several new lightweight block ciphers that are excellent in terms of small hardware implementation have been proposed. Representative examples include PRESENT, CLEFIA, KATAN, and Piccolo.

これに伴い、軽量暗号技術の国際標準化も進められており、国際標準化機構ISO (International Organization for Standardization)と国際電気標準会議IEC(International Electrotechnical Commission)の合同技術委員会下で情報セキュリティ技術の国際標準化を行っている委員会ISO/IEC JTC 1/SC 27で軽量暗号の国際標準ISO/IEC 29192の規格化が進められている。   Along with this, international standardization of lightweight encryption technology has been promoted, and international standardization of information security technology under the joint technical committee of International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC). The ISO / IEC JTC 1 / SC 27 committee is currently working on standardization of the international standard ISO / IEC 29192 for lightweight cryptography.

軽量暗号技術の一つである軽量ブロック暗号の多くは、小型のハードウェア実装のために最適化されている。
すなわち、ハードウェア実装時に小型化が可能なように、4ビット等の小さなS−boxやビット演算を多用した「軽い」ラウンド関数を多数回繰り返す構造で設計されているものが多い。
この軽量暗号の構造は、進化を続けている汎用プロセッサの利点を生かしきることができず、PCやサーバでのソフトウェア実装では一般に低速であるという課題がある。
Many of the lightweight block ciphers, which are one of the lightweight cryptographic techniques, are optimized for small hardware implementation.
That is, many are designed with a structure in which a “light” round function using a large number of small S-boxes such as 4 bits and bit operations is repeated many times so that the size can be reduced when the hardware is mounted.
This lightweight cryptographic structure cannot take full advantage of the evolving general-purpose processor, and there is a problem that the software implementation on a PC or server is generally slow.

PCやサーバでのソフトウェア実装による処理の一例として、ネットワーク接続された装置を利用するクラウドコンピューティングの利用が考えられるが、クラウド上では仮想マシン間(Cross VM)サイドチャネル攻撃も脅威となっている[非特許文献1]。クラウドでは1台のサーバを複数のユーザが共有するマルチテナント方式をとる場合があり、ユーザが占有する仮想マシンVMは分離されているが、メモリやキャッシュなどの物理デバイスは共有される。仮想マシン間サイドチャネル攻撃とは、セットアソシアティブキャッシュを共有している「悪意のあるVM」が連続してキャッシュを叩き、キャッシュの反応の遅れにより他のVMでアクセスしていることを検知して鍵を導出する攻撃である。このように、クラウド上で暗号処理をソフトウェア実装で行う際にはこのようなサイドチャネル攻撃に対する耐性も課題となっている。   As an example of processing by software implementation on a PC or a server, the use of cloud computing using a device connected to a network can be considered, but a cross channel (Cross VM) side channel attack is also a threat on the cloud. [Non-Patent Document 1]. In the cloud, there is a case where a multi-tenant method in which a plurality of users share a single server and a virtual machine VM occupied by the user is separated, but physical devices such as a memory and a cache are shared. An inter-virtual machine side-channel attack is a detection of a “malicious VM” sharing a set associative cache hitting the cache continuously and accessing other VMs due to a delay in the cache response. It is an attack that derives a key. Thus, when performing cryptographic processing on the cloud by software implementation, resistance to such side channel attacks is also an issue.

Thomas Ristenpart,Eran Tromer,Hovav Shacham, Stefan Savage,"Hey, You, Get Off of My Cloud:Exploring Information Leakage in Third−Party Compute Clouds,"ACM CCS'09,November9−13,2009.Thomas Ristenpart, Eran Tromer, Hovav Shacham, Stefan Savage, “Hey, You, Get Off of My Clau. Eli Biham,"A Fast New DES Implementation in Software",FSE'97, 1997.Eli Biham, “A Fast New DES Implementation in Software”, FSE '97, 1997.

本開示は、例えば上述の状況に鑑みてなされたものであり、大量データの暗号処理の高速化を実現する情報処理装置、および情報処理方法、並びにプログラムを提供することを目的とする。
また、本開示の一実施例においては、汎用プロセッサ上で動作可能なソフトウェア(プログラム)を適用して暗号処理を実行した場合に、高速処理を可能とした情報処理装置、および情報処理方法、並びにプログラムを提供することを目的とする。
The present disclosure has been made in view of, for example, the above-described situation, and an object thereof is to provide an information processing apparatus, an information processing method, and a program that realize high-speed encryption processing of a large amount of data.
Further, in an embodiment of the present disclosure, an information processing apparatus, an information processing method, and an information processing method capable of performing high-speed processing when cryptographic processing is executed by applying software (program) operable on a general-purpose processor; The purpose is to provide a program.

本開示の第1の側面は、
暗号処理シーケンスを規定したプログラムに従ってデータ処理を実行するデータ処理部を有し、
前記データ処理部は、前記プログラムに従って、
暗号化処理対象となる複数の平文データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記複数の平文データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、暗号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した暗号処理と、
前記暗号処理の結果に対する前記ビットスライス処理の逆変換により、前記複数の平文データに対応する複数の暗号化データを生成するデータ逆変換処理を実行し、
前記鍵スケジュール処理において、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する情報処理装置にある。
The first aspect of the present disclosure is:
A data processing unit that executes data processing according to a program that defines an encryption processing sequence;
The data processing unit, according to the program,
Data conversion processing for generating bit slice expression data by bit slice processing for a plurality of plaintext data to be encrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each of the plurality of plaintext data encryption keys;
Key schedule processing for inputting the bit slice expression key and generating a round key for each round in cryptographic processing;
An encryption process applying the round key to the bit slice representation data;
A data reverse conversion process for generating a plurality of encrypted data corresponding to the plurality of plaintext data by performing an inverse conversion of the bit slice process with respect to a result of the encryption process,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
In the information processing apparatus for generating the round key by applying arithmetic processing and movement processing in units of bit slice expression key blocks configured by:

さらに、本開示の情報処理装置の一実施態様において、前記データ処理部は、前記データ変換処理において、前記ビットスライス表現データを構成する各平文データの同一ビット目またはnビットおきのビット、ただしnは2のべき数、によって構成されるビットスライス表現データブロックを処理単位として、レジスタに格納する処理を実行し、前記鍵変換処理において、前記ビットスライス表現鍵ブロックを処理単位として、レジスタに格納する処理を実行し、前記暗号処理において、前記レジスタに格納された前記ビットスライス表現データブロックと、前記ビットスライス表現鍵ブロックを単位とするブロック単位の演算処理と移動処理を適用した暗号処理を実行する。   Furthermore, in an embodiment of the information processing apparatus according to the present disclosure, the data processing unit is configured to use the same bit or every n-th bit of each plaintext data constituting the bit slice expression data in the data conversion process, where n Executes a process of storing a bit slice representation data block constituted by a power of 2 in the register as a processing unit, and storing the bit slice representation key block in the register as a processing unit in the key conversion process And executing cryptographic processing applying block-wise arithmetic processing and moving processing using the bit slice representation data block stored in the register and the bit slice representation key block as a unit. .

さらに、本開示の情報処理装置の一実施態様において、前記データ処理部は、前記鍵変換処理において、前記ビットスライス表現鍵ブロックを処理単位として、複数のレジスタに分散して格納する処理を実行し、前記鍵スケジュール処理において、前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して、前記複数のレジスタ間の演算処理と、各レジスタ格納ブロックのシフトおよびシャッフル処理を実行して、ラウンド鍵生成を行う。   Furthermore, in an embodiment of the information processing apparatus according to the present disclosure, the data processing unit performs a process of distributing and storing in a plurality of registers using the bit slice expression key block as a processing unit in the key conversion process. In the key schedule processing, a round operation is performed on the bit slice representation key block stored in the plurality of registers by performing arithmetic processing between the plurality of registers and shifting and shuffling of each register storage block. Generate a key.

さらに、本開示の情報処理装置の一実施態様において、前記データ処理部は、前記鍵スケジュール処理において、前記複数のレジスタの格納ブロックから選択されたブロックを1つのレジスタに再格納するアンパック処理を実行する。   Furthermore, in an embodiment of the information processing apparatus according to the present disclosure, the data processing unit performs an unpacking process in which the block selected from the storage blocks of the plurality of registers is re-stored in one register in the key schedule process. To do.

さらに、本開示の情報処理装置の一実施態様において、前記データ処理部は、前記鍵スケジュール処理において、前記ビットスライス表現鍵ブロックを格納した複数のレジスタの複数のビットスライス表現鍵ブロックに対して、暗号処理における各ラウンドのラウンド番号を示すラウンドカウンタとの排他的論理和演算を実行してラウンド鍵生成を行う。   Furthermore, in an embodiment of the information processing apparatus according to the present disclosure, the data processing unit is configured to perform a plurality of bit slice expression key blocks of a plurality of registers storing the bit slice expression key blocks in the key schedule process. A round key is generated by executing an exclusive OR operation with a round counter indicating the round number of each round in the cryptographic process.

さらに、本開示の情報処理装置の一実施態様において、前記データ処理部は、前記鍵スケジュール処理において、前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して予め既定した論理命令列に従った演算を実行することで、非線形変換処理(Sbox)を実行してラウンド鍵生成を行う。   Furthermore, in an embodiment of the information processing apparatus according to the present disclosure, the data processing unit uses a predetermined logical instruction sequence for the bit slice expression key block stored in the plurality of registers in the key schedule processing. By executing the calculation according to the above, a non-linear transformation process (Sbox) is executed to generate a round key.

さらに、本開示の情報処理装置の一実施態様において、前記データ処理部は、前記鍵スケジュール処理において、前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して、レジスタ単位の非線形変換処理(Sbox)を実行して、複数のラウンド鍵生成をまとめて生成する。   Furthermore, in an embodiment of the information processing apparatus according to the present disclosure, the data processing unit is configured to perform non-linear conversion processing in units of registers on the bit slice expression key blocks stored in the plurality of registers in the key schedule processing. (Sbox) is executed to generate a plurality of round key generations together.

さらに、本開示の情報処理装置の一実施態様において、前記データ処理部は、前記暗号処理において、暗号アルゴリズムPRESENTに従った暗号処理をプログラムに従って実行する。   Furthermore, in an embodiment of the information processing apparatus according to the present disclosure, the data processing unit executes cryptographic processing according to a cryptographic algorithm PRESENT according to a program in the cryptographic processing.

さらに、本開示の第2の側面は、
復号処理シーケンスを規定したプログラムに従ってデータ処理を実行するデータ処理部を有し、
前記データ処理部は、前記プログラムに従って、
復号処理対象となる複数の暗号化データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記複数の暗号化データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、復号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した復号処理と、
前記復号処理の結果に対する前記ビットスライス処理の逆変換により、前記複数の暗号化データに対応する複数の平文データを生成するデータ逆変換処理を実行し、
前記鍵スケジュール処理において、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する情報処理装置にある。
Furthermore, the second aspect of the present disclosure is:
A data processing unit that executes data processing according to a program that defines a decoding processing sequence;
The data processing unit, according to the program,
Data conversion processing for generating bit slice expression data by bit slice processing for a plurality of encrypted data to be decrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each encryption key of the plurality of encrypted data;
A key schedule process for inputting the bit slice expression key and generating a round key for each round in the decryption process;
Decryption processing applying the round key to the bit slice representation data;
By performing an inverse transform of the bit slice process on the result of the decryption process, a data inverse transform process for generating a plurality of plaintext data corresponding to the plurality of encrypted data is performed,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
In the information processing apparatus for generating the round key by applying arithmetic processing and movement processing in units of bit slice expression key blocks configured by:

さらに、本開示の情報処理装置の一実施態様において、前記データ処理部は、前記データ変換処理において、前記ビットスライス表現データを構成する各暗号化データの同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現データブロックを単位として、レジスタに格納する処理を実行し、
前記鍵変換処理において、前記ビットスライス表現鍵ブロックを単位として、レジスタに格納する処理を実行し、
前記復号処理において、
前記レジスタに格納された前記ビットスライス表現データブロックと、前記ビットスライス表現鍵ブロックを単位とするブロック単位の演算処理と移動処理を適用した復号処理を実行する。
Furthermore, in an embodiment of the information processing apparatus according to the present disclosure, the data processing unit, in the data conversion process, the same bit or every n-th bit of each encrypted data constituting the bit slice expression data, n is a power of 2,
Execute the process of storing in the register in units of the bit slice representation data block configured by
In the key conversion process, a process of storing in a register in units of the bit slice expression key block is performed,
In the decryption process,
The block slice calculation data block stored in the register and the block slice calculation process and the shift process using the bit slice expression key block as a unit are executed.

さらに、本開示の情報処理装置の一実施態様において、前記データ処理部は、前記鍵変換処理において、前記ビットスライス表現鍵ブロックを処理単位として、複数のレジスタに分散して格納する処理を実行し、前記鍵スケジュール処理において、前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して、前記複数のレジスタ間の演算処理と、各レジスタ格納ブロックのシフトおよびシャッフル処理を実行して、ラウンド鍵生成を行う。   Furthermore, in an embodiment of the information processing apparatus according to the present disclosure, the data processing unit performs a process of distributing and storing in a plurality of registers using the bit slice expression key block as a processing unit in the key conversion process. In the key schedule processing, a round operation is performed on the bit slice representation key block stored in the plurality of registers by performing arithmetic processing between the plurality of registers and shifting and shuffling of each register storage block. Generate a key.

さらに、本開示の情報処理装置の一実施態様において、前記データ処理部は、前記鍵スケジュール処理において、前記複数のレジスタの格納ブロックから選択されたブロックを1つのレジスタに再格納するアンパック処理を実行する。   Furthermore, in an embodiment of the information processing apparatus according to the present disclosure, the data processing unit performs an unpacking process in which the block selected from the storage blocks of the plurality of registers is re-stored in one register in the key schedule process. To do.

さらに、本開示の第3の側面は、
情報処理装置において実行する情報処理方法であり、
前記情報処理装置のデータ処理部において、暗号処理シーケンスを規定したプログラムに従って、
暗号化処理対象となる複数の平文データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記複数の平文データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、暗号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した暗号処理と、
前記暗号処理の結果に対する前記ビットスライス処理の逆変換により、前記複数の平文データに対応する複数の暗号化データを生成するデータ逆変換処理を実行し、
前記鍵スケジュール処理において、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する情報処理方法にある。
Furthermore, the third aspect of the present disclosure is:
An information processing method executed in an information processing apparatus,
In the data processing unit of the information processing apparatus, according to a program that defines an encryption processing sequence,
Data conversion processing for generating bit slice expression data by bit slice processing for a plurality of plaintext data to be encrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each of the plurality of plaintext data encryption keys;
Key schedule processing for inputting the bit slice expression key and generating a round key for each round in cryptographic processing;
An encryption process applying the round key to the bit slice representation data;
A data reverse conversion process for generating a plurality of encrypted data corresponding to the plurality of plaintext data by performing an inverse conversion of the bit slice process with respect to a result of the encryption process,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
There is an information processing method for generating the round key by applying arithmetic processing and movement processing in units of a bit slice expression key block configured by:

さらに、本開示の第4の側面は、
情報処理装置において実行する情報処理方法であり、
前記情報処理装置のデータ処理部において、復号処理シーケンスを規定したプログラムに従って、
復号処理対象となる複数の暗号化データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記複数の暗号化データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、復号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した復号処理と、
前記復号処理の結果に対する前記ビットスライス処理の逆変換により、前記複数の暗号化データに対応する複数の平文データを生成するデータ逆変換処理を実行し、
前記鍵スケジュール処理において、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する情報処理方法にある。
Furthermore, the fourth aspect of the present disclosure is:
An information processing method executed in an information processing apparatus,
In the data processing unit of the information processing apparatus, according to a program that defines a decoding processing sequence,
Data conversion processing for generating bit slice expression data by bit slice processing for a plurality of encrypted data to be decrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each encryption key of the plurality of encrypted data;
A key schedule process for inputting the bit slice expression key and generating a round key for each round in the decryption process;
Decryption processing applying the round key to the bit slice representation data;
By performing an inverse transform of the bit slice process on the result of the decryption process, a data inverse transform process for generating a plurality of plaintext data corresponding to the plurality of encrypted data is performed,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
There is an information processing method for generating the round key by applying arithmetic processing and movement processing in units of a bit slice expression key block configured by:

さらに、本開示の第5の側面は、
情報処理装置において暗号処理を実行させるプログラムであり、
前記情報処理装置のデータ処理部に、
暗号化処理対象となる複数の平文データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記複数の平文データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、暗号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した暗号処理と、
前記暗号処理の結果に対する前記ビットスライス処理の逆変換により、前記複数の平文データに対応する複数の暗号化データを生成するデータ逆変換処理を実行させ、
前記鍵スケジュール処理においては、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する処理を実行させるプログラムにある。
Furthermore, the fifth aspect of the present disclosure is:
A program for executing cryptographic processing in an information processing device,
In the data processing unit of the information processing apparatus,
Data conversion processing for generating bit slice expression data by bit slice processing for a plurality of plaintext data to be encrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each of the plurality of plaintext data encryption keys;
Key schedule processing for inputting the bit slice expression key and generating a round key for each round in cryptographic processing;
An encryption process applying the round key to the bit slice representation data;
By performing an inverse conversion of the bit slice process on the result of the encryption process, a data inverse conversion process for generating a plurality of encrypted data corresponding to the plurality of plaintext data is executed,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
There is a program for executing a process of generating the round key by applying a calculation process and a transfer process in units of a bit slice expression key block constituted by:

さらに、本開示の第6の側面は、
情報処理装置において復号処理を実行させるプログラムであり、
前記情報処理装置のデータ処理部に、
復号処理対象となる複数の暗号化データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記複数の暗号化データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、復号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した復号処理と、
前記復号処理の結果に対する前記ビットスライス処理の逆変換により、前記複数の暗号化データに対応する複数の平文データを生成するデータ逆変換処理を実行させ、
前記鍵スケジュール処理においては、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する処理を実行させるプログラムにある。
Furthermore, the sixth aspect of the present disclosure is:
A program for executing a decryption process in an information processing device,
In the data processing unit of the information processing apparatus,
Data conversion processing for generating bit slice expression data by bit slice processing for a plurality of encrypted data to be decrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each encryption key of the plurality of encrypted data;
A key schedule process for inputting the bit slice expression key and generating a round key for each round in the decryption process;
Decryption processing applying the round key to the bit slice representation data;
By performing an inverse transformation of the bit slice process on the result of the decryption process, a data inverse transformation process for generating a plurality of plaintext data corresponding to the plurality of encrypted data is executed,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
There is a program for executing a process of generating the round key by applying a calculation process and a transfer process in units of a bit slice expression key block constituted by:

なお、本開示のプログラムは、例えば、様々なプログラム・コードを実行可能な情報処理装置やコンピュータ・システムに対して例えば記憶媒体によって提供されるプログラムである。このようなプログラムを情報処理装置やコンピュータ・システム上のプログラム実行部で実行することでプログラムに応じた処理が実現される。   Note that the program of the present disclosure is a program provided by, for example, a storage medium to an information processing apparatus or a computer system that can execute various program codes. By executing such a program by the program execution unit on the information processing apparatus or the computer system, processing according to the program is realized.

本開示のさらに他の目的、特徴や利点は、後述する本発明の実施例や添付する図面に基づくより詳細な説明によって明らかになるであろう。なお、本明細書においてシステムとは、複数の装置の論理的集合構成であり、各構成の装置が同一筐体内にあるものには限らない。   Other objects, features, and advantages of the present disclosure will become apparent from a more detailed description based on embodiments of the present invention described later and the accompanying drawings. In this specification, the system is a logical set configuration of a plurality of devices, and is not limited to one in which the devices of each configuration are in the same casing.

本開示の一実施例によれば、高速なソフトウェア(プログラム)による暗号処理が実現される。
具体的には、暗号処理シーケンスを規定したプログラムに従ってデータ処理を実行するデータ処理部が、複数の平文データに基づくビットスライス表現データと、平文各々の暗号鍵に基づくビットトスライス表現鍵を生成し、ビットスライス表現鍵に基づくラウンド鍵生成、ビットスライス表現データのブロック単位の演算、移動、ラウンド鍵適用演算等を含む暗号処理を実行し、暗号処理結果に対するデータ逆変換により、複数の平文データに対応する複数の暗号化データを生成する。ラウンド鍵を生成する鍵スケジュール処理ではビットスライス表現鍵を構成する各暗号鍵の同一ビット目のデータからなるビットスライス表現鍵ブロック単位の演算、移動等の処理によりラウンド鍵を生成する。
このようにラウンド鍵生成や、暗号処理に際しては、レジスタに格納されたビットスライス表現ブロック単位の演算や移動処理によって処理が行われ、複数の暗号化データの生成や複数の暗号化データに対する復号処理をまとめて実行可能であり、高速に大量のデータを処理することが可能となる。
According to an embodiment of the present disclosure, high-speed software (program) encryption processing is realized.
Specifically, a data processing unit that executes data processing according to a program that defines a cryptographic processing sequence generates bit slice representation data based on a plurality of plaintext data and a bit slice representation key based on each plaintext encryption key. , Execute cryptographic processing including round key generation based on the bit slice expression key, block unit calculation of the bit slice expression data, movement, round key application calculation, etc. A plurality of corresponding encrypted data is generated. In the key schedule process for generating a round key, a round key is generated by processing such as calculation and movement in units of bit slice expression key blocks composed of the same bit data of each encryption key constituting the bit slice expression key.
Thus, in round key generation and encryption processing, processing is performed by calculation and movement processing in units of bit slice representation blocks stored in a register, and generation of multiple encrypted data and decryption processing for multiple encrypted data Can be executed collectively, and a large amount of data can be processed at high speed.

なお、本開示の一実施例に従った復号処理では、レジスタに格納されたビットスライス表現ブロック単位の演算や移動処理によって処理が行われ、高速に大量のデータを処理することが可能となる。具体的には、Intel Core i7 870プロセッサ上で暗号アルゴリズム[PRESENT(鍵長80ビット)]を実行した場合、11.06cycles/byte、また、暗号アルゴリズム[Piccolo(鍵長80ビット)]を実行した場合、5.59cycles/byteという高速性を達成している。特にPiccoloの速度は、従来知られていた同プラットフォーム上(Intel Core i7 920)上での米国政府標準暗号AESの速度記録6.92cycles/byteを超えるものとなっている。
さらに、本開示の一実施例に従ったビットスライス実装ではS−boxをテーブル参照でなく論理演算で計算するため、キャッシュ攻撃や仮想マシン間攻撃のようなサイドチャネル攻撃に対する耐性を高めることができる。さらに、クラウドコンピューティング処理におけるソフトウェアでの暗号処理の高速化は、より少ないサイクル数で暗号処理を完了することができ、クラウドやデータセンターの電力消費量を下げることにつながる。
Note that in the decoding processing according to an embodiment of the present disclosure, processing is performed by calculation or movement processing in units of bit slice expression blocks stored in a register, and a large amount of data can be processed at high speed. Specifically, when the cryptographic algorithm [PRESENT (key length 80 bits)] is executed on the Intel Core i7 870 processor, 11.06 cycles / bytes and the cryptographic algorithm [Piccolo (key length 80 bits)] are executed. In this case, a high speed of 5.59 cycles / byte is achieved. In particular, the speed of Piccolo exceeds the speed record of 6.92 cycles / byte of the US government standard cipher AES on the same platform (Intel Core i7 920) which has been conventionally known.
Furthermore, in the bit slice implementation according to an embodiment of the present disclosure, the S-box is calculated by a logical operation instead of a table reference, so that it is possible to increase resistance to side channel attacks such as a cache attack and an attack between virtual machines. . Furthermore, the speedup of cryptographic processing by software in cloud computing processing can complete cryptographic processing in a smaller number of cycles, leading to lower power consumption of the cloud and data center.

さらに、本開示の一実施例に従ったシステムでは、クラウドやデータセンターに暗号処理用の専用ハードウェア導入が不要となり、スケーラビリティが向上する。
さらに、軽量暗号にとってこれまで困難であったクラウドでの活用が可能になることで、センサでの軽量暗号実装が促進され、低コスト・低消費電力のセンサネットワークが実現できる。
Furthermore, in the system according to an embodiment of the present disclosure, it is not necessary to introduce dedicated hardware for cryptographic processing in the cloud or data center, and scalability is improved.
Furthermore, since it is possible to utilize in the cloud, which has been difficult for lightweight cryptography, implementation of lightweight cryptography in sensors is promoted, and a sensor network with low cost and low power consumption can be realized.

本開示の処理が適用可能なシステムの一例について説明する図である。It is a figure explaining an example of the system which can apply the processing of this indication. 本開示の処理が適用可能なシステムの動作例について説明する図である。It is a figure explaining the operation example of the system which can apply the process of this indication. 図1、図2に示す本開示の処理が適用可能なシステムを構成するサーバにおいて実行する処理の一例について説明する図である。FIG. 3 is a diagram for describing an example of processing executed in a server configuring a system to which the processing of the present disclosure illustrated in FIGS. 1 and 2 can be applied. 図1、図2に示す本開示の処理が適用可能なシステムを構成するサーバにおいて実行する処理のシーケンス例について説明する図である。FIG. 3 is a diagram illustrating a sequence example of processing executed in a server that configures a system to which the processing of the present disclosure illustrated in FIGS. 1 and 2 can be applied. 図1、図2に示す本開示の処理が適用可能なシステムを構成するサーバにおいて実行する処理のシーケンス例について説明する図である。FIG. 3 is a diagram illustrating a sequence example of processing executed in a server that configures a system to which the processing of the present disclosure illustrated in FIGS. 1 and 2 can be applied. 暗号処理アルゴリズムPRESENTの処理シーケンスについて説明する図である。It is a figure explaining the processing sequence of the encryption processing algorithm PRESENT. 本開示の暗号処理の処理シーケンスについて説明する図である。It is a figure explaining the process sequence of the encryption process of this indication. 鍵データの鍵変換処理によるビットスライス表現鍵データの生成処理例について説明する図である。It is a figure explaining the example of a production | generation process of the bit slice expression key data by the key conversion process of key data. データの変換処理によるビットスライス表現データの生成処理例について説明する図である。It is a figure explaining the example of a production | generation process of the bit slice expression data by the data conversion process. 鍵スケジュール処理におけるレジスタ格納データの一例を示す図である。It is a figure which shows an example of the register storage data in a key schedule process. 鍵スケジュール処理におけるレジスタ格納データの一例を示す図である。It is a figure which shows an example of the register storage data in a key schedule process. 鍵スケジュール処理のシーケンスを説明するフローチャートを示す図である。It is a figure which shows the flowchart explaining the sequence of a key schedule process. 鍵スケジュール処理において実行するラウンド鍵生成更新処理の詳細処理シーケンスを説明するフローチャートを示す図である。It is a figure which shows the flowchart explaining the detailed process sequence of the round key production | generation update process performed in a key schedule process. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理における非線形変換処理(Sbox)の論理命令列について説明する図である。It is a figure explaining the logic command sequence of the nonlinear transformation process (Sbox) in a key schedule process. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storing data in a key schedule process, and a processing example. 鍵スケジュール処理のシーケンスを説明するフローチャートを示す図である。It is a figure which shows the flowchart explaining the sequence of a key schedule process. 鍵スケジュール処理において実行する非線形変換処理(Sbox)の事前計算処理の詳細シーケンスを説明するフローチャートを示す図である。It is a figure which shows the flowchart explaining the detailed sequence of the prior calculation process of the nonlinear transformation process (Sbox) performed in a key schedule process. 鍵スケジュール処理において実行する非線形変換処理(Sbox)の事前計算処理の詳細シーケンスを説明するフローチャートを示す図である。It is a figure which shows the flowchart explaining the detailed sequence of the prior calculation process of the nonlinear transformation process (Sbox) performed in a key schedule process. 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). 非線形変換処理(Sbox)の事前計算処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data and the example of a process in the prior calculation process of a nonlinear transformation process (Sbox). ラウンド鍵生成更新処理のシーケンスを説明するフローチャートを示す図である。It is a figure which shows the flowchart explaining the sequence of a round key production | generation update process. ラウンド鍵生成更新処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data in a round key generation update process, and a processing example. ラウンド鍵生成更新処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data in a round key generation update process, and a processing example. ラウンド鍵生成更新処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data in a round key generation update process, and a processing example. ラウンド鍵生成更新処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data in a round key generation update process, and a processing example. ラウンド鍵生成更新処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data in a round key generation update process, and a processing example. ラウンド鍵生成更新処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data in a round key generation update process, and a processing example. ラウンド鍵生成更新処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data in a round key generation update process, and a processing example. ラウンド鍵生成更新処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data in a round key generation update process, and a processing example. ラウンド鍵生成更新処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data in a round key generation update process, and a processing example. ラウンド鍵生成更新処理におけるレジスタ格納データと処理例を示す図である。It is a figure which shows the register storage data in a round key generation update process, and a processing example. 暗号処理の詳細シーケンスを説明するフローチャートを示す図である。It is a figure which shows the flowchart explaining the detailed sequence of an encryption process. 暗号処理部の実行する暗号処理を実行するハードウェア構成例を示す図である。It is a figure which shows the hardware structural example which performs the encryption process which an encryption process part performs. 暗号処理の実行時のレジスタ格納データと、データ処理例について説明する図である。It is a figure explaining the register storage data at the time of execution of encryption processing, and a data processing example. 暗号処理の実行時のデータ処理例について説明する図である。It is a figure explaining the example of data processing at the time of execution of encryption processing. 暗号処理に際して実行する線形変換処理の詳細シーケンスを説明するフローチャートを示す図である。It is a figure which shows the flowchart explaining the detailed sequence of the linear transformation process performed in the case of an encryption process. 暗号処理に際して実行する線形変換処理実行時のレジスタ格納データと処理例について説明する図である。It is a figure explaining the register storage data at the time of the linear transformation process performed in the case of an encryption process, and a processing example. 暗号処理に際して実行する線形変換処理実行時のレジスタ格納データと処理例について説明する図である。It is a figure explaining the register storage data at the time of the linear transformation process performed in the case of an encryption process, and a processing example. 暗号処理に際して実行する線形変換処理実行時のレジスタ格納データと処理例について説明する図である。It is a figure explaining the register storage data at the time of the linear transformation process performed in the case of an encryption process, and a processing example. 暗号処理に際して実行する線形変換処理実行時のレジスタ格納データと処理例について説明する図である。It is a figure explaining the register storage data at the time of the linear transformation process performed in the case of an encryption process, and a processing example. 暗号処理に際して実行する線形変換処理実行時のレジスタ格納データと処理例について説明する図である。It is a figure explaining the register storage data at the time of the linear transformation process performed in the case of an encryption process, and a processing example. 暗号処理に際して実行する線形変換処理実行時のレジスタ格納データと処理例について説明する図である。It is a figure explaining the register storage data at the time of the linear transformation process performed in the case of an encryption process, and a processing example. 暗号処理に際して実行する線形変換処理実行時のレジスタ格納データと処理例について説明する図である。It is a figure explaining the register storage data at the time of the linear transformation process performed in the case of an encryption process, and a processing example. 暗号処理に際して実行する線形変換処理実行時のレジスタ格納データと処理例について説明する図である。It is a figure explaining the register storage data at the time of the linear transformation process performed in the case of an encryption process, and a processing example. 暗号処理に際して実行する線形変換処理実行時のレジスタ格納データと処理例について説明する図である。It is a figure explaining the register storage data at the time of the linear transformation process performed in the case of an encryption process, and a processing example. 暗号処理を実行する装置構成例を示す図である。It is a figure which shows the example of an apparatus structure which performs an encryption process.

以下、図面を参照しながら本開示に係る情報処理装置、および情報処理方法、並びにプログラムの詳細について説明する。説明は、以下の項目に従って行う。
1.本開示の構成を適用可能なシステムの一例について
2.軽量ブロック暗号アルゴリズム「PRESENT」について
3.情報処理装置(暗号処理装置)の構成と処理シーケンスの概要について
4.鍵変換処理とデータ変換処理について
5.鍵スケジュール処理について(鍵スケジュール処理例1)
6.鍵スケジュール処理について(鍵スケジュール処理例2)
6−1.非線形変換(Sbox)の事前計算処理について
6−2.ラウンド鍵生成、更新処理について
7.暗号処理について
8.情報処理装置および暗号処理装置の構成例について
9.本開示の構成のまとめ
Hereinafter, the details of the information processing apparatus, the information processing method, and the program according to the present disclosure will be described with reference to the drawings. The description will be made according to the following items.
1. 1. An example of a system to which the configuration of the present disclosure can be applied 2. Lightweight block cipher algorithm “PRESENT” 3. Outline of configuration and processing sequence of information processing apparatus (encryption processing apparatus) 4. Key conversion process and data conversion process Key schedule processing (Key schedule processing example 1)
6). Key schedule processing (Key schedule processing example 2)
6-1. Non-linear transformation (Sbox) pre-calculation process 6-2. 6. Round key generation and update processing About cryptographic processing 8. 8. Configuration examples of information processing apparatus and cryptographic processing apparatus Summary of composition of this disclosure

[1.本開示の構成を適用可能なシステムの一例について]
例えば各個人の所有する携帯電話やスマートフォン等の通信端末や、様々な物品に装着されたRFID、あるいは各家屋に配置されたセンサなどから情報を収集してサーバにおいて処理を行う構成を想定する。
多数の情報送信側の装置には暗号処理アルゴリズムを実行する小型のハードウェアを装着して高速で暗号化データを生成して送信することができる。
[1. An example of a system to which the configuration of the present disclosure can be applied]
For example, a configuration is assumed in which information is collected from a communication terminal such as a mobile phone or a smartphone owned by each individual, an RFID attached to various articles, or a sensor disposed in each house and processed in the server.
A large number of devices on the information transmission side can be equipped with small hardware that executes an encryption processing algorithm to generate and transmit encrypted data at high speed.

しかし、一方でサーバは、これら多数の端末やセンサが送信する大量の暗号化データを受信して復号処理を行う必要がある。また、サーバは多数の端末に送信する多数の暗号化データを生成しなければならない場合も想定される。
今後は、このように膨大で多岐にわたるビッグデータを収集、分析し、活用するニーズがますます高まることが予想される。
However, on the other hand, the server needs to receive a large amount of encrypted data transmitted by these many terminals and sensors and perform decryption processing. It is also assumed that the server must generate a large number of encrypted data to be transmitted to a large number of terminals.
In the future, it is expected that the needs for collecting, analyzing and utilizing such vast and diverse big data will increase.

このような膨大なデータの処理には、クラウドコンピューティングの利用が有効であると考えられる。例えば、多数の端末やセンサ等から収集された大量の暗号化データの解析にクラウドコンピューティングを活用し、ネットワーク上のサーバの汎用プロセッサ上で動作可能なソフトウェアを適用して暗号処理(暗号化および復号処理の双方を含む)を行う構成である。   It is considered that the use of cloud computing is effective for processing such an enormous amount of data. For example, cloud computing is used to analyze a large amount of encrypted data collected from a large number of terminals and sensors, etc., and cryptographic processing (encryption and encryption) is applied using software that can run on a general-purpose processor of a server on the network. (Including both decoding processes).

RFIDやセンサなどでは低コスト・低消費電力で実装できることが最も重視され、軽量暗号で暗号化することが最適な選択肢であるが、前述したように、軽量暗号は、クラウド上のサーバの汎用プロセッサ上で動作する通常のソフトウェア実装では、一般に低速であるという課題がある。   For RFID and sensors, it is most important to be able to implement at low cost and low power consumption. Encryption with lightweight encryption is the best option, but as mentioned above, lightweight encryption is a general-purpose processor for servers in the cloud. The usual software implementations that operate above typically have the problem of being slow.

クラウドコンピューティングは、ネットワークで接続された多くの情報処理装置を活用して処理を行うことでメリットがあるが、ネットワーク接続された全ての機器に特定の暗号処理アルゴリズムを実行するハードウェアを装着させて高速化をはかることはコスト上デメリットとなる。
大量の暗号化データを収集してクラウド構成サーバにアップロードし、クラウドで解析を行うようなケースでは、多くの安価なサーバ上で実行可能なソフトウェア(プログラム)を利用して処理を行わせるスケールアウトの手法が望ましいと考えられる。
Cloud computing has the advantage of using many information processing devices connected via a network for processing, but all devices connected to the network are equipped with hardware that executes specific cryptographic processing algorithms. Therefore, increasing the speed is a cost disadvantage.
In cases where a large amount of encrypted data is collected, uploaded to a cloud configuration server, and analyzed in the cloud, the scale-out is performed using software (programs) that can be executed on many inexpensive servers. This method is considered desirable.

このように、例えば、クラウドコンピューティング等の技術を利用して暗号処理を行う場合、ソフトウェア(プログラム)を利用した暗号処理(暗号化処理と復号処理)を行うことが求められる。しかし、前述したように、軽量暗号においてはソフトウェアに従った暗号処理の処理速度が低下してしまうという問題があり、処理速度の高速化を実現する手法が求められている。   As described above, for example, when performing encryption processing using a technique such as cloud computing, it is required to perform encryption processing (encryption processing and decryption processing) using software (program). However, as described above, there is a problem that the processing speed of the cryptographic processing according to the software is reduced in the lightweight encryption, and there is a demand for a method for realizing an increase in the processing speed.

暗号アルゴリズムには様々なものがあるが、基本的な技術の一つとして、ブロック暗号と呼ばれるものがある。ブロック暗号の通常のソフトウェア実装は、非線形変換処理を行うSboxをテーブル参照で実装するため、キャッシュ攻撃が脅威となることがある。キャッシュ攻撃とは、サイドチャネル攻撃の一つで、キャッシュヒットの有無によりメモリアクセス時間が異なることを利用して暗号化鍵を導出するタイミング攻撃である。   There are various cryptographic algorithms, but one of basic techniques is called a block cipher. Since the normal software implementation of the block cipher implements Sbox that performs non-linear transformation processing with a table reference, a cache attack may be a threat. A cache attack is a side-channel attack, which is a timing attack for deriving an encryption key using the fact that the memory access time varies depending on the presence or absence of a cache hit.

本開示の構成は、例えばこのような問題を解決するものである。図1以下を参照して、本開示の構成を適用可能なシステムの一例について説明する。
本開示の構成が適用可能なシステムとして、例えば図1に示すようなネットワークシステムがある。
図1には、複数の末端ノードが接続されたセンサネットワーク20と、末端ノードの送信データを収集してデータ処理を行うネットワーク接続サーバ群によって構成されるクラウド10を示している。
The configuration of the present disclosure solves such a problem, for example. An example of a system to which the configuration of the present disclosure can be applied will be described with reference to FIG.
As a system to which the configuration of the present disclosure can be applied, for example, there is a network system as shown in FIG.
FIG. 1 shows a cloud 10 including a sensor network 20 to which a plurality of end nodes are connected, and a network connection server group that collects transmission data of the end nodes and performs data processing.

末端ノードは、例えばユーザの所有するPCや携帯電話、スマートフォン、タブレット端末等の携帯端末、あるいは家庭やオフィスに配置された電力消費量検出センサや、独居老人宅に配置して安全・健康管理情報を収集するセンサやヘルスケアデバイス、道路や車両に備えられた渋滞検知・緩和に利用する端末やセンサ、その他の様々な機器が含まれる。
なお、以下、これらの様々な末端ノード構成機器をまとめて、センサとして説明する。センサには上述した様々な機器が含まれる。
For example, the terminal node is a personal terminal owned by the user, a mobile terminal such as a mobile phone, a smart phone, or a tablet terminal, or a power consumption detection sensor disposed in a home or office, or a nursing home for safety and health management information. Sensors and health care devices that collect data, terminals and sensors that are used to detect and relieve traffic congestion on roads and vehicles, and various other devices.
Hereinafter, these various terminal node components will be collectively described as sensors. The sensor includes the various devices described above.

末端ノードを構成するセンサは、様々な情報を、データ処理を行うネットワーク接続サーバ群によって構成されるクラウド10に送信する。
なお、多くの場合、送信データは例えば中継ノード等を介してクラウド10を構成するネットワーク接続サーバに提供される。
The sensor which comprises a terminal node transmits various information to the cloud 10 comprised by the network connection server group which performs a data process.
In many cases, the transmission data is provided to a network connection server configuring the cloud 10 via, for example, a relay node.

このようなシステムで収集されるデータは、例えば個人のプライバシーや機密情報が含まれる場合が多く、データ漏えいを防止するため暗号化されて送信される。
センサは、送信データの暗号化を実行して暗号化データを送信する。センサは、例えば軽量暗号アルゴリズムを実行する専用ハードウェアを実装し、これを用いて暗号化を行う。この暗号化のための暗号鍵は、各センサがメモリに保持する個別の暗号鍵、あるいは、例えばセンサIDから所定の演算で導出できる鍵などが利用される。
Data collected by such a system often includes, for example, personal privacy and confidential information, and is encrypted and transmitted to prevent data leakage.
The sensor performs encryption of the transmission data and transmits the encrypted data. For example, the sensor is mounted with dedicated hardware that executes a lightweight encryption algorithm, and encryption is performed using the dedicated hardware. As the encryption key for encryption, an individual encryption key held in the memory of each sensor, or a key that can be derived from the sensor ID by a predetermined calculation, for example, is used.

センサの数は、膨大であり、図2に示すように、各センサは暗号化データにセンサIDを付与してクラウドに送信する。
図2に示す例では、末端ノードA,B,Cをデータ送信ノードの代表例として示している。それぞれのノードはノード固有鍵である暗号鍵を適用して送信データの暗号化を実行して暗号化データによって構成されるブロック(例えば64ビット)を生成し、生成した暗号化データに各センサ(末端ノード)の識別子であるセンサIDを付与して送信する。
代表例として示すセンサA〜C以外の多数のセンサからも大量の暗号化データがクラウド上のサーバ、例えば図2に示すサーバS30に送信される。
The number of sensors is enormous, and as shown in FIG. 2, each sensor assigns a sensor ID to the encrypted data and transmits it to the cloud.
In the example shown in FIG. 2, the end nodes A, B, and C are shown as representative examples of the data transmission node. Each node performs encryption of transmission data by applying an encryption key that is a node unique key to generate a block (for example, 64 bits) composed of the encrypted data, and each sensor ( A sensor ID, which is an identifier of the terminal node, is assigned and transmitted.
A large amount of encrypted data is also transmitted from a large number of sensors other than the sensors A to C shown as representative examples to a server on the cloud, for example, the server S30 shown in FIG.

なお、以下に説明する実施例では、各センサの生成する暗号化データのデータ長は暗号化処理に使う軽量ブロック暗号アルゴリズムのブロック長1ブロック分として説明する。1ブロックは例えば64ビット等の固定ビットのデータである。各センサは、センサ固有鍵(例えば80ビット)を適用した暗号化処理によって、64ビットの暗号化ブロックを生成して送信する。   In the embodiment described below, the data length of the encrypted data generated by each sensor is described as one block length of the lightweight block cipher algorithm used for the encryption process. One block is data of fixed bits such as 64 bits. Each sensor generates and transmits a 64-bit encrypted block by an encryption process using a sensor unique key (for example, 80 bits).

各センサの生成する暗号化データのデータは1ブロック分に限らず、複数ブロックとしてもよい。各センサは、各暗号化データブロックとセンサIDとの対応を明確にしたデータを送信する。なお、例えば、各ブロックのデータ順序情報が必要な場合は、データにデータ順序を示すシリアル番号やタイムスタンプを含め、これらをブロック属性情報として付与して送信する。   The data of the encrypted data generated by each sensor is not limited to one block, and may be a plurality of blocks. Each sensor transmits data in which the correspondence between each encrypted data block and the sensor ID is clarified. For example, when data order information of each block is necessary, the serial number and time stamp indicating the data order are included in the data, and these are given as block attribute information and transmitted.

なお、末端ノードであるセンサからの送信データは、センサネットワークが例えばツリー構造で管理されている場合、センサ(末端ノード)から中継ノード、さらに中継ノードの上位ノードとして設定されるルートノードに送信され、ルートノードからクラウド上のサーバに送信される。   If the sensor network is managed in a tree structure, for example, the transmission data from the sensor that is the terminal node is transmitted from the sensor (terminal node) to the root node that is set as a relay node and a higher node of the relay node. , Sent from the root node to the server on the cloud.

(クラウド上サーバでの処理の概要)
次に、図1、図2を参照して説明したネットワークシステムにおいて、センサ(末端ノード)の送信データを収集して処理を行うクラウド上のサーバの実行する処理の概要について説明する。
(Outline of processing on cloud server)
Next, in the network system described with reference to FIGS. 1 and 2, an outline of processing executed by a server on the cloud that performs processing by collecting transmission data of sensors (terminal nodes) will be described.

クラウド上のサーバは、多数のセンサ(末端ノード)から送信されてきた暗号化データブロックを多数、集めて、汎用プロセッサ上で動作可能なソフトウェア(プログラム)を適用した暗号処理を実行する。例えば、多数の暗号化データを復号する処理を実行する。あるいは各末端ノードに送信する多数の暗号化データの生成処理などを行う。   A server on the cloud collects a large number of encrypted data blocks transmitted from a large number of sensors (terminal nodes), and executes a cryptographic process to which software (program) operable on a general-purpose processor is applied. For example, a process for decrypting a large number of encrypted data is executed. Alternatively, a process for generating a large number of encrypted data to be transmitted to each terminal node is performed.

サーバは、ソフトウェア(プログラム)を適用した暗号処理(暗号化および復号処理を含む)として、ビットスライス暗号処理を実行する。
なお、以下の説明において、「暗号処理」とはデータの暗号化処理と復号処理の双方を含むものとする。
ビットスライス暗号処理(暗号化および復号処理を含む)は1997年にBihamにより提案された処理であり、あるクラスの暗号アルゴリズムが、ビットスライス実装により従来のソフトウェア実装よりも高速に実装できることが示された。
The server executes bit slice encryption processing as encryption processing (including encryption and decryption processing) to which software (program) is applied.
In the following description, “encryption processing” includes both data encryption processing and decryption processing.
Bit-slice encryption (including encryption and decryption) is a process proposed by Biham in 1997, showing that a class of cryptographic algorithms can be implemented faster than traditional software implementations with bit-slice implementations. It was.

ビットスライス暗号処理については、例えば非特許文献2[Eli Biham,"A Fast New DES Implementation in Software",FSE'97, 1997.]に詳細が記載されている。最も基本的なビットスライス実装では、暗号処理対象となる複数のデータブロックの先頭からビット単位でデータを切り出して、各データブロックから切り出した同一ビット目、あるいはnビットおきのビット、ただしnは2,4,8,16,64,128などの2のべき数、これらのビットのデータの集合からなる新たなブロック(ビットスライス表現データブロック)を設定して処理を行う。   Regarding bit slice encryption processing, see Non-Patent Document 2 [Eli Biham, “A Fast New DES Implementation in Software”, FSE '97, 1997. ] For details. In the most basic bit slice implementation, data is cut out in bit units from the beginning of a plurality of data blocks to be encrypted, and the same bit or every nth bit cut out from each data block, where n is 2 , 4, 8, 16, 64, 128, etc., and a new block (bit slice expression data block) composed of a set of data of these bits is set and processed.

例えば、各センサが送信してきた個々の暗号化データをまとめて復号する場合のビットスライス復号処理例について図3を参照して説明する。
図3には、図2に示すサーバS30の、
(A)保持データ
(B)暗号処理シーケンス(復号)
これらを説明する図を示している。
For example, an example of bit slice decryption processing in a case where individual encrypted data transmitted by each sensor is decrypted will be described with reference to FIG.
FIG. 3 shows the server S30 shown in FIG.
(A) Retained data (B) Cryptographic processing sequence (decryption)
The figure explaining these is shown.

図3(A)に示すサーバの保持データ中、
暗号鍵31は、各センサ(末端ノード)固有の鍵として、予めサーバS30が保持しているデータである。
センサID32と暗号化データ33の各データは、各センサからネットワークを介して受信したデータである。
センサIDに基づいて、各暗号化データの暗号化処理に適用された暗号鍵を選択することができる。
In the data held by the server shown in FIG.
The encryption key 31 is data that the server S30 holds in advance as a key unique to each sensor (terminal node).
Each of the sensor ID 32 and the encrypted data 33 is data received from each sensor via a network.
Based on the sensor ID, the encryption key applied to the encryption processing of each encrypted data can be selected.

図3(B)は、サーバS30の暗号処理部50において実行する処理を説明する図である。なお、図に示す暗号処理部50は、プログラム実行機能を持つCPU等によって構成されるデータ処理部であり、所定の暗号アルゴリズムのシーケンスを規定したプログラムに従ったデータ処理によって暗号処理(暗号化処理や復号処理)を実行する。すなわちソフトウェア(プログラム)を適用した暗号処理を実行する。
図3(B)には、各センサからネットワークを介して受信した暗号化データの復号処理を行う場合の処理例を示している。
FIG. 3B is a diagram illustrating processing executed in the cryptographic processing unit 50 of the server S30. The cryptographic processing unit 50 shown in the figure is a data processing unit configured by a CPU or the like having a program execution function, and performs cryptographic processing (encryption processing) by data processing according to a program that defines a predetermined cryptographic algorithm sequence. Or decryption processing). That is, cryptographic processing to which software (program) is applied is executed.
FIG. 3B shows a processing example when decrypting encrypted data received from each sensor via the network.

サーバは、まず、暗号化データ33に付加されているセンサID32を適用して、各々の復号に使う暗号鍵31を選択する。クラウド上のサーバは、各センサで使われる暗号鍵をセンサIDに対応付けた管理データとして保持している。あるいは、各センサ固有の暗号鍵を各センサIDから所定の演算で導出する構成としてもよい。   First, the server applies the sensor ID 32 added to the encrypted data 33 to select the encryption key 31 used for each decryption. The server on the cloud holds the encryption key used by each sensor as management data associated with the sensor ID. Or it is good also as a structure which derive | leads out the encryption key peculiar to each sensor from each sensor ID by predetermined | prescribed calculation.

サーバは、図3(B)に示すように各センサの暗号鍵31を、各センサの生成した暗号化データ33の各ブロックに対応する順序に並べる。
ビットスライス暗号処理の処理単位として予め規定した所定のブロック数の暗号化データ33と暗号鍵31が揃ったら、ビットスライス暗号処理に従ったデータ復号処理を行う。
As shown in FIG. 3B, the server arranges the encryption keys 31 of the sensors in the order corresponding to the blocks of the encrypted data 33 generated by the sensors.
When the encrypted data 33 and the encryption key 31 having a predetermined number of blocks defined in advance as the processing unit of the bit slice encryption process are prepared, the data decryption process according to the bit slice encryption process is performed.

前述したように、ビットスライス暗号処理では、暗号処理対象となる各ブロックの先頭からビット単位でデータを切り出して、各ブロックの同一ビット目、あるいはnビットおきのビット、ただしnは2,4,8,16,64,128などの2のべき数、これらのビットのデータの集合(ビットスライス表現データブロック)を設定して処理を行う。
まず、サーバは、
多数のセンサから受信した暗号化データ33を構成する多数の暗号化データブロックから、
1bit目だけを集めたブロック(ビットスライス表現データブロック)、
2bit目だけを集めたブロック(ビットスライス表現データブロック)、
以降最終bit目まで同じビット位置のデータだけを集めたブロック(ビットスライス表現データブロック)、
これらの複数のビットスライス表現データブロックを生成する。
As described above, in the bit slice encryption process, data is cut out in bit units from the beginning of each block to be encrypted, and the same bit or every n bits of each block, where n is 2, 4, Processing is performed by setting a power of 2 such as 8, 16, 64, 128, and a set of data of these bits (bit slice expression data block).
First, the server
From a large number of encrypted data blocks constituting the encrypted data 33 received from a large number of sensors,
A block (bit slice representation data block) in which only the 1st bit is collected,
A block (bit slice representation data block) that collects only the second bit,
A block in which only data at the same bit position is collected until the final bit (bit slice expression data block),
These multiple bit slice representation data blocks are generated.

サーバは、このようにして、暗号化データ33を構成する多数の暗号化データブロックから複数のビットスライス表現データブロックを生成する。
さらに、暗号化データ33の生成に適用された暗号鍵31についても、同様の処理、すなわち、複数の鍵データに対応する複数のビットスライス表現鍵ブロックを生成する。
なお、暗号鍵31の各々は、例えば80bitの鍵データからなる暗号鍵ブロックであり、この暗号鍵31について、各暗号鍵ブロックの同一ビット目、あるいはnビットおきのビット、ただしnは2,4,8,16,64,128などの2のべき数、これらのビットのデータの集合(ビットスライス表現鍵ブロック)を設定する。
In this way, the server generates a plurality of bit slice representation data blocks from a large number of encrypted data blocks constituting the encrypted data 33.
Further, with respect to the encryption key 31 applied to the generation of the encrypted data 33, the same processing, that is, a plurality of bit slice expression key blocks corresponding to a plurality of key data is generated.
Each of the encryption keys 31 is, for example, an encryption key block made up of 80-bit key data. For this encryption key 31, the same bit or every n bits of each encryption key block, where n is 2, 4 , 8, 16, 64, 128 and the like, and a set of data of these bits (bit slice expression key block) is set.

このブロック変換処理は、図3(B)に示す暗号処理部50中に示すステップS11の鍵変換処理(Key Conversion)と、ステップS21のデータ変換処理(Data Conversion)として実行する処理である。   This block conversion process is a process executed as the key conversion process (Key Conversion) in Step S11 and the data conversion process (Data Conversion) in Step S21 shown in the encryption processing unit 50 shown in FIG.

これらビットスライス処理によって生成したビットスライス表現ブロックを処理単位とした処理を実行して、所定の暗号アルゴリズムに従った処理を実行する。
本開示の装置では、このビットスライス表現ブロックを処理単位とした演算(AND,OR,XORなど)や、レジスタ格納データのシフト処理や、シャッフルなどのビット位置の転置処理などを、ソフトウェア(プログラム)の適用処理として実行して所定の暗号アルゴリズムに従った処理を実行する。
Processing based on the bit slice expression block generated by these bit slice processing is executed, and processing according to a predetermined encryption algorithm is executed.
In the apparatus of the present disclosure, software (program) performs operations (AND, OR, XOR, etc.) using the bit slice representation block as a processing unit, shift processing of register stored data, transposition processing of bit positions such as shuffle, etc. The process according to a predetermined encryption algorithm is executed.

暗号処理部50中のステップS11の鍵変換処理(Key Conversion)によって生成した多数の暗号鍵31に基づくビットスライス鍵データに対して、ステップS12における鍵スケジュール処理(Key Scheduling)により、ラウンド鍵を生成する。   A round key is generated by key schedule processing (Key Scheduling) in Step S12 for the bit slice key data based on a large number of encryption keys 31 generated by the key conversion processing (Key Conversion) in Step S11 in the cryptographic processing unit 50 To do.

一方、ステップS21のデータ変換処理(Data Conversion)では、センサから受信した多数の暗号化データ33に対するビットスライス処理によってビットスライス暗号化データブロックを生成する。このビットスライスブロックが、次のステップS22の暗号処理(Data Processing)ステップにおいて暗号処理(暗号化処理や復号処理)の処理対象として設定される。   On the other hand, in the data conversion process (Data Conversion) in step S21, a bit slice encrypted data block is generated by a bit slice process for a large number of encrypted data 33 received from the sensor. This bit slice block is set as a processing target of encryption processing (encryption processing and decryption processing) in the encryption processing (Data Processing) step of the next step S22.

ステップS22の暗号処理(Data Processing)では、ステップS21のデータ変換処理(Data Conversion)において暗号化データに基づいて生成したビットスライス表現データブロックに対して、ラウンド鍵を適用した暗号処理、ここでは暗号化データの復号処理を実行する。   In the encryption process (Data Processing) in Step S22, an encryption process in which a round key is applied to the bit slice representation data block generated based on the encrypted data in the data conversion process (Data Conversion) in Step S21. The decryption process of the digitized data is executed.

この暗号処理ステップでは、例えば、ラウンド鍵との加算(XOR)処理、線形変換処理、非線形変換処理など、所定の暗号アルゴリズムに従った処理がソフトウェア(プログラム)に従って実行される。
なお、ステップS12の鍵スケジューリング(Key Scheduling)処理では、このラウンド演算の各ラウンドにおいて適用するラウンド鍵を生成する。
In this encryption processing step, for example, processing according to a predetermined encryption algorithm such as addition with a round key (XOR) processing, linear conversion processing, and non-linear conversion processing is executed according to software (program).
In the key scheduling process in step S12, a round key to be applied in each round of the round calculation is generated.

次のステップS23は、ステップS22の暗号処理(Data Processing)結果として得られたブロック群に対し、データ逆変換処理(Data Conversion−1)を実行する。この処理によって、ビットスライスされたブロックを元のブロックに戻す処理を行う。この処理により、センサから送付された暗号化データ33に対応する平文データ70が生成される。 In the next step S23, a data reverse conversion process (Data Conversion -1 ) is performed on the block group obtained as a result of the encryption process (Data Processing) in Step S22. By this processing, processing for returning the bit-sliced block to the original block is performed. By this processing, plain text data 70 corresponding to the encrypted data 33 sent from the sensor is generated.

図4、図5にサーバにおいて実行する処理の2つのシーケンス例を示す。
図4に示すフローチャートは、暗号化データに付加されているセンサIDをもとに、各ブロックの復号鍵を用意するステップを、所定のブロック数の暗号化データが揃ってから行う場合のシーケンスを説明するフローチャートである。
図5に示すフローチャートは、暗号化データに付加されているセンサIDをもとに、各ブロックの復号鍵を用意するステップを、各暗号文データブロックの到着ごとに行う場合のシーケンスを説明するフローチャートである。
4 and 5 show two sequence examples of processing executed in the server.
The flowchart shown in FIG. 4 shows a sequence when the step of preparing a decryption key for each block based on the sensor ID added to the encrypted data is performed after a predetermined number of blocks of encrypted data are prepared. It is a flowchart to explain.
The flowchart shown in FIG. 5 is a flowchart for explaining a sequence when the step of preparing the decryption key for each block is performed for each arrival of each ciphertext data block based on the sensor ID added to the encrypted data. It is.

まず、図4に示すフローの各ステップの処理について説明する。
まず、ステップS31において、ノードから送付される暗号化データブロックを受信する。図3(A)に示すセンサID32と暗号化データ33との組み合わせデータである。
First, the process of each step of the flow shown in FIG. 4 will be described.
First, in step S31, an encrypted data block sent from a node is received. This is combination data of the sensor ID 32 and the encrypted data 33 shown in FIG.

次に、ステップS32において、予め処理単位として規定した所定ブロック数の暗号化データを受信したか否かを判定する。所定ブロック数に達していない場合は、ステップS31に戻り、受信処理を継続する。   Next, in step S32, it is determined whether or not a predetermined number of blocks of encrypted data previously defined as processing units have been received. If the predetermined number of blocks has not been reached, the process returns to step S31 and the reception process is continued.

所定ブロック数に達した場合は、ステップS33に進み、暗号化データに付加されているセンサIDを適用して各暗号化データの暗号鍵(=復号鍵)を選択する。
最後に、ステップS34において、暗号化データと暗号鍵の対応セットを暗号処理部50に入力してビットスライス暗号処理に従った復号処理を実行する。
If the predetermined number of blocks has been reached, the process proceeds to step S33, where the sensor ID added to the encrypted data is applied to select the encryption key (= decryption key) of each encrypted data.
Finally, in step S34, the correspondence set of the encrypted data and the encryption key is input to the encryption processing unit 50, and the decryption process according to the bit slice encryption process is executed.

図5に示すフローは、暗号文データブロックの到着ごとに処理を実行するシーケンスである。
まず、ステップS41において、ノードから送付される暗号化データブロックを受信する。図3(A)に示すセンサID32と暗号化データ33との組み合わせデータである。
The flow shown in FIG. 5 is a sequence for executing processing every time a ciphertext data block arrives.
First, in step S41, an encrypted data block sent from the node is received. This is combination data of the sensor ID 32 and the encrypted data 33 shown in FIG.

次に、ステップS42において、暗号化データに付加されているセンサIDを適用して各暗号化データの暗号鍵(=復号鍵)を選択する。   Next, in step S42, the encryption key (= decryption key) of each encrypted data is selected by applying the sensor ID added to the encrypted data.

次に、ステップS43において、予め処理単位として規定した所定ブロック数の暗号化データを受信したか否かを判定する。所定ブロック数に達していない場合は、ステップS41に戻り、受信処理を継続する。   Next, in step S43, it is determined whether or not a predetermined number of blocks of encrypted data previously defined as processing units have been received. If the predetermined number of blocks has not been reached, the process returns to step S41 to continue the reception process.

所定ブロック数に達した場合は、ステップS44に進み、暗号化データと暗号鍵の対応セットを暗号処理部50に入力してビットスライス暗号処理に従った復号処理を実行する。   When the predetermined number of blocks has been reached, the process proceeds to step S44, where a corresponding set of encrypted data and encryption key is input to the encryption processing unit 50, and decryption processing according to the bit slice encryption processing is executed.

なお、上述した処理例では、センサから多数の暗号化データを受信してサーバにおいて復号処理を行う例を説明したが、例えば、サーバが、多数のユーザ端末等に送信する暗号化データを生成する場合、多数の平文データに対してビットスライス暗号処理を適用して多数の暗号化データを生成することになる。この暗号化処理も、図3に示す暗号処理部50の構成を適用して処理が実行される。   In the processing example described above, an example in which a large number of encrypted data is received from a sensor and decrypted by a server has been described. For example, the server generates encrypted data to be transmitted to a large number of user terminals and the like. In this case, a large number of encrypted data is generated by applying bit slice encryption processing to a large number of plaintext data. This encryption process is also executed by applying the configuration of the encryption processing unit 50 shown in FIG.

暗号化処理を行う場合は、平文データからなる多数のブロックと各平文データに対応する暗号鍵を入力して処理を実行し、多数の暗号化データを生成する。
例えば、暗号化データを送信する送信先の機器IDに基づいて各平文データに対応する暗号鍵を記憶部から選択取得し、記憶部から選択取得した暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する。
さらに、平文データに基づくビットスライス表現データブロックと、暗号鍵に基づくビットスライス表現鍵ブロックを適用して、図3(B)に示す暗号処理部50に示す処理シーケンスに従って暗号化処理を実行して、暗号化データを生成して出力する。
When encryption processing is performed, a large number of blocks composed of plaintext data and an encryption key corresponding to each plaintext data are input and the processing is executed to generate a large number of encrypted data.
For example, the encryption key corresponding to each plaintext data is selected and acquired from the storage unit based on the device ID of the transmission destination to which the encrypted data is transmitted, and the bit slice expression key is obtained by bit slice processing for the encryption key selected and acquired from the storage unit. Generate.
Furthermore, the bit slice representation data block based on the plaintext data and the bit slice representation key block based on the encryption key are applied, and the encryption processing is executed according to the processing sequence shown in the encryption processing unit 50 shown in FIG. , Generate and output encrypted data.

暗号処理部50の実行するビットスライス暗号処理は、前述したように汎用プロセッサ上で動作可能なソフトウェア(プログラム)を適用した処理として実行される。すなわち特定の暗号アルゴリズム専用のハードウェア構成を備えていないPC等の機器において、以下に説明する暗号処理アルゴリズムの実行シーケンスを規定したソフトウェア(プログラム)を実行することで処理が行われる。   The bit slice encryption process executed by the encryption processing unit 50 is executed as a process to which software (program) operable on a general-purpose processor is applied as described above. That is, in a device such as a PC that does not have a hardware configuration dedicated to a specific cryptographic algorithm, processing is performed by executing software (program) that defines an execution sequence of a cryptographic processing algorithm described below.

ソフトウェア(プログラム)に従って実行する処理としては、例えば、レジスタに格納されたビットスライス表現ブロックデータを利用したブロックデータ間の演算(AND,OR,XORなど)や、レジスタに格納されたデータのシフト処理やシャッフルなどのビット位置の移動、転置処理などが含まれる。   As processing executed in accordance with software (program), for example, operations (AND, OR, XOR, etc.) between block data using bit slice expression block data stored in a register, and shift processing of data stored in a register Bit position movement, transposition processing, etc.

ソフトウェア(プログラム)に従った暗号処理を、例えば64ビットレジスタをもつプロセッサで行う場合、64ブロックを並列に処理するSIMD(Single Instruction Multiple Datastream)型並列処理として実行することが可能である。基本的なビットスライス実装法では、プロセッサのビット幅分だけ並列処理が可能である。暗号アルゴリズムで多用されるビット位置の転置は、コストゼロのレジスタのリネーム処理で実現できるため、高速化が図れる。   When cryptographic processing according to software (program) is performed by, for example, a processor having a 64-bit register, it can be executed as SIMD (Single Instruction Multiple Datastream) type parallel processing that processes 64 blocks in parallel. In the basic bit slice implementation method, parallel processing is possible by the bit width of the processor. Since the transposition of the bit position frequently used in the encryption algorithm can be realized by the renaming process of the zero-cost register, the speed can be increased.

なお、ビットスライス暗号処理において並列処理可能なブロック数は、暗号アルゴリズムやビットスライス実装アルゴリズム、プロセッサアーキテクチャ、使用するレジスタのサイズなどによってさまざまであるが、例えば、並列処理ブロック数として、8、16、32、64、128などの設定が可能である。   Note that the number of blocks that can be processed in parallel in the bit slice encryption process varies depending on the encryption algorithm, the bit slice implementation algorithm, the processor architecture, the size of the register to be used, and the like. Settings such as 32, 64, and 128 are possible.

なお、ビットスライス暗号処理においては、並列処理する暗号文ブロックは互いに独立であるため、鍵データブロックとの対応がついていれば、複数のセンサから受信したブロックが混在していても、また受信順序に関わらずどのような順序で並んでいても構わない。多数のセンサから非同期で受信される暗号化センシングデータの順序を問わず復号処理を行える点もビットスライス暗号処理を活用したこのシステムの利点である。   In the bit slice cipher processing, the ciphertext blocks to be processed in parallel are independent of each other. Therefore, as long as the correspondence with the key data block is established, even if blocks received from a plurality of sensors are mixed, the reception order Regardless of the order, it does not matter. Another advantage of this system utilizing bit slice encryption processing is that decryption processing can be performed regardless of the order of encrypted sensing data received asynchronously from a large number of sensors.

このビットスライス型の暗号処理で、処理速度に最も影響が大きい1つの要素として非線形変換処理(Sbox)がある。この非線形変換処理をいかに少ない論理演算(命令)で表現できるかが、高速化を実現するために重要なポイントとなる。
なお、近年のプロセッサは複数の命令を同時発行できるので、レジスタの依存関係等の制約を減らし、なるべく少ないサイクル数で実行できる命令系列で表現できるほど高速化が可能となる。
One of the elements that have the greatest influence on the processing speed in the bit slice type encryption processing is nonlinear conversion processing (Sbox). An important point for realizing high speed is how many non-linear conversion processes can be expressed with a small number of logical operations (commands).
Since recent processors can issue a plurality of instructions at the same time, it is possible to reduce the constraints such as register dependency and to increase the processing speed so that it can be expressed as an instruction sequence that can be executed with as few cycles as possible.

[2.軽量ブロック暗号アルゴリズム「PRESENT」について]
次に、本開示の実行する暗号処理アルゴリズムの一例である軽量ブロック暗号アルゴリズム「PRESENT」について説明する。
本開示の装置では、ビットスライスを適用した暗号処理として、例えば、ブロックサイズ64ビット,鍵長80ビット及び128ビットに対応した軽量ブロック暗号アルゴリズムである「PRESENT」を実行する。
[2. About lightweight block cipher algorithm “PRESENT”]
Next, a lightweight block encryption algorithm “PRESENT”, which is an example of an encryption processing algorithm executed by the present disclosure, will be described.
In the apparatus according to the present disclosure, “PRESENT”, which is a lightweight block cipher algorithm corresponding to a block size of 64 bits, a key length of 80 bits, and 128 bits, is executed as an encryption process to which a bit slice is applied.

軽量ブロック暗号アルゴリズム「PRESENT」に従った暗号処理シーケンスの概要について図6を参照して説明する。
軽量ブロック暗号アルゴリズム「PRESENT」では、図6に示すように、64ビットの平文ブロックと、例えば80ビットの暗号鍵を入力する。
まず、80ビット暗号鍵に基づいて64ビットのラウンド鍵を生成し、以下の処理を行う。
An outline of a cryptographic processing sequence according to the lightweight block cipher algorithm “PRESENT” will be described with reference to FIG.
In the lightweight block cipher algorithm “PRESENT”, as shown in FIG. 6, a 64-bit plaintext block and, for example, an 80-bit encryption key are input.
First, a 64-bit round key is generated based on the 80-bit encryption key, and the following processing is performed.

(ステップS71)64ビットの平文ブロックと64ビットのラウンド鍵との加算処理(排他的論理和演算:XOR)を実行する。
(ステップS72)さらに、この加算結果に対する非線形変換処理(SboxLayer)を実行する。
(ステップS73)さらに、この非線形変換結果に対して、線形変換処理(pLayer)を行う。
(Step S71) Addition processing (exclusive OR operation: XOR) of the 64-bit plaintext block and the 64-bit round key is executed.
(Step S72) Further, a non-linear conversion process (SboxLayer) is performed on the addition result.
(Step S73) Further, a linear conversion process (pLayer) is performed on the nonlinear conversion result.

このステップS71〜S73の処理、すなわち、ラウンド鍵との加算処理、非線形変換処理、線形変換処理を1単位のラウンド演算として、このラウンド演算を繰り返し実行する。例えば31ラウンドを繰り返し実行し、最終ラウンド後に再度、ラウンド鍵との演算を実行して暗号文を生成して出力する。
なお、入力鍵データに基づく更新処理(Update)を逐次、実行して、各ラウンドに適用するラウンド鍵(64ビット)の生成処理が行われる。
The round operation is repeatedly executed with the processing of steps S71 to S73, that is, the addition processing with the round key, the nonlinear conversion processing, and the linear conversion processing as one unit of round operation. For example, 31 rounds are repeatedly executed, and after the final round, an operation with the round key is executed again to generate and output a ciphertext.
Note that update processing (Update) based on input key data is sequentially executed to generate a round key (64 bits) to be applied to each round.

本開示の情報処理装置は、例えば、図6に示す軽量ブロック暗号アルゴリズム「PRESENT」に従った暗号処理を、ビットスライス処理によって生成したビットスライス表現データブロックを処理単位として、ソフトウェア(プログラム)に従って実行する。具体的には、ブロック間演算(AND,OR,XORなど)や、レジスタ格納データのシフト処理、ビット位置の転置処理などの処理を規定したソフトウェア(プログラム)に従った暗号処理を実現するものである。   The information processing apparatus according to the present disclosure executes, for example, encryption processing according to the lightweight block encryption algorithm “PRESENT” illustrated in FIG. 6 according to software (program) using a bit slice expression data block generated by bit slice processing as a processing unit. To do. Specifically, it realizes cryptographic processing according to software (program) that defines operations such as inter-block operations (AND, OR, XOR, etc.), register storage data shift processing, bit position transposition processing, etc. is there.

[3.情報処理装置(暗号処理装置)の構成と処理シーケンスの概要について]
本開示の「PRESENT」に従った暗号処理を実行する情報処理装置(暗号処理装置)の構成と処理シーケンスについて、図7を参照して説明する。
[3. Outline of configuration and processing sequence of information processing device (encryption processing device)]
The configuration and processing sequence of an information processing apparatus (encryption processing apparatus) that executes encryption processing according to “PRESENT” of the present disclosure will be described with reference to FIG.

図7は、情報処理装置100の構成と処理について説明する図である。
情報処理装置100は、例えばPC等によって構成可能であり、特定のアルゴリズムに従った暗号処理を実行するための専用ハードウェアは必須構成として持たない装置として構成可能である。
暗号処理を実行するためのソフトウェア(プログラム)をメモリに格納して、プログラムに従った処理を実行して暗号処理を行う。
FIG. 7 is a diagram illustrating the configuration and processing of the information processing apparatus 100.
The information processing apparatus 100 can be configured by, for example, a PC or the like, and can be configured as an apparatus that does not have dedicated hardware for executing cryptographic processing according to a specific algorithm.
Software (program) for executing encryption processing is stored in a memory, and processing according to the program is executed to perform encryption processing.

図7に示す情報処理装置100の暗号処理部110は、例えばプログラム実行機能を有するCPU等からなるデータ処理部、さらにデータや各種パラメータ、プログラムを格納するメモリ(RAM,ROM,レジスタ等)等によって構成され、データ処理部(CPU等)がプログラムに従って、図に示すステップS111〜S112、ステップS121〜S123の処理を実行して暗号処理を行う。   The encryption processing unit 110 of the information processing apparatus 100 shown in FIG. 7 includes, for example, a data processing unit including a CPU having a program execution function, and a memory (RAM, ROM, register, etc.) that stores data, various parameters, and programs. The data processing unit (CPU or the like) is configured to perform cryptographic processing by executing the processing of steps S111 to S112 and steps S121 to S123 shown in the drawing according to the program.

なお、以下では、入力データ80として、平文データ82と暗号鍵81を入力し、出力データ90として暗号化データ91を生成して出力する暗号化処理例について説明する。
なお、前述したように暗号処理部110は、平文データを暗号化して暗号化データを生成する暗号化処理においても、暗号化データを復号して平文データを生成する復号処理においても、図に示すステップS111〜S112、ステップS121〜S123の処理に従った暗号処理を行う。
以下では、暗号化処理と復号処理の1つの代表例として暗号化処理を行う場合の実施例について説明する。
In the following, an example of an encryption process in which plaintext data 82 and an encryption key 81 are input as input data 80 and encrypted data 91 is generated and output as output data 90 will be described.
As described above, the encryption processing unit 110 is shown in the figure both in the encryption process for encrypting plaintext data and generating encrypted data, and in the decryption process for decrypting encrypted data and generating plaintext data. Cryptographic processing is performed according to the processing of steps S111 to S112 and steps S121 to S123.
In the following, an embodiment in which encryption processing is performed will be described as one representative example of encryption processing and decryption processing.

入力データ80は、複数の暗号鍵81と、複数の平文データ82である。
これらの暗号鍵と平文データは1対1に対応づけられている。すなわち、
暗号鍵aによって暗号化される平文データa、
暗号鍵bによって暗号化される平文データb、
暗号鍵cによって暗号化される平文データc、

暗号鍵Nによって暗号化される平文データN、
暗号処理部110は、これらN個の暗号鍵と平文データのセットを処理単位として入力して暗号処理を実行する。
The input data 80 is a plurality of encryption keys 81 and a plurality of plain text data 82.
These encryption keys and plaintext data are associated one-to-one. That is,
Plaintext data a encrypted with the encryption key a,
Plaintext data b encrypted with the encryption key b,
Plaintext data c encrypted with the encryption key c,
:
Plaintext data N encrypted with the encryption key N,
The cryptographic processing unit 110 inputs the set of N cryptographic keys and plaintext data as a processing unit and executes cryptographic processing.

なお、平文データa,b,cの各々は、所定データ長のデータブロック(例えば64bit)によって構成される。
同様に、各暗号鍵a,b,cの各々も、所定データ長の鍵データブロック(例えば80bit)によって構成される。
なお、ビットサイズは一例であり、様々なビットサイズのデータや鍵の設定が可能である。
Each of the plaintext data a, b, and c is constituted by a data block (for example, 64 bits) having a predetermined data length.
Similarly, each of the encryption keys a, b, and c is configured by a key data block (for example, 80 bits) having a predetermined data length.
Note that the bit size is an example, and various bit size data and keys can be set.

出力データ90として生成する暗号化データ91は、以下のデータである。
暗号鍵aによって暗号化された暗号化データa、
暗号鍵bによって暗号化された暗号化データb、
暗号鍵cによって暗号化された暗号化データc、

暗号鍵Nによって暗号化された暗号化データN、
暗号処理部110は、これらN個の暗号化データを生成して出力する。
The encrypted data 91 generated as the output data 90 is the following data.
Encrypted data a encrypted with the encryption key a,
Encrypted data b encrypted with the encryption key b,
Encrypted data c encrypted with the encryption key c,
:
Encrypted data N encrypted with an encryption key N,
The encryption processing unit 110 generates and outputs these N pieces of encrypted data.

例えばこれらのN個の暗号化データが、図1や図2に示すネットワークを介してN個のセンサ(末端ノード)に個別に送信され、各センサにおいて復号処理が実行される。なお、暗号化に適用する鍵と復号処理に適用する鍵は同じ設定とすることが可能であり、図7の入力データとして示す暗号鍵は、例えば各センサの保持するセンサ固有鍵によって構成される。   For example, these N pieces of encrypted data are individually transmitted to N sensors (terminal nodes) via the network shown in FIGS. 1 and 2, and the decryption process is executed in each sensor. Note that a key applied to encryption and a key applied to decryption processing can be set to the same setting, and the encryption key shown as input data in FIG. 7 is constituted by, for example, a sensor unique key held by each sensor. .

図7に示す暗号処理部110の実行する処理は、以下の処理である。
ステップS111:鍵変換処理
ステップS112:鍵スケジュール処理
ステップS121:データ変換処理、
ステップS122:暗号処理、
ステップS123:データ逆変換処理、
これらの処理である。
The processing executed by the cryptographic processing unit 110 shown in FIG. 7 is the following processing.
Step S111: Key conversion process Step S112: Key schedule process Step S121: Data conversion process,
Step S122: cryptographic processing,
Step S123: data reverse conversion processing,
These processes.

暗号処理部110は、上記ステップの実行によって、ビットスライス暗号処理を適用して、軽量ブロック暗号アルゴリズム「PRESENT」に従った暗号処理を実現する。
まず、各処理の概要と全体の処理の流れについて簡単に説明し、その後、各処理の詳細について説明する。
The cryptographic processing unit 110 implements cryptographic processing according to the lightweight block cryptographic algorithm “PRESENT” by applying the bit slice cryptographic processing by executing the above steps.
First, the outline of each process and the overall process flow will be briefly described, and then the details of each process will be described.

ステップS111の鍵変換処理は、暗号鍵81、すなわち例えば80bitの鍵データからなる複数の暗号鍵ブロックの同一ビット目、あるいはnビットおきのビット、ただしnは2,4,8,16,64,128などの2のべき数、これらのビットのデータの集合であるビットスライス表現ブロックからなるビットスライス表現鍵データを生成する処理である。
ステップS121のデータ変換処理は、平文データ82、すなわち例えば64bitの平文データからなる複数のデータブロックの同一ビット目、あるいはnビットおきのビット、ただしnは2,4,8,16,64,128などの2のべき数、これらのビットのデータの集合であるビットスライス表現ブロックからなるビットスライス表現平文データを生成する処理である。
The key conversion process in step S111 is performed by the encryption key 81, that is, the same bit or a bit every n bits of a plurality of encryption key blocks composed of, for example, 80-bit key data, where n is 2, 4, 8, 16, 64, This is a process of generating bit slice expression key data composed of a bit slice expression block which is a set of data of these bits, which is a power of 2, such as 128.
The data conversion process in step S121 is performed by the plaintext data 82, that is, the same bit of a plurality of data blocks composed of, for example, 64-bit plaintext data, or every n bits, where n is 2, 4, 8, 16, 64, 128. This is a process for generating bit slice representation plaintext data composed of bit slice representation blocks that are sets of data of these bits, such as a power of 2.

ステップS112の鍵スケジュール処理(Key Scheduling)は、ステップS111の鍵変換処理(Key Conversion)において生成したビットスライス表現鍵データを適用して、暗号処理に適用する複数のラウンド鍵を生成する処理である。   The key scheduling process (Key Scheduling) in Step S112 is a process for generating a plurality of round keys to be applied to the encryption process by applying the bit slice expression key data generated in the key conversion process (Key Conversion) in Step S111. .

ステップS122の暗号処理(Data Processing)は、ステップS111のデータ変換処理(Data Conversion)において平文データに基づいて生成したビットスライス表現データに対して、ラウンド鍵を適用した暗号処理を実行するステップである。
ビットスライス処理によって生成したビットスライス表現データを構成するブロックを単位としたラウンド鍵との加算(XOR)処理、線形変換処理、非線形変換処理など、暗号アルゴリズムに従った処理をソフトウェア(プログラム)に従って実行する。
The encryption process (Data Processing) in step S122 is a step of executing an encryption process using a round key for the bit slice expression data generated based on the plain text data in the data conversion process (Data Conversion) in step S111. .
Processing according to the cryptographic algorithm, such as addition (XOR) processing with a round key (XOR) processing, linear conversion processing, and nonlinear conversion processing in units of blocks constituting the bit slice expression data generated by the bit slice processing, is executed according to software (program) To do.

次のステップS123は、ステップS122の暗号処理(Data Processing)結果に対し、データ逆変換処理(Data Conversion−1)を実行する。この処理は、ビットスライス表現データをビットスライスされる前の平文データ82に対応する暗号化データの集合に戻す処理である。この処理により、出力データ90として、平文データ82に対応する暗号化データ91が生成される。
以下、各ステップの処理の詳細について、順次、説明する。
In the next step S123, a data reverse conversion process (Data Conversion -1 ) is executed on the result of the encryption process (Data Processing) in Step S122. This processing is processing for returning the bit slice expression data to a set of encrypted data corresponding to the plain text data 82 before being bit sliced. By this processing, encrypted data 91 corresponding to the plain text data 82 is generated as the output data 90.
Hereinafter, details of the processing of each step will be sequentially described.

[4.鍵変換処理とデータ変換処理について]
まず、図7に示す暗号処理部110の以下の処理、すなわち、
ステップS111:鍵変換処理
ステップS121:データ変換処理、
これらの処理について説明する。
[4. About key conversion processing and data conversion processing]
First, the following processing of the cryptographic processing unit 110 shown in FIG.
Step S111: Key conversion process Step S121: Data conversion process,
These processes will be described.

まず、ステップS111の鍵変換処理について、図8を参照して説明する。
ステップS111の鍵変換処理は、図7に入力データとして示す暗号鍵81、すなわち例えば80bitの鍵データからなる複数の暗号鍵ブロックの同一ビット目、あるいはnビットおきのビット、ただしnは2,4,8,16,64,128などの2のべき数、これらのビットのデータの集合であるビットスライス表現鍵ブロックを生成する処理である。
First, the key conversion process in step S111 will be described with reference to FIG.
The key conversion process in step S111 is performed by the encryption key 81 shown as input data in FIG. 7, that is, the same bit or every nth bit of a plurality of encryption key blocks composed of, for example, 80-bit key data, where n is 2, 4 , 8, 16, 64, 128, and the like, and a process of generating a bit slice expression key block that is a set of data of these bits.

図8には、入力データである暗号鍵81として、(a1)〜(a8)の8つの80bitの鍵データを示している。
ステップS111では、この(a1)〜(a8)の8つの80bitの鍵データから、ビットスライス表現鍵ブロックを生成して、情報処理装置内のメモリを構成するレジスタ(XMMレジスタ(r0〜)や汎用レジスタ(g0〜))に格納する。
図8に示す(b1)〜(b8)が、ステップS111の鍵変換処理の処理結果であるレジスタ格納データ、すなわち、ビットスライス表現鍵ブロックの格納データである。ここでは8個の128ビットレジスタをビットスライス表現鍵ブロックの格納領域として利用している。
FIG. 8 shows eight 80-bit key data (a1) to (a8) as the encryption key 81 which is input data.
In step S111, a bit slice expression key block is generated from the eight 80-bit key data (a1) to (a8), and a register (XMM register (r0) or general purpose) constituting a memory in the information processing apparatus is generated. Register (g0).
(B1) to (b8) shown in FIG. 8 are register storage data that is the processing result of the key conversion processing in step S111, that is, storage data of the bit slice expression key block. Here, eight 128-bit registers are used as storage areas for bit slice expression key blocks.

暗号処理部110は、例えば、図8に示す入力データである(a1)〜(a8)の8つの80bitの鍵データの1ビット目のみを集めた8ビットデータ[0,0]を図8(b1)に示すように、XMMレジスタr0に格納する。
この8ビットデータ[0,0]は8つの80bitの鍵データの1ビット目のみからなる集合であり、1つのビットスライス表現ブロックである。
For example, the encryption processing unit 110 collects 8-bit data [0, 0] obtained by collecting only the first bits of the eight 80-bit key data (a1) to (a8) which are the input data shown in FIG. As shown in b1), it is stored in the XMM register r0.
This 8-bit data [0, 0] is a set consisting of only the first bit of eight 80-bit key data, and is one bit slice expression block.

次に、入力データ(a1)〜(a8)の2ビット目のみを集めた8ビットデータ[1,0]を図8(b2)に示すように、XMMレジスタr1に格納する。
次に、入力データ(a1)〜(a8)の3ビット目のみを集めた8ビットデータ[2,0]を図8(b3)に示すように、XMMレジスタr2に格納する。
次に、入力データ(a1)〜(a8)の4ビット目のみを集めた8ビットデータ[3,0]を図8(b4)に示すように、XMMレジスタr3に格納する。
次に、入力データ(a1)〜(a8)の5ビット目のみを集めた8ビットデータ[0,1]を図8(b1)に示すように、XMMレジスタr0に格納する。
このように、4ビット単位で、XMMレジスタr0〜r3に8ビット単位でデータを格納し、入力データ(a1)〜(a8)の前半64ビットまでのデータ(8×64=512ビット)を4つのXMMレジスタr0〜r3に格納する。
Next, 8-bit data [1, 0] obtained by collecting only the second bits of the input data (a1) to (a8) is stored in the XMM register r1, as shown in FIG. 8 (b2).
Next, 8-bit data [2, 0] obtained by collecting only the third bits of the input data (a1) to (a8) is stored in the XMM register r2, as shown in FIG. 8 (b3).
Next, 8-bit data [3, 0] obtained by collecting only the fourth bit of the input data (a1) to (a8) is stored in the XMM register r3 as shown in FIG. 8 (b4).
Next, 8-bit data [0, 1] obtained by collecting only the fifth bit of the input data (a1) to (a8) is stored in the XMM register r0 as shown in FIG. 8 (b1).
In this way, data is stored in units of 4 bits in units of 8 bits in the XMM registers r0 to r3, and data of the first 64 bits of input data (a1) to (a8) (8 × 64 = 512 bits) is stored in 4 bits. Store in the two XMM registers r0 to r3.

さらに、入力データ(a1)〜(a8)の65ビット以降のデータは、汎用レジスタ(g0〜g3)またはXMMレジスタ(r4〜r7)を順番に適用して8ビット単位で格納する。
入力データ(a1)〜(a8)の65ビット目のみを集めた8ビットデータ[0,16]を図8(b5)に示すように、XMMレジスタr4(または汎用レジスタg0)に格納する。
次に、入力データ(a1)〜(a8)の66ビット目のみを集めた8ビットデータ[1,16]を図8(b6)に示すように、XMMレジスタr5(または汎用レジスタg1)に格納する。
次に、入力データ(a1)〜(a8)の67ビット目のみを集めた8ビットデータ[1,16]を図8(b7)に示すように、XMMレジスタr6(または汎用レジスタg2)に格納する。
次に、入力データ(a1)〜(a8)の68ビット目のみを集めた8ビットデータ[1,16]を図8(b8)に示すように、XMMレジスタr7(または汎用レジスタg3)に格納する。
Furthermore, the 65-bit and subsequent data of the input data (a1) to (a8) is stored in units of 8 bits by sequentially applying the general purpose registers (g0 to g3) or the XMM registers (r4 to r7).
8-bit data [0, 16] obtained by collecting only the 65th bit of the input data (a1) to (a8) is stored in the XMM register r4 (or general-purpose register g0) as shown in FIG. 8 (b5).
Next, 8-bit data [1, 16] obtained by collecting only the 66th bit of the input data (a1) to (a8) is stored in the XMM register r5 (or general-purpose register g1) as shown in FIG. 8 (b6). To do.
Next, 8-bit data [1, 16] obtained by collecting only the 67th bit of the input data (a1) to (a8) is stored in the XMM register r6 (or general-purpose register g2) as shown in FIG. 8 (b7). To do.
Next, 8-bit data [1, 16] obtained by collecting only the 68th bit of the input data (a1) to (a8) is stored in the XMM register r7 (or general-purpose register g3) as shown in FIG. 8 (b8). To do.

このように、暗号処理部110は、80ビット鍵8本をビットスライスし、複数のレジスタに格納する。具体的には、例えば情報処理装置100が、Intel拡張SIMD命令用のレジスタであるXMMレジスタ8本(r0〜r7)、またはXMMレジスタ4本(r0〜r3)と汎用レジスタ4本(g0〜g3)を有する構成である場合、これらのレジスタを利用してビットスライスデータを8ビット単位で分散して格納する。   As described above, the encryption processing unit 110 bit-slices eight 80-bit keys and stores them in a plurality of registers. Specifically, for example, the information processing apparatus 100 has eight XMM registers (r0 to r7) that are registers for Intel extended SIMD instructions, or four XMM registers (r0 to r3) and four general-purpose registers (g0 to g3). ), The bit slice data is distributed and stored in units of 8 bits using these registers.

図8に示す例における各レジスタ格納データは以下の通りである。
入力データである(a1)〜(a8)の8つの80bitの鍵データブロックの、
1,5,9,・・・,61ビット目をXMMレジスタr0,
2,6,10,・・・,62ビット目をXMMレジスタr1,
3,7,11,・・・,63ビット目をXMMレジスタr2,
4,8,12,・・・,64ビット目をXMMレジスタr3に格納する。
さらに、入力データである(a1)〜(a8)の8つの80bitの鍵データブロックの、
65,69,73,77ビット目をXMMレジスタr4(または汎用レジスタg0)、
66,70,74,78ビット目をXMMレジスタr5(または汎用レジスタg1)、
67,71,75,79ビット目をXMMレジスタr6(または汎用レジスタg2)、
68,72,76,80ビット目をXMMレジスタr7(または汎用レジスタg3)、
に格納する。
Each register stored data in the example shown in FIG. 8 is as follows.
Of the eight 80-bit key data blocks (a1) to (a8) that are input data,
1st, 5th, 9th,..., 61st bit of the XMM register r0,
2nd, 6th, 10th,..., The 62nd bit is the XMM register r1,
3rd, 7th, 11th,..., 63rd bit of the XMM register r2,
, 64th bit is stored in the XMM register r3.
Further, eight 80-bit key data blocks (a1) to (a8) which are input data are
The 65th, 69th, 73rd, and 77th bits of the XMM register r4 (or general-purpose register g0);
66th, 70th, 74th and 78th bits are XMM register r5 (or general purpose register g1),
The 67th, 71st, 75th, and 79th bits of the XMM register r6 (or general-purpose register g2);
68th, 72th, 76th, and 80th bits, XMM register r7 (or general-purpose register g3),
To store.

このように入力データの64ビットまでを4ビット単位で、4つのレジスタを繰り返し利用して格納する。65ビット以降も同様に、4ビット単位で、新たな4つのレジスタを繰り返し利用して格納する。   In this way, up to 64 bits of input data are stored in units of 4 bits by repeatedly using four registers. Similarly, after 65 bits, new four registers are repeatedly used and stored in units of 4 bits.

なお、図8に示すレジスタ格納データの[i,j]はいずれも8つの鍵データ(a1)〜(a8)の同一ビット目の集合としてのビットスライス表現ブロックであり、8ビットデータである。
なお、レジスタ格納データの識別子として示す[i,j]中、iは、(a1)〜(a8)の8つの80bitの鍵データブロックの各入力データの先頭から4ビット単位で0,1,2,3と繰り返し設定されるパラメータであり、4ビット単位の内,どのビットを格納しているかを表す変数を示す。
jは、8つの鍵データ(a1)〜(a8)の4ビット単位データの何番目の4ビット単位データであるかを示すパラメータに相当する。
Note that [i, j] of the register storage data shown in FIG. 8 is a bit slice expression block as a set of the same bits of the eight key data (a1) to (a8), and is 8-bit data.
In [i, j] shown as the identifier of the register storage data, i is 0, 1, 2 in units of 4 bits from the head of each input data of the eight 80-bit key data blocks (a1) to (a8). , 3 is a parameter repeatedly set, and indicates a variable indicating which bit is stored in a 4-bit unit.
j corresponds to a parameter indicating what number 4-bit unit data of the 4-bit unit data of the eight key data (a1) to (a8).

例えば、[i,j]=[2,1]の、i=2は、各入力データの先頭から4ビット単位で区切った場合、
4ビット単位データ中の第1ビット目:i=0、
4ビット単位データ中の第2ビット目:i=1、
4ビット単位データ中の第3ビット目:i=2、
4ビット単位データ中の第4ビット目:i=3、
として設定されるので、
4ビット単位データ中の第3ビット目であることを示す。
For example, when i = 2 in [i, j] = [2,1] is divided in units of 4 bits from the head of each input data,
1st bit in 4-bit unit data: i = 0,
Second bit in 4-bit unit data: i = 1,
Third bit in 4-bit unit data: i = 2,
4th bit in 4-bit unit data: i = 3,
Is set as
Indicates the third bit in 4-bit unit data.

さらに、[i,j]=[2,1]の、j=1は、各入力データの先頭からの4ビット単位データの、何番目の4ビット単位データであるかを示すパラメータである。
第1番目の4ビット単位データ:j=0、
第2番目の4ビット単位データ:j=1、
第3番目の4ビット単位データ:j=2、

このように設定される。
[i,j]=[2,1]では、j=1であるので、第2番目の4ビット単位データであることが識別される。
Further, j = 1 of [i, j] = [2, 1] is a parameter indicating the number of 4-bit unit data of the 4-bit unit data from the head of each input data.
First 4-bit unit data: j = 0,
Second 4-bit unit data: j = 1,
Third 4-bit unit data: j = 2,
:
It is set in this way.
In [i, j] = [2, 1], since j = 1, the second 4-bit unit data is identified.

このように、例えば[2,1]は、
j=1によって、第2番目の4ビット単位データであり、
i=2によって、第2番目の4ビット単位データ中の3番目のデータであることが識別される。
すなわち、先頭からは、第7ビット目のデータの集合によって構成されていることが識別される。
Thus, for example, [2,1] is
j = 1 is the second 4-bit unit data,
By i = 2, it is identified that it is the third data in the second 4-bit unit data.
That is, it is identified from the beginning that the data is composed of a set of data of the seventh bit.

図7に示す暗号処理部110は、ステップS111の鍵変換処理において、このように[0,0]〜[3,19]のビットスライス表現ブロックからなるヒットスライス表現鍵データを生成してレジスタに格納する。   The encryption processing unit 110 shown in FIG. 7 generates the hit slice expression key data composed of the bit slice expression blocks [0, 0] to [3, 19] in the key conversion process in step S111 and stores them in the register. Store.

次に、ステップS121のデータ変換処理について図9を参照して説明する。
このデータ変換処理は、図8を参照して説明した鍵変換処理と同様のビットスライス表現データへの変換処理である。ただし、入力が8個の64ビットの平文データとなる点が異なる。
Next, the data conversion process in step S121 will be described with reference to FIG.
This data conversion process is a conversion process to bit slice expression data similar to the key conversion process described with reference to FIG. However, the difference is that the input is eight 64-bit plaintext data.

図9に示す例における各レジスタ格納データは以下の通りである。
入力データである(a1)〜(a8)の8つの64bitのデータブロックの、
1,5,9,・・・,61ビット目をXMMレジスタr0,
2,6,10,・・・,62ビット目をXMMレジスタr1,
3,7,11,・・・,63ビット目をXMMレジスタr2,
4,8,12,・・・,64ビット目をXMMレジスタr3に格納する。
Each register storage data in the example shown in FIG. 9 is as follows.
Of the eight 64-bit data blocks (a1) to (a8) that are input data,
1st, 5th, 9th,..., The 61st bit is the XMM register r0,
2nd, 6th, 10th,..., The 62nd bit is the XMM register r1,
3rd, 7th, 11th,..., 63rd bit of the XMM register r2,
, 64th bit is stored in the XMM register r3.

このように入力データの64ビットを4ビット単位で、4つのレジスタを繰り返し利用して格納する。
図9に示すレジスタ格納データの[i,j]はいずれも8つの平文データ(a1)〜(a8)の同一ビット目の集合であり、8ビットデータである。
iは、(a1)〜(a8)の8つの64bitの平文データブロックの各入力データの先頭から4ビット単位で0,1,2,3と繰り返し設定されるパラメータであり、4ビット単位の内,どのビットを格納しているかを表す変数を示す。
jは、8つの平文データ(a1)〜(a8)の4ビット単位データの何番目の4ビット単位データであるかを示すパラメータである。
In this way, 64 bits of input data are stored in units of 4 bits by repeatedly using four registers.
[I, j] of the register storage data shown in FIG. 9 is a set of the same bit of the eight plaintext data (a1) to (a8), and is 8-bit data.
i is a parameter that is repeatedly set to 0, 1, 2, 3 in 4-bit units from the beginning of each input data of eight 64-bit plaintext data blocks (a1) to (a8). , Indicates a variable indicating which bit is stored.
j is a parameter indicating what number 4-bit unit data of the 4-bit unit data of the eight plaintext data (a1) to (a8).

[5.鍵スケジュール処理について(鍵スケジュール処理例1)]
次に、図7に示す暗号処理部110の実行するステップS112の処理、すなわち、鍵スケジュール処理の詳細について説明する。
ステップS112の鍵スケジュール処理(Key Scheduling)は、ステップS111の鍵変換処理(Key Conversion)において生成したビットスライス表現鍵ブロックを適用して、暗号処理に適用する複数のラウンド鍵を生成する処理である。
[5. Key schedule processing (Key schedule processing example 1)]
Next, the details of the process of step S112 executed by the cryptographic processing unit 110 shown in FIG. 7, that is, the key schedule process will be described.
The key scheduling process (Key Scheduling) in Step S112 is a process for generating a plurality of round keys to be applied to the encryption process by applying the bit slice expression key block generated in the key conversion process (Key Conversion) in Step S111. .

先に、図8を参照して説明したように、ステップS111において、8つの80ビット鍵のビットスライス表現鍵データがレジスタに分散して格納されている。
ステップS112では、これらのレジスタに格納されたビットスライス表現鍵データを利用してラウンド鍵の生成処理を行う。
As described above with reference to FIG. 8, in step S111, eight 80-bit key bit slice representation key data are distributed and stored in the registers.
In step S112, round key generation processing is performed using the bit slice expression key data stored in these registers.

図10以下を参照してこのラウンド鍵の生成処理の詳細について説明する。なお、図10以下では、図8で示した各レジスタ格納データのデータ表現[i,j]を、簡略化して、以下のように、79から0までの番号を割り振った表現に書き換えて説明する。
[0,0]=79,
[1,0]=78,
[2,0]=77,
[3,0]=76,
[0,1]〜[3,1]=75〜72,
[0,2]〜[3,2]=71〜68,
・・
[0,14]〜[3,14]=7〜4
[0,15]=3
[1,15]=2
[2,15]=1
[3,15]=0
とする。
Details of the round key generation process will be described with reference to FIG. In FIG. 10 and subsequent figures, the data representation [i, j] of each register storage data shown in FIG. 8 is simplified and rewritten to an expression assigned numbers from 79 to 0 as follows. .
[0,0] = 79,
[1, 0] = 78,
[2,0] = 77,
[3,0] = 76,
[0, 1] to [3, 1] = 75 to 72,
[0,2] to [3,2] = 71 to 68,
・ ・
[0,14] to [3,14] = 7 to 4
[0,15] = 3
[1,15] = 2
[2,15] = 1
[3,15] = 0
And

なお、初期状態において、
[0,0]=79は、8つの80ビット鍵の第1ビットを集めた8ビットデータである。以下、78,77,76,75・・・0は、8つの80ビット鍵の第2,3,4,5・・・最終(80ビット目)を集めた8ビットデータに対応する。
In the initial state,
[0, 0] = 79 is 8-bit data obtained by collecting the first bits of eight 80-bit keys. In the following description, 78, 77, 76, 75... 0 corresponds to 8-bit data obtained by collecting the second, third, fourth, fifth, last (80th bit) of eight 80-bit keys.

ステップS111において生成したビットスライス表現鍵データのレジスタ格納データは、図10に示す通りである。
図10に示す通り、0〜79まで80個のビットスライスブロックがレジスタに分散して格納されている。
個々のブロックは、8つの暗号鍵の同一ビット目の集合からなる8ビットデータからなるブロック(ビットスライス表現ブロック)である。
以下に説明するように、このブロックを単位としたブロック単位の処理を実行することで、8つの鍵を個別に適用した暗号処理と同様の処理を1回の暗号処理で実行することができる。
The register storage data of the bit slice expression key data generated in step S111 is as shown in FIG.
As shown in FIG. 10, 80 bit slice blocks from 0 to 79 are distributed and stored in the registers.
Each block is a block (bit slice expression block) composed of 8-bit data composed of a set of the same bits of eight encryption keys.
As will be described below, by executing block-by-block processing using this block as a unit, processing similar to encryption processing in which eight keys are individually applied can be executed in one encryption processing.

ステップS112では、これらのレジスタに格納されたビットスライス表現の80ビット鍵8本を利用して、ラウンド鍵を生成する。暗号処理アルゴリズム「PRESENT」ではラウンド数に応じた32個のラウンド鍵を必要とし、ステップS112では、レジスタに格納されたビットスライス表現データを利用して、32個のラウンド鍵を生成する。   In step S112, a round key is generated using eight 80-bit keys expressed in bit slices stored in these registers. In the cryptographic processing algorithm “PRESENT”, 32 round keys corresponding to the number of rounds are required. In step S112, 32 round keys are generated using the bit slice expression data stored in the register.

なお、以下に説明する処理によって生成するラウンド鍵は、ブロック(ビットスライス表現ブロック)単位の処理に適用するラウンド鍵である。
例えば、図6に示す通常のPRESENTアルゴリズムにおいて、64ビット平文に適用する各ラウンドのラウンド鍵は64ビットとなるが、図7に示すビットスライスデータを適用した暗号処理を実行するステップS122の暗号処理は、ビットスライス表現ブロック単位の処理として実行する。
すなわち、平文は、64ブロックを単位として暗号処理を行うことになり、この暗号処理に適用するラウンド鍵も64ブロックのラウンド鍵となる。
Note that the round key generated by the processing described below is a round key applied to processing in units of blocks (bit slice expression blocks).
For example, in the normal PRESENT algorithm shown in FIG. 6, the round key of each round applied to 64-bit plaintext is 64 bits, but the encryption process in step S122 for executing the encryption process using the bit slice data shown in FIG. Is executed as processing in units of bit slice expression blocks.
That is, plaintext is subjected to cryptographic processing in units of 64 blocks, and the round key applied to this cryptographic processing is also a 64-block round key.

本実施例では、1つの鍵ブロック(ビットスライス表現鍵ブロック)には、元の8つの暗号鍵81の同一ビット目のデータ、すなわち8ビットが格納されている。
本開示のビットスライス暗号処理に適用するラウンド鍵は、64ブロックのラウンド鍵、すなわち64×8ビット=512ビットのラウンド鍵となる。
In this embodiment, one key block (bit slice expression key block) stores the data of the same bit of the original eight encryption keys 81, that is, 8 bits.
The round key applied to the bit slice encryption processing of the present disclosure is a 64-block round key, that is, 64 × 8 bits = 512 bits round key.

暗号化処理対象となる平文も同様であり、図6に示す通常のPRESENTアルゴリズムでは平分入力が64ビットであるが、本開示のビットスライス暗号処理においては、ビットスライス表現データの64ブロック、すなわち64×8ビット=512ビットの64ブロックを入力して処理が実行される。   The same applies to the plaintext to be encrypted. In the normal PRESENT algorithm shown in FIG. 6, the plain input is 64 bits. However, in the bit slice encryption processing of the present disclosure, 64 blocks of bit slice expression data, that is, 64 blocks. The process is executed by inputting 64 blocks of 8 bits = 512 bits.

ステップS112では、ビットスライス表現ブロック同士の暗号処理に適用する64ブロックからなる32個のラウンド鍵を生成する。
生成したラウンド鍵は、図11に示すように、鍵ポインタ(pt)によって指定されるメモリ領域(m0〜m3)に書き出す。
In step S112, 32 round keys composed of 64 blocks to be applied to encryption processing between the bit slice expression blocks are generated.
The generated round key is written in the memory area (m0 to m3) designated by the key pointer (pt) as shown in FIG.

ステップS112において実行する鍵スケジュール処理の詳細フローを図12に示す。
まず、ステップS201において、入力データと初期データの設定を行う。
具体的には、入力データとしてレジスタに格納したビットスライス表現鍵データを入力する。さらに、生成したラウンド鍵を書きだすメモリ領域を示すポインタ(pt)、生成するラウンド鍵のラウンド番号Rnの設定を行う。初期設定としてはRn=0とし、以降、Rn=1,2,3・・・と順次、増加してRn=31までの32本のラウンド鍵を生成する。
A detailed flow of the key schedule processing executed in step S112 is shown in FIG.
First, in step S201, input data and initial data are set.
Specifically, bit slice expression key data stored in a register is input as input data. Further, a pointer (pt) indicating a memory area in which the generated round key is written and a round number Rn of the generated round key are set. Rn = 0 is set as an initial setting, and thereafter, 32 round keys are generated in order of Rn = 1, 2, 3.

ステップS202において、Rn=31に達したか否かを判定する。Rn=31未満である場合は、ステップS203に進み、生成したラウンド鍵を書きだすメモリアドレスを示すポインタ(pt)を更新する。ラウンド鍵の格納領域を確保しながらポイント(pt)を更新すればよい。   In step S202, it is determined whether or not Rn = 31 has been reached. When Rn = less than 31, the process proceeds to step S203, and the pointer (pt) indicating the memory address to which the generated round key is written is updated. What is necessary is just to update a point (pt), ensuring the storage area of a round key.

ステップS204では、ラウンド鍵生成更新処理を実行して、ラウンド番号Rnを1つ増分する。
この詳細処理については、後段で説明する。
In step S204, a round key generation / updating process is executed to increment the round number Rn by one.
This detailed processing will be described later.

次に、ステップS202に戻り、Rn=31に達したか否かを判定する。Rn=31未満である場合は、ステップS203以下の処理を繰り返す。ステップS202において、Rn=31に達したと判定した場合は、ステップS204に進み、生成したラウンド鍵をメモリに書き出す処理を実行する。最後に、ステップS205において生成したラウンド鍵を読み出して暗号処理の実行に移行する。   Next, returning to step S202, it is determined whether or not Rn = 31 has been reached. When it is less than Rn = 31, the process after step S203 is repeated. If it is determined in step S202 that Rn = 31 has been reached, the process proceeds to step S204, and a process of writing the generated round key to the memory is executed. Finally, the round key generated in step S205 is read out, and the process proceeds to execution of encryption processing.

ステップS203において実行するラウンド鍵生成更新処理の詳細処理フローを図13に示す。
なお、図11に示すように、レジスタr0,r1,r2,r3,r4,r5,r6,r7にビットスライス処理によって生成したビットスライス表現鍵ブロックが格納されているものとする。
FIG. 13 shows a detailed processing flow of the round key generation / updating process executed in step S203.
As shown in FIG. 11, it is assumed that the bit slice expression key block generated by the bit slice processing is stored in the registers r0, r1, r2, r3, r4, r5, r6, and r7.

まず、図13に示すフローチャートのステップS221において、レジスタr1,r2,r3,r4をレジスタr9,r10,r11,r8にコピーする。
すなわち、図14に示すように、レジスタr1,r2,r3,r4をレジスタr9,r10,r11,r8にコピーする。
First, in step S221 of the flowchart shown in FIG. 13, the registers r1, r2, r3, r4 are copied to the registers r9, r10, r11, r8.
That is, as shown in FIG. 14, the registers r1, r2, r3, r4 are copied to the registers r9, r10, r11, r8.

次に、ステップS222において、レジスタr8にシャッフル命令を実行し、レジスタ8の格納データの入れ替えを行う。
なお、本開示の装置において実行するシャッフルは、1つのレジスタに格納されたデータをブロック単位で入れ替えて同じレジスタに格納する処理である。すなわち、レジスタ内のブロック単位のデータをブロック単位で入れ替える処理である。
Next, in step S222, a shuffle instruction is executed on the register r8, and the data stored in the register 8 is replaced.
Note that the shuffle executed in the apparatus of the present disclosure is a process of replacing data stored in one register in units of blocks and storing the data in the same register. That is, it is a process of exchanging block unit data in the register in block units.

例えば、レジスタr8の格納データが、先頭から8ビット単位で、以下のデータである場合、
[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15]
ステップS222のシフト処理は以下のシフト処理として実行する。
For example, when the data stored in the register r8 is the following data in units of 8 bits from the top,
[0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [0 , 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]
The shift process in step S222 is executed as the following shift process.

([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,1],[0,2],[0,3],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]),
すなわち、8ビットデータ単位の左方向シフトを実行する。
この結果が図15に示すデータとなる。
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 1], [0, 2], [0, 3], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]),
That is, a leftward shift in units of 8-bit data is performed.
The result is the data shown in FIG.

次に、ステップS223において、レジスタr9,r10,r11,r8の格納データに対して予め定めた非線形変換(Sbox論理命令列)に対応する演算処理を実行する。
図16に示すように、レジスタr9,r10,r11,r8の格納データであるブロック18,17,16,15に対して非線形変換(Sbox論理命令列)処理を実行した結果を、レジスタr8,r9,r10,r11に格納する。非線形変換処理結果は、図16に示す以下のデータである。
レジスタr8のデータS0、
レジスタr9のデータS1、
レジスタr10のデータS2、
レジスタr11のデータS3、
なお、本実施例で適用する非線形変換(Sbox論理命令列)処理は、例えば図17に示す論理命令列をレジスタ間の格納データ間で実行する演算処理として実行される。
図17の論理命令列として示すレジスタ:x3,x2,x1,x0,x4は、それぞれ図16に示すレジスタr9,r10,r11,r8,r12に対応する。
なお、図16に示すレジスタr12は、図17に示す論理命令列中のレジスタx4に対応し、演算処理の中間データ等を格納するテンポラリ領域として利用する。
Next, in step S223, arithmetic processing corresponding to a predetermined non-linear transformation (Sbox logic instruction sequence) is executed on the data stored in the registers r9, r10, r11, r8.
As shown in FIG. 16, the result of executing the non-linear transformation (Sbox logic instruction sequence) processing on the blocks 18, 17, 16, 15 which are the stored data of the registers r9, r10, r11, r8 is the result of the register r8, r9. , R10, r11. The result of the nonlinear conversion processing is the following data shown in FIG.
Data S0 of register r8,
Data S1 of register r9,
Data S2 of register r10,
Data S3 of register r11,
Note that the non-linear transformation (Sbox logical instruction sequence) processing applied in the present embodiment is executed as an arithmetic processing for executing, for example, the logical instruction sequence shown in FIG. 17 between stored data between registers.
The registers x3, x2, x1, x0, and x4 shown as logical instruction sequences in FIG. 17 correspond to the registers r9, r10, r11, r8, and r12 shown in FIG.
The register r12 shown in FIG. 16 corresponds to the register x4 in the logical instruction sequence shown in FIG. 17, and is used as a temporary area for storing intermediate data for arithmetic processing.

次にステップS224において、レジスタr8,r9,r10,r11の格納データを左120ビットシフトする。
図18に、レジスタr8,r9,r10,r11の格納データを左120ビットシフトした結果を示す。
In step S224, the data stored in the registers r8, r9, r10, r11 are shifted by 120 bits to the left.
FIG. 18 shows a result obtained by shifting the data stored in the registers r8, r9, r10, r11 to the left by 120 bits.

次に、ステップS225において、レジスタr5,r6,r7の格納データを右8ビットシフトし、
レジスタr4と予め既定したデータからなるマスク0(MASK0)とのAND処理、
レジスタr5,r6,r7と予め既定したデータからなるマスク1(MASK1)とのAND処理を行う。
なお、マスクの値はレジスタに保持しておく必要はない。
Next, in step S225, the data stored in the registers r5, r6, r7 is shifted to the right by 8 bits,
AND processing of register r4 and mask 0 (MASK0) consisting of predetermined data;
An AND process is performed on the registers r5, r6, r7 and a mask 1 (MASK1) made of predetermined data.
Note that the mask value need not be stored in the register.

マスク0(MASK0)は、図19に示すように、8ビットデータ単位の2〜4番目のブロックのビットのみを1、その他を0としたマスクである。
マスク1(MASK1)は、図19に示すように、8ビットデータ単位の2〜5番目のブロックのビットのみを1、その他を0としたマスクである。
このマスクデータとのAND処理によって、図19に示すように、レジスタr4〜r7の先頭8ビットデータは0に書き換えられる。
As shown in FIG. 19, the mask 0 (MASK0) is a mask in which only the bits of the 2nd to 4th blocks of the 8-bit data unit are set to 1 and the others are set to 0.
As shown in FIG. 19, the mask 1 (MASK1) is a mask in which only the bits of the second to fifth blocks of 8-bit data units are set to 1 and the others are set to 0.
By the AND processing with the mask data, the leading 8-bit data in the registers r4 to r7 is rewritten to 0 as shown in FIG.

次に、ステップS226において、レジスタr4,r5,r6,r7とレジスタr11,r8,r9,r10の排他的論理和演算(XOR)を実行して、出力をレジスタr4,r5,r6,r7に格納する。
図20にこれらの排他的論理和演算(XOR)処理と処理結果の格納データを示す。
これらの排他的論理和演算(XOR)処理の結果、レジスタr4,r5,r6,r7の先頭8ビットには、レジスタr11,r8,r9,r10の先頭8ビットデータであるステップS223の非線形変換処理(Sbox)の演算結果が格納される。
Next, in step S226, an exclusive OR operation (XOR) of the registers r4, r5, r6, r7 and the registers r11, r8, r9, r10 is executed, and the output is stored in the registers r4, r5, r6, r7. To do.
FIG. 20 shows the exclusive OR (XOR) processing and the storage data of the processing result.
As a result of these exclusive OR operations (XOR) processing, the first 8 bits of the registers r4, r5, r6, r7 are replaced with the non-linear transformation processing of step S223 which is the first 8 bits data of the registers r11, r8, r9, r10. The calculation result of (Sbox) is stored.

次に、ステップS227において、レジスタr0,r1,r2,r3に対してシャッフル命令を実行し,シャッフル結果をレジスタr0,r1,r2,r3に格納する。
シャッフル処理の処理前と処理後のレジスタr0,r1,r2,r3の格納データを図21に示す。
Next, in step S227, a shuffle instruction is executed for the registers r0, r1, r2, and r3, and the shuffle result is stored in the registers r0, r1, r2, and r3.
FIG. 21 shows data stored in the registers r0, r1, r2, and r3 before and after the shuffle process.

このシャッフル処理におけるデータ並び替えの順序はレジスタr0とレジスタr1,r2,r3で異なる。各レジスタの8ビット単位のデータを、先頭から、
[0,0,[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15]
とする。
The order of data rearrangement in the shuffle process is different between the register r0 and the registers r1, r2, and r3. From the top of the 8-bit unit data of each register,
[0,0, [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]
And

ステップS227のシャッフル処理は、レジスタr0に対しては、以下の設定で実行する。
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,12],[0,13],[0,14],[0,15],[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11])
The shuffle process in step S227 is executed with the following settings for the register r0.
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 12], [0, 13], [0, 14], [0, 15], [0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9], [0, 10], [0, 11])

また、レジスタr1,r2,r3に対しては、以下の設定で実行する。
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,11],[0,12],[0,13],[0,14],[0,15],[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10])
Further, the following settings are executed for the registers r1, r2, and r3.
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 11], [0, 12], [0, 13], [0, 14], [0, 15], [0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9], [0, 10])

次のステップS228では、レジスタr0,r1,r2,r3のデータをレジスタr8,r9,r10,r11にコピーし、さらに、
レジスタr8と、マスク2(MASK2)のAND処理、
レジスタr9,r10,r11と、マスク3(MASK3)のAND処理、
これらのAND処理を実行して、その結果をレジスタr8,r9,r10,r11に格納する。
これらの処理結果を図22に示す。
In the next step S228, the data in the registers r0, r1, r2, and r3 are copied to the registers r8, r9, r10, and r11.
AND processing of register r8 and mask 2 (MASK2),
AND processing of registers r9, r10, r11 and mask 3 (MASK3),
These AND processes are executed, and the results are stored in the registers r8, r9, r10, r11.
These processing results are shown in FIG.

なお、マスク2(MASK2)は、図22に示すように、先頭32ビット=0、その後96ビット=1のマスクデータである。
マスク3(MASK3)は、図22に示すように、先頭40ビット=0、その後88ビット=1のマスクデータである。
As shown in FIG. 22, mask 2 (MASK2) is mask data of the first 32 bits = 0 and then 96 bits = 1.
As shown in FIG. 22, the mask 3 (MASK3) is mask data of the first 40 bits = 0 and then 88 bits = 1.

この処理の結果、レジスタr8の先頭32ビットは0に設定され、レジスタr9,r10,r11の先頭40ビットは0に設定される。   As a result of this processing, the first 32 bits of the register r8 are set to 0, and the first 40 bits of the registers r9, r10, r11 are set to 0.

次に、ステップS229において、レジスタr4,r5,r6,r7とレジスタr8,r9,r10,r11の排他的論理和演算(XOR)を実行して,結果をr4,r5,r6,r7に格納する。
この排他的論理和演算(XOR)処理を図23に示す。
Next, in step S229, an exclusive OR operation (XOR) of the registers r4, r5, r6, r7 and the registers r8, r9, r10, r11 is executed, and the result is stored in r4, r5, r6, r7. .
This exclusive OR operation (XOR) process is shown in FIG.

次に、ステップS230において、レジスタr5,r6,r7,r4の右8ビット,r1の左8ビットに対して,予め設定したカウント値であるラウンドカウンタ(roundcounter)の値との排他的論理和演算(XOR)を行う。
ラウンドカウンタは、
ラウンド数:0〜31に応じた2進数表現としての00000〜11111の各カウント値に設定する。
Next, in step S230, an exclusive OR operation is performed on the right 8 bits of the registers r5, r6, r7, and r4 and the left 8 bits of r1 with a round counter value that is a preset count value. (XOR) is performed.
Round counter
Number of rounds: Set to each count value of 00000 to 11111 as a binary expression according to 0 to 31.

例えばラウンド数=13のラウンド鍵を生成する場合は、ラウンドカウンタは、2進数表現としての13を示す01101の各カウント値に設定する。
このカウント値01101に対して、レジスタr5,r6,r7,r4の右8ビット,r1の左8ビットとのXOR演算を行う。
なお、ラウンドカウンタのカウント値00000〜11111とのXOR演算の順番は、各レジスタの格納値の元のデータの上位ビットからの順番とする。図24に示す例では、値の大きい順番であり、38,37,36,35,34の順番とする。
すなわちレジスタ順としては、r5,r6,r7,r4,r1となる。
For example, when generating a round key with round number = 13, the round counter is set to each count value of 01101 indicating 13 as a binary number expression.
An XOR operation is performed on the count value 01101 with the right 8 bits of the registers r5, r6, r7, r4 and the left 8 bits of r1.
Note that the order of the XOR operation with the count values 00000 to 11111 of the round counter is the order from the upper bit of the original data of the stored value of each register. In the example shown in FIG. 24, the values are in the descending order, ie, 38, 37, 36, 35, 34.
That is, the register order is r5, r6, r7, r4, r1.

図24に示すように、
上位から、
カウント値01101の第1ビット目の0に対して、レジスタr5の右8ビットデータ(図24に示すレジスタr5の[38])
カウント値01101の第2ビット目の1に対して、レジスタr6の右8ビットデータ(図24に示すレジスタr6の[37])
カウント値01101の第3ビット目の1に対して、レジスタr7の右8ビットデータ(図24に示すレジスタr7の[36])
カウント値01101の第4ビット目の0に対して、レジスタr4の右8ビットデータ(図24に示すレジスタr6の[35])
カウント値01101の第5ビット目の1に対して、レジスタr1の左8ビットデータ(図24に示すレジスタr1の[34])
これらの値同士のXOR演算を実行して、それぞれのデータを更新する。
As shown in FIG.
From the top
The right 8-bit data of register r5 with respect to 0 of the first bit of count value 01101 ([38] of register r5 shown in FIG. 24)
The right 8-bit data of the register r6 ([37] of the register r6 shown in FIG. 24) with respect to 1 of the second bit of the count value 01101
For the third bit 1 of the count value 01101, the right 8-bit data of the register r7 ([36] of the register r7 shown in FIG. 24)
The right 8-bit data of the register r4 ([35] of the register r6 shown in FIG. 24) with respect to 0 of the fourth bit of the count value 01101
The left 8-bit data of the register r1 ([34] of the register r1 shown in FIG. 24) with respect to 1 of the fifth bit of the count value 01101
An XOR operation between these values is executed to update the respective data.

なお、この排他的論理和(XOR)演算には、図25に示すようなマスク4(MASK4)、マスク5(MASK5)を適用することが可能である。
マスク4(MASK4)は先行120ビット=0、末尾8ビット=1に設定されたマスクデータである。
マスク5(MASK5)は、先行8ビット=1、末尾120ビット=0に設定されたマスクデータである。
レジスタr5,r6,r7,r4とのXORにMASK4,レジスタr1とのXORにはMASK5を用いる。
Note that a mask 4 (MASK4) and a mask 5 (MASK5) as shown in FIG. 25 can be applied to this exclusive OR (XOR) operation.
Mask 4 (MASK4) is mask data set with leading 120 bits = 0 and trailing 8 bits = 1.
Mask 5 (MASK5) is mask data in which the preceding 8 bits = 1 and the last 120 bits = 0.
MASK4 is used for XOR with the registers r5, r6, r7, r4, and MASK5 is used for XOR with the register r1.

なお、このステップS230の排他的論理和演算(XOR)は、ラウンドカウンタ(roundcounter)=00000〜11111の構成5ビット中、1が設定されたビットに対応するレジスタを対象として実行し、0の設定されたビットに対応するレジスタは処理を行わない設定としても同様の結果となる。   The exclusive OR operation (XOR) in step S230 is executed for the register corresponding to the bit in which 1 is set in the 5 bits of the round counter (roundcounter) = 00000 to 11111, and is set to 0. The same result is obtained even if the register corresponding to the set bit is set not to be processed.

すなわち、上述した、元のデータの上位から並べたレジスタ順:r5,r6,r7,r4,r1に対して、例えばラアンドカウンタの値が13=01101の場合は、ラウンドカウンタの第2,3,5ビットのみが1であるので、レジスタr5,r6,r7,r4,r1に対して、
レジスタr6,r7とマスク4(MASK4)とのXOR演算、
レジスタr1と、マスク5(MASK5)とのXOR演算、
これらのみを実行する構成としてもよい。
That is, for the register order arranged from the top of the original data: r5, r6, r7, r4, r1, for example, when the value of the run and counter is 13 = 01011, the second and third round counters , 5 bits are 1, so for registers r5, r6, r7, r4, r1,
XOR operation between the registers r6 and r7 and the mask 4 (MASK4),
XOR operation of register r1 and mask 5 (MASK5),
It is good also as a structure which performs only these.

このステップS230の結果として得られるレジスタの、
レジスタr5,r6,r7,r4,r1,r2,r3,r0の格納データを次のラウンド鍵生成用のブロックとする。
このレジスタr5,r6,r7,r4,r1,r2,r3,r0に格納されたブロックから64ブロックを次のラウンドのラウンド鍵として設定する。
以下、この更新されたレジスタ格納ブロックを適用して、図13のフローに従った処理を繰り返して32個のラウンド鍵を生成する。
Of the register obtained as a result of this step S230,
The data stored in the registers r5, r6, r7, r4, r1, r2, r3, r0 is used as the next round key generation block.
64 blocks from the blocks stored in the registers r5, r6, r7, r4, r1, r2, r3, r0 are set as round keys for the next round.
Hereinafter, the updated register storage block is applied, and the process according to the flow of FIG. 13 is repeated to generate 32 round keys.

以上、図13に示すフローチャートに従った具体的な処理について、説明してきたが、これらのラウンド鍵生成、更新処理を簡略化してまとめて示すと、図26のように示すことができる。   The specific processing according to the flowchart shown in FIG. 13 has been described above, but when the round key generation and update processing is simplified and shown collectively, it can be shown as in FIG.

図26(A)は、図10に示す複数のレジスタに格納された80ブロックを上位から79〜0まで並べて示したレジスタ初期格納データである。
この初期設定ブロックから64ブロックが初期のラウンド鍵として選択される。
その後、この図26(A)に示すレジスタ初期格納データである80ブロックに対して、図13に示すフローに従った処理を実行する。すなわち、図14〜図25を参照して説明した処理を行いレジスタの更新を行う。
このレジスタ更新処理をまとめて示したのが図26(B)である。
レジスタ更新処理は、
(a)ブロック単位のシフト処理やシャッフル処理等からなるローテーション処理、
(b)ブロック単位の非線形変換処理(Sbox)、
(c)ブロックとラウンドカウンタ(00000〜111111)との排他的論理和演算、
これらの各処理を含む処理として実行される。
これらの結果として、図26(B)の再下段に示すレジスタ更新データ、すなわち次のラウンド鍵を生成するためのデータが設定される。このレジスタのブロックから左から64ブロックを選択し、これをラウンド鍵として設定する。
その後は、この図26(B)の再下段に示すレジスタ更新データに対して、図26(B)の鍵更新を繰り返してレジスタ更新を行い、順次ラウンド鍵を生成する。
FIG. 26A shows register initial storage data in which 80 blocks stored in a plurality of registers shown in FIG.
From this initial setting block, 64 blocks are selected as initial round keys.
Thereafter, processing according to the flow shown in FIG. 13 is executed on the 80 blocks which are the register initial storage data shown in FIG. That is, the processing described with reference to FIGS. 14 to 25 is performed to update the register.
FIG. 26B collectively shows the register update processing.
Register update processing
(A) Rotation processing including block-unit shift processing and shuffle processing,
(B) Non-linear transformation processing (Sbox) in units of blocks,
(C) exclusive OR operation between block and round counter (00000 to 111111),
It is executed as a process including these processes.
As a result of these, the register update data shown in the lower part of FIG. 26B, that is, data for generating the next round key is set. From this register block, 64 blocks are selected from the left and set as round keys.
Thereafter, with respect to the register update data shown in the lower part of FIG. 26 (B), the key update in FIG. 26 (B) is repeated to update the register, thereby sequentially generating round keys.

図7に示すステップS112の鍵スケジュール処理では、このようにして、ラウンド鍵を生成する。   In the key schedule process of step S112 shown in FIG. 7, a round key is generated in this way.

[6.鍵スケジュール処理について(鍵スケジュール処理例2)]
次に、図7に示す暗号処理部110において実行するステップS112の鍵スケジュール処理のもう1つの実施例について説明する。
前章の[5.鍵スケジュール処理について(鍵スケジュール処理例1)]において説明した鍵スケジュール部では各ラウンド毎に、毎回、Sbox、すなわち非線形変換処理を行うことが必要となる。すなわち、図16、図17を参照して説明した4つのブロックに対する非線形変換処理(Sbox)である。
この非線形変換処理は、図17に示すように演算ステップ数が多く、処理時間を増加させてしまうという問題がある。
[6. Key schedule processing (key schedule processing example 2)]
Next, another embodiment of the key schedule process of step S112 executed in the cryptographic processing unit 110 shown in FIG. 7 will be described.
[5. Regarding the key schedule processing (key schedule processing example 1)], it is necessary to perform Sbox, that is, non-linear conversion processing every round for each round. That is, the non-linear transformation process (Sbox) for the four blocks described with reference to FIGS.
As shown in FIG. 17, this nonlinear conversion process has a problem that the number of operation steps is large and the processing time is increased.

以下では、鍵スケジュール処理例2として、非線形変換処理(Sbox)の実行回数を2回に減らした手法について説明する。
本処理例の鍵スケジュール部の実行する処理を説明するフローを図27に示す。
Hereinafter, as a key schedule processing example 2, a method in which the number of executions of the nonlinear transformation process (Sbox) is reduced to two will be described.
FIG. 27 shows a flow for explaining the processing executed by the key schedule unit of this processing example.

先に図12を参照して説明した鍵スケジュール処理との違いは、1ラウンド目と、17ラウンド目の前のステップS252とステップS257において非線形変換(Sbox)の事前計算を行っている点と、ステップS255とステップS260のラウンド鍵生成更新処理の内容である。   The difference from the key schedule processing described above with reference to FIG. 12 is that the pre-calculation of non-linear transformation (Sbox) is performed in the first round and in steps S252 and S257 before the 17th round, This is the content of the round key generation / updating process in steps S255 and S260.

図27のフローのステップS251の処理は、図12のフローのステップS201の処理と同様の処理である。
図27のフローのステップS254、S259の処理は、図12のフローのステップS203の処理と同様の処理である。
図27のフローのステップS256、S261の処理は、図12のフローのステップS205の処理と同様の処理である。
図27のフローのステップS262の処理は、図12のフローのステップS206の処理と同様の処理である。
これらの処理についての説明は省略し、以下、図12を参照して説明した鍵スケジュール処理と異なる処理について説明する。
The process of step S251 in the flow in FIG. 27 is the same as the process in step S201 in the flow in FIG.
The processing in steps S254 and S259 in the flow in FIG. 27 is the same processing as the processing in step S203 in the flow in FIG.
The processing in steps S256 and S261 in the flow in FIG. 27 is the same processing as the processing in step S205 in the flow in FIG.
The process of step S262 in the flow of FIG. 27 is the same process as the process of step S206 of the flow in FIG.
A description of these processes will be omitted, and a process different from the key schedule process described with reference to FIG. 12 will be described below.

(6−1.非線形変換(Sbox)の事前計算処理について)
ステップS252とステップS257において実行する非線形変換処理(Sbox)の事前計算処理の詳細シーケンスを説明するフローを図28、図29に示す。
初期状態は、図30に示すように、79〜0の各ビットスライス表現鍵ブロックがレジスタに格納されているものとする。これば、先に図10、図11を参照して説明した設定と同様である。
例えば、[79]のビットスライス表現鍵ブロックは、8つの80ビット鍵の第1ビットを集めた8ビットデータである。以下、78,77,76,75・・・0は、8つの80ビット鍵の第2,3,4,5・・・最終(80ビット目)を集めた8ビットデータに対応する。
(6-1. Pre-computation processing of nonlinear transformation (Sbox))
A flow for explaining a detailed sequence of the pre-calculation process of the nonlinear transformation process (Sbox) executed in step S252 and step S257 is shown in FIGS.
In the initial state, as shown in FIG. 30, it is assumed that each bit slice expression key block of 79 to 0 is stored in the register. This is the same as the setting described above with reference to FIGS.
For example, the bit slice representation key block of [79] is 8-bit data obtained by collecting the first bits of eight 80-bit keys. In the following description, 78, 77, 76, 75... 0 corresponds to 8-bit data obtained by collecting the second, third, fourth, fifth, last (80th bit) of eight 80-bit keys.

図28〜図29に示すフローに従って、図27のフローのステップS252とステップS257において実行する非線形変換(Sbox)事前計算の詳細シーケンスについて説明する。   A detailed sequence of non-linear transformation (Sbox) pre-calculation executed in steps S252 and S257 of the flow of FIG. 27 will be described according to the flow shown in FIGS.

まず、図28のフローに示すステップS281において、
図31に示すように、レジスタr0,r1,r2,r3をレジスタr12,r13,r14,r15にコピーし、レジスタr12,r13,r14,r15に対してシャッフル命令を行う。
First, in step S281 shown in the flow of FIG.
As shown in FIG. 31, the registers r0, r1, r2, and r3 are copied to the registers r12, r13, r14, and r15, and a shuffle instruction is performed on the registers r12, r13, r14, and r15.

このシャッフル処理における並び替えの順序は各レジスタ異なる。
レジスタr12,r13,r14,r15のシャッフル前のデータの並び(=レジスタr0,r1,r2,r3と同じ)を左から、[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15]としたとき、各レジスタのシャッフルは以下の設定とする。
The order of rearrangement in the shuffle process is different for each register.
[0, 0], [0, 1], [0, 2], the arrangement of data before shuffling of registers r12, r13, r14, r15 (= same as registers r0, r1, r2, r3) from the left [0,3], [0,4], [0,5], [0,6], [0,7], [0,8], [0,9], [0,10], [0 , 11], [0, 12], [0, 13], [0, 14], [0, 15], the shuffle of each register is set as follows.

レジスタr12,r13
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,1],[0,2],[0,3],[0,4],[0,6],[0,7],[0,8],[0,9],[0,11],[0,12],[0,13],[0,14],[0,15],[0,0],[0,0],[0,0])
Registers r12, r13
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 1], [0, 2], [0, 3], [0, 4], [0, 6], [0, 7], [0, 8], [0, 9], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15], [0, 0], [0, 0], [0, 0])

レジスタr14
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,1],[0,2],[0,3],[0,4],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,15],[0,0],[0,0],[0,0])
Register r14
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 1], [0, 2], [0, 3], [0, 4], [0, 6], [0, 7], [0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 15], [0, 0], [0, 0], [0, 0])

レジスタr15:
[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,10],[0,11],[0,12],[0,13],[0,15],[0,0],[0,0],[0,0]
Register r15:
[0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [0 , 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([0 , 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 10 ], [0,11], [0,12], [0,13], [0,15], [0,0], [0,0], [0,0]

次のステップS282において、
図32に示すように、レジスタr4,r5,r6,r7のデータをレジスタr8,r9,10,r11に格納し、r8を右12バイト論理シフト,r9,r10,r11を右13バイト論理シフトする。
In the next step S282,
As shown in FIG. 32, the data of registers r4, r5, r6, and r7 are stored in registers r8, r9, 10, and r11, r8 is logically shifted by 12 bytes on the right, and r9, r10, and r11 are logically shifted on the right by 13 bytes. .

次のステップS283において、
図33に示すように、
レジスタr12とマスク6(MASK6)とのAND処理、
レジスタr13,r14,r15とマスク7(MASK7)とのAND処理を実行する。
マスク6(MASK6)は先頭96ビット=0、後続32ビット=1のマスクである。
マスク7(MASK7)は先頭104ビット=0、後続24ビット=1のマスクである。
In the next step S283,
As shown in FIG.
AND processing of register r12 and mask 6 (MASK6),
An AND process of the registers r13, r14, r15 and the mask 7 (MASK7) is executed.
The mask 6 (MASK6) is a mask with 96 bits at the beginning = 0 and 32 bits at the following = 1.
A mask 7 (MASK7) is a mask with 104 bits at the beginning = 0 and 24 bits at the following = 1.

次のステップS284において、
図34に示すように、レジスタr8,r9,r10,r11とレジスタr12,r13,r14,r15で排他的論理和演算(XOR)を行い、レジスタr12,r13,r14,r15に結果を格納する。
In the next step S284,
As shown in FIG. 34, an exclusive OR operation (XOR) is performed on the registers r8, r9, r10, r11 and the registers r12, r13, r14, r15, and the results are stored in the registers r12, r13, r14, r15.

次のステップS285において、
図35に示すように、レジスタr13,r14,r15に対して,シャッフル命令を行う。
レジスタr13,r14,r15のシャッフル前のデータの並び(=レジスタr0,r1,r2,r3と同じ)を左から、[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15]としたとき、各レジスタのシャッフルは以下の設定とする。
In the next step S285,
As shown in FIG. 35, a shuffle instruction is performed on the registers r13, r14, r15.
[0, 0], [0, 1], [0, 2], [0] from the left to the arrangement of data before shuffling of registers r13, r14, r15 (= same as registers r0, r1, r2, r3) , 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9], [0, 10], [0, 11 ], [0, 12], [0, 13], [0, 14], [0, 15], the shuffle of each register is set as follows.

レジスタr13
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,12],[0,13],[0,14],[0,15],[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11])
Register r13
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 12], [0, 13], [0, 14], [0, 15], [0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9], [0, 10], [0, 11])

レジスタr14
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15],[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7])
Register r14
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15], [0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7])

レジスタr15
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15],[0,0],[0,1],[0,2],[0,3])
Register r15
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15], [0, 0], [0, 1], [0, 2], [0, 3])

次のステップS286において、
図36に示すように、レジスタr13,15をr9,r11にコピーする。
In the next step S286,
As shown in FIG. 36, the registers r13 and r15 are copied to r9 and r11.

次のステップS287において、
図37に示すように、レジスタr13,r14と,r15,r12の左64ビットに対してバイト単位のアンパック処理を実行する。
なお、本開示の処理におけるアンパック処理とは、例えば2つのレジスタに格納されたデータを、上位または下位からブロックを最小単位として選択して、上記2つのレジスタ中の一方のレジスタに交互に格納する処理である。
具体的には、例えば、2つのレジスタから各レジスタに格納された全ブロックの1/2のブロックを各々選択して、1つのレジスタに再格納する処理である。
In the next step S287,
As shown in FIG. 37, unpacking processing in units of bytes is executed on the left 64 bits of the registers r13, r14, r15, r12.
Note that the unpacking process in the process of the present disclosure refers to, for example, selecting data stored in two registers as a minimum unit from the upper or lower order and alternately storing the data in one of the two registers. It is processing.
Specifically, for example, a process of selecting one half of all blocks stored in each register from two registers and re-storing in one register.

図37に示すように、レジスタr13とレジスタr14の左8ブロック(64ビット)をブロック(8ビット)単位で、レジスタr13に左から交互に格納するアンパック処理を実行する。
同様に、レジスタ15とレジスタr12の左8ブロック(64ビット)をブロック(8ビット)単位で、レジスタr15に左から交互に格納するアンパック処理を実行する。
As shown in FIG. 37, an unpacking process is executed in which the left 8 blocks (64 bits) of the register r13 and the register r14 are alternately stored in the register r13 from the left in units of blocks (8 bits).
Similarly, an unpacking process is executed in which the left 8 blocks (64 bits) of the register 15 and the register r12 are alternately stored from the left in the register r15 in units of blocks (8 bits).

次のステップS288において、
図38に示すように、レジスタr9,r14と,r11,r12の右64ビットに対してバイト単位のアンパック処理を実行する。
図38に示すように、レジスタr9とレジスタr14の右8ブロック(64ビット)をブロック(8ビット)単位で、レジスタr9に右から交互に格納するアンパック処理を実行する。
同様に、レジスタ11とレジスタr12の右8ブロック(64ビット)をブロック(8ビット)単位で、レジスタr11に右から交互に格納するアンパック処理を実行する。
In the next step S288,
As shown in FIG. 38, an unpacking process in units of bytes is executed on the right 64 bits of the registers r9 and r14 and r11 and r12.
As shown in FIG. 38, unpack processing is executed in which the right 8 blocks (64 bits) of the register r9 and the register r14 are alternately stored in the register r9 from the right in units of blocks (8 bits).
Similarly, an unpacking process is performed in which the right 8 blocks (64 bits) of the register 11 and the register r12 are alternately stored in the register r11 from the right in units of blocks (8 bits).

次に、ステップS289において、
図39に示すように、レジスタr13,r9をr12,r14にコピーする。
Next, in step S289,
As shown in FIG. 39, the registers r13 and r9 are copied to r12 and r14.

次に、ステップS290において、
図40に示すように、レジスタr12,r15と,レジスタr14,r11の左64ビットに対して8ビットブロック2個単位のワード単位でアンパックする。
図40に示すように、レジスタr12とレジスタr15の左8ブロック(64ビット)を2ブロック(16ビット)のワード単位で、レジスタr12に左から交互に格納するアンパック処理を実行する。
同様に、レジスタr14とレジスタr11の左8ブロック(64ビット)を2ブロック(16ビット)のワード単位で、レジスタr14に左から交互に格納するアンパック処理を実行する。
Next, in step S290,
As shown in FIG. 40, the left 64 bits of the registers r12 and r15 and the registers r14 and r11 are unpacked in units of words of two 8-bit blocks.
As shown in FIG. 40, unpack processing is executed in which the left 8 blocks (64 bits) of the register r12 and the register r15 are alternately stored in the register r12 from the left in units of 2 blocks (16 bits).
Similarly, an unpacking process is executed in which the left 8 blocks (64 bits) of the register r14 and the register r11 are alternately stored from the left in the register r14 in units of 2 blocks (16 bits).

次に、ステップS291において、
図41に示すように、レジスタr13,r15と,レジスタr9,r11の左64ビットに対して8ビットブロック2個単位のワード単位でアンパックする。
図41に示すように、レジスタr13とレジスタr15の右8ブロック(64ビット)を2ブロック(16ビット)のワード単位で、レジスタr13に左から交互に格納するアンパック処理を実行する。
同様に、レジスタr9とレジスタr11の右8ブロック(64ビット)を2ブロック(16ビット)のワード単位で、レジスタr9に左から交互に格納するアンパック処理を実行する。
Next, in step S291,
As shown in FIG. 41, the left 64 bits of the registers r13, r15 and the registers r9, r11 are unpacked in units of words of two 8-bit blocks.
As shown in FIG. 41, unpack processing is executed in which the right 8 blocks (64 bits) of the register r13 and the register r15 are alternately stored from the left in the register r13 in units of 2 blocks (16 bits).
Similarly, unpack processing is executed in which the right 8 blocks (64 bits) of the register r9 and the register r11 are alternately stored in the register r9 from the left in units of 2 blocks (16 bits).

次に、ステップS292において、
図42に示すように、レジスタr13,r14,r9に対して,シャッフル命令を実行する。
レジスタr13,r14,r9のシャッフル前のデータの並び(=レジスタr0,r1,r2,r3と同じ)を左から、[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15]としたとき、各レジスタのシャッフルは以下の設定とする。
Next, in step S292,
As shown in FIG. 42, a shuffle instruction is executed for the registers r13, r14, r9.
[0, 0], [0, 1], [0, 2], [0] from the left to the sequence of data before shuffling of registers r13, r14, r9 (= same as registers r0, r1, r2, r3) , 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9], [0, 10], [0, 11 ], [0, 12], [0, 13], [0, 14], [0, 15], the shuffle of each register is set as follows.

レジスタr13
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,1],[0,2],[0,3],[0,0],[0,5],[0,6],[0,7],[0,4],[0,9],[0,10],[0,11],[0,8],[0,13],[0,14],[0,15],[0,12])
Register r13
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 1], [0, 2], [0, 3], [0, 0], [0, 5], [0, 6], [0, 7], [0, 4], [0, 9], [0, 10], [0, 11], [0, 8], [0, 13], [0, 14], [0, 15], [0, 12])

レジスタ14
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,2],[0,3],[0,0],[0,1],[0,6],[0,7],[0,4],[0,5],[0,10],[0,11],[0,8],[0,9],[0,14],[0,15],[0,12],[0,13])
Register 14
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 2], [0, 3], [0, 0], [0, 1], [0, 6], [0, 7], [0, 4], [0, 5], [0, 10], [0, 11], [0, 8], [0, 9], [0, 14], [0, 15], [0, 12], [0, 13])

レジスタ9
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,3],[0,0],[0,1],[0,2],[0,7],[0,4],[0,5],[0,6],[0,8],[0,11],[0,9],[0,10],[0,15],[0,12],[0,13],[0,14])
Register 9
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 3], [0, 0], [0, 1], [0, 2], [0, 7], [0, 4], [0, 5], [0, 6], [0, 8], [0, 11], [0, 9], [0, 10], [0, 15], [0, 12], [0, 13], [0, 14])

次に、ステップS293において、
図43に示すように、レジスタr12,r13,r14,r9と、マスク8(MASK8),マスク9(MASK9),マスク10(MASK10),マスク11(MASK11)のANDを求め、それぞれのレジスタに格納する。
なお、マスク8(Mask8)は、先行64ビット=0、後続64ビット=1のマスク、
マスク9(MASK9)は、先頭から32ビット単位で0,1,0,1の設定されたマスクである。
マスク10(MASK10)は先頭から16ビット連続0と16ビット連続1が交互に出現するマスク、
マスク11(MASK11)は先頭から8ビット連続0と8ビット連続1が交互に出現するマスクである。
Next, in step S293,
As shown in FIG. 43, the AND of the registers r12, r13, r14, r9 and mask 8 (MASK8), mask 9 (MASK9), mask 10 (MASK10), mask 11 (MASK11) is obtained and stored in the respective registers. To do.
Note that the mask 8 (Mask 8) is a mask with 64 leading bits = 0 and 64 succeeding bits = 1,
The mask 9 (MASK9) is a mask set to 0, 1, 0, 1 in units of 32 bits from the top.
Mask 10 (MASK10) is a mask in which 16-bit continuous 0 and 16-bit continuous 1 appear alternately from the beginning,
A mask 11 (MASK11) is a mask in which 8-bit continuous 0 and 8-bit continuous 1 appear alternately from the top.

次に、ステップS294において、
図44に示すように、レジスタr12,r13,r14,r9のデータに対する非線形変換処理(Sbox)を実行する。
非線形変換処理は、先に図17を参照して説明した処理である。
この非線形変換処理結果を、レジスタr9,r14,r13,r12に格納する。なお、この処理に際して、レジスタr8をテンポラリ領域として利用する。
Next, in step S294,
As shown in FIG. 44, nonlinear conversion processing (Sbox) is performed on the data in the registers r12, r13, r14, r9.
The non-linear conversion process is the process described above with reference to FIG.
The result of the nonlinear conversion process is stored in the registers r9, r14, r13, r12. In this process, the register r8 is used as a temporary area.

この結果得られる図45に示すレジスタr9,r14,r13,r12の左から8ビットずつの16ブロックに格納されたデータが、16ラウンド分の非線型変換処理(Sbox)の結果となる。
なお、このSbox事前計算後,鍵更新処理を実行する前にレジスタr9,r14,r13,r12をr12,r13,r14,r15に格納しておく。
なお、このレジスタの入れ替え処理は、プログラム上では,レジスタを読み替えるだけの処理で実行できる。
The resulting data stored in 16 blocks of 8 bits from the left of the registers r9, r14, r13, r12 shown in FIG. 45 is the result of the non-linear conversion processing (Sbox) for 16 rounds.
After this Sbox pre-calculation, the registers r9, r14, r13, r12 are stored in r12, r13, r14, r15 before executing the key update process.
Note that this register replacement process can be executed by simply replacing the register in the program.

このようにして、図27に示すステップS252のSbox事前計算では、1〜16ラウンドのラウンド鍵生成に適用する非線型変換処理(Sbox)結果を生成し、図27に示すステップS257のSbox事前計算では、17〜32ラウンドのラウンド鍵生成に適用する非線型変換処理(Sbox)結果を生成する。
本実施例では、これらの2回の非線形変換処理(Sbox)のみで、全ラウンドのラウンド鍵生成に必要となる非線型変換処理(Sbox)結果を生成することが可能となる。
In this way, in the Sbox pre-calculation in step S252 shown in FIG. 27, the result of nonlinear conversion processing (Sbox) applied to round key generation of 1 to 16 rounds is generated, and the Sbox pre-calculation in step S257 shown in FIG. Then, a non-linear conversion processing (Sbox) result to be applied to 17 to 32 round key generation is generated.
In the present embodiment, it is possible to generate a non-linear conversion process (Sbox) result necessary for generating round keys for all rounds only by these two non-linear conversion processes (Sbox).

(6−2.ラウンド鍵生成、更新処理について)
次に、図27に示すフローのステップS255と、ステップS260のラウンド鍵生成更新処理の詳細について、図46以下を参照して説明する。
(6-2. About round key generation and update processing)
Next, details of step S255 in the flow shown in FIG. 27 and round key generation / update processing in step S260 will be described with reference to FIG.

図46は、図27に示すフローのステップS255と、ステップS260のラウンド鍵生成更新処理の詳細シーケンスを説明するフローチャートである。
図46に示すフローに従って、図27のフローのステップS255とステップS260において実行するラウンド鍵生成更新処理の詳細シーケンスについて説明する。
FIG. 46 is a flowchart for explaining a detailed sequence of step S255 in the flow shown in FIG. 27 and the round key generation update processing in step S260.
A detailed sequence of the round key generation / updating process executed in steps S255 and S260 of the flow of FIG. 27 will be described according to the flow shown in FIG.

なお、このラウンド鍵の生成、更新開始前のレジスタ設定は、図47に示す通りである。
図47に示すように、レジスタr0,r1,r2,r3,r4,r5,r6,r7にビットスライス表現の鍵が格納されている。
また、レジスタr12,r13,r14,r15に、前述した(6−1.非線形変換(Sbox)の事前計算処理について)において説明した処理によって生成した事前計算した非線形変換(Sbox)処理の結果が格納されているものとする。
Note that the register setting before the generation and update of the round key is as shown in FIG.
As shown in FIG. 47, the keys of bit slice representation are stored in the registers r0, r1, r2, r3, r4, r5, r6, r7.
The registers r12, r13, r14, r15 store the results of the pre-computed non-linear transformation (Sbox) processing generated by the processing described in (6-1. Pre-computation processing of non-linear transformation (Sbox)) described above. It is assumed that

まず、図46のステップS301において、
図48に示すように、非線形変換(Sbox)処理の結果が格納されているレジスタr12,r13,r14,r15をレジスタr8,r9,r10,r11にコピーし、マスク5(MASK5)とAND処理を実行する。
First, in step S301 of FIG.
As shown in FIG. 48, registers r12, r13, r14, r15 storing the result of nonlinear transformation (Sbox) processing are copied to registers r8, r9, r10, r11, and mask 5 (MASK5) and AND processing are performed. Run.

なお、ここでは、一例として、1ラウンド目のSboxの値を使用したラウンド鍵生成、更新処理例について説明する。
事前計算した非線型変換処理(Sbox)の値は、レジスタr12,r13,r14,r15の左8ビットを使用する。
Here, as an example, a round key generation / update processing example using the value of the Sbox for the first round will be described.
The pre-calculated non-linear conversion processing (Sbox) value uses the left 8 bits of the registers r12, r13, r14, r15.

次に、ステップS302において、
図49に示すように、レジスタr12,r13,r14,r15を左8ビット論理シフトする。
Next, in step S302,
As shown in FIG. 49, the registers r12, r13, r14, r15 are logically shifted to the left by 8 bits.

次に、ステップS303において、
図50に示すように、レジスタr5,r6,r7を右8ビット論理シフトし,r4とMASK0,r5,r6,r7とMASK1でANDを取る。
この処理は、図13のフローのステップS225の処理と同様の処理である。
Next, in step S303,
As shown in FIG. 50, the registers r5, r6, and r7 are logically shifted to the right by 8 bits, and AND is performed between r4 and MASK0, r5, r6, r7, and MASK1.
This process is the same as the process of step S225 in the flow of FIG.

レジスタr5,r6,r7の格納データを右8ビットシフトし、
レジスタr4と予め既定したデータからなるマスク0(MASK0)とのAND処理、
レジスタr5,r6,r7と予め既定したデータからなるマスク1(MASK1)とのAND処理を行う。
なお、マスクの値はレジスタに保持しておく必要はない。
The data stored in the registers r5, r6, r7 is shifted 8 bits to the right,
AND processing of register r4 and mask 0 (MASK0) consisting of predetermined data;
An AND process is performed on the registers r5, r6, r7 and a mask 1 (MASK1) made of predetermined data.
Note that the mask value need not be stored in the register.

マスク0(MASK0)は、図50に示すように、8ビットデータ単位の2〜4番目のブロックのビットのみを1、その他を0としたマスクである。
マスク1(MASK1)は、図50に示すように、8ビットデータ単位の2〜5番目のブロックのビットのみを1、その他を0としたマスクである。
このマスクデータとのAND処理によって、図50に示すように、レジスタr4〜r7の先頭8ビットデータは0に書き換えられる。
As shown in FIG. 50, the mask 0 (MASK0) is a mask in which only the bits of the 2nd to 4th blocks of the 8-bit data unit are set to 1 and the others are set to 0.
As shown in FIG. 50, the mask 1 (MASK1) is a mask in which only the bits of the second to fifth blocks of 8-bit data units are set to 1 and the others are set to 0.
By the AND processing with the mask data, the leading 8-bit data of the registers r4 to r7 is rewritten to 0 as shown in FIG.

次に、ステップS304において、
図51に示すように、レジスタr4,r5,r6,r7とレジスタr11,r8,r9,r10の排他的論理和演算(XOR)を実行して、出力をレジスタr4,r5,r6,r7に格納する。
この処理は、図13のフローのステップS226の処理と同様の処理である。
Next, in step S304,
As shown in FIG. 51, the exclusive OR operation (XOR) of the registers r4, r5, r6, r7 and the registers r11, r8, r9, r10 is executed, and the output is stored in the registers r4, r5, r6, r7. To do.
This process is the same as the process of step S226 in the flow of FIG.

これらの排他的論理和演算(XOR)処理の結果、レジスタr4,r5,r6,r7の先頭8ビットには、レジスタr11,r8,r9,r10の先頭8ビットデータであるステップS223の非線形変換処理(Sbox)の演算結果が格納される。   As a result of these exclusive OR operations (XOR) processing, the first 8 bits of the registers r4, r5, r6, r7 are replaced with the non-linear transformation processing of step S223 which is the first 8 bits data of the registers r11, r8, r9, r10. The calculation result of (Sbox) is stored.

次に、ステップS305において、
図52に示すように、レジスタr0,r1,r2,r3に対してシャッフル命令を実行し,シャッフル結果をレジスタr0,r1,r2,r3に格納する。
シャッフル処理の処理前と処理後のレジスタr0,r1,r2,r3の格納データを図52に示す。
この処理は、図13のフローのステップS227の処理と同様の処理である。
Next, in step S305,
As shown in FIG. 52, a shuffle instruction is executed for the registers r0, r1, r2, and r3, and the shuffle result is stored in the registers r0, r1, r2, and r3.
FIG. 52 shows data stored in the registers r0, r1, r2, and r3 before and after the shuffle process.
This process is the same as the process of step S227 in the flow of FIG.

このシャッフル処理におけるデータ並び替えの順序はレジスタr0とレジスタr1,r2,r3で異なる。各レジスタの8ビット単位のデータを、先頭から、
[0,0,[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15]
とする。
The order of data rearrangement in the shuffle process is different between the register r0 and the registers r1, r2, and r3. From the top of the 8-bit unit data of each register,
[0,0, [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]
And

ステップS305のシャッフル処理は、レジスタr0に対しては、以下の設定で実行する。
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,12],[0,13],[0,14],[0,15],[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11])
The shuffle process in step S305 is executed with the following settings for the register r0.
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 12], [0, 13], [0, 14], [0, 15], [0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9], [0, 10], [0, 11])

また、レジスタr1,r2,r3に対しては、以下の設定で実行する。
([0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15])→([0,11],[0,12],[0,13],[0,14],[0,15],[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10])
Further, the following settings are executed for the registers r1, r2, and r3.
([0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [ 0, 8], [0, 9], [0, 10], [0, 11], [0, 12], [0, 13], [0, 14], [0, 15]) → ([ 0, 11], [0, 12], [0, 13], [0, 14], [0, 15], [0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9], [0, 10])

次のステップS306では、
図53に示すように、レジスタr0,r1,r2,r3のデータをレジスタr8,r9,r10,r11にコピーし、さらに、
レジスタr8と、マスク2(MASK2)のAND処理、
レジスタr9,r10,r11と、マスク3(MASK3)のAND処理、
これらのAND処理を実行して、その結果をレジスタr8,r9,r10,r11に格納する。
この処理は、図13のフローのステップS228の処理と同様の処理である。
In the next step S306,
As shown in FIG. 53, the data in the registers r0, r1, r2, r3 are copied to the registers r8, r9, r10, r11,
AND processing of register r8 and mask 2 (MASK2),
AND processing of registers r9, r10, r11 and mask 3 (MASK3),
These AND processes are executed, and the results are stored in the registers r8, r9, r10, r11.
This process is the same as the process of step S228 in the flow of FIG.

なお、マスク2(MASK2)は、図53に示すように、先頭32ビット=0、その後96ビット=1のマスクデータである。
マスク3(MASK3)は、図53に示すように、先頭40ビット=0、その後88ビット=1のマスクデータである。
As shown in FIG. 53, mask 2 (MASK2) is mask data of the first 32 bits = 0 and then 96 bits = 1.
As shown in FIG. 53, the mask 3 (MASK3) is mask data of the first 40 bits = 0 and then 88 bits = 1.

この処理の結果、レジスタr8の先頭32ビットは0に設定され、レジスタr9,r10,r11の先頭40ビットは0に設定される。   As a result of this processing, the first 32 bits of the register r8 are set to 0, and the first 40 bits of the registers r9, r10, r11 are set to 0.

次のステップS307では、
図54に示すように、レジスタr4,r5,r6,r7とレジスタr8,r9,r10,r11の排他的論理和演算(XOR)を実行して,結果をr4,r5,r6,r7に格納する。
この処理は、図13のフローのステップS229の処理と同様の処理である。
In the next step S307,
As shown in FIG. 54, the exclusive OR operation (XOR) of the registers r4, r5, r6, r7 and the registers r8, r9, r10, r11 is executed, and the result is stored in r4, r5, r6, r7. .
This process is the same as the process of step S229 in the flow of FIG.

次のステップS308では、
図55に示すように、レジスタr5,r6,r7,r4の右8ビット,r1の左8ビットに対して,予め設定したカウント値であるラウンドカウンタ(roundcounter)の値との排他的論理和演算(XOR)を行う。
この処理は、図13のフローのステップS230の処理と同様の処理である。
ラウンドカウンタは、
ラウンド数:0〜31に応じた2進数表現としての00000〜11111の各カウント値に設定する。
In the next step S308,
As shown in FIG. 55, an exclusive OR operation with a round counter value that is a preset count value is applied to the right 8 bits of the registers r5, r6, r7, and r4 and the left 8 bits of r1. (XOR) is performed.
This process is the same as the process in step S230 of the flow of FIG.
Round counter
Number of rounds: Set to each count value of 00000 to 11111 as a binary expression according to 0 to 31.

例えばラウンド数=13のラウンド鍵を生成する場合は、ラウンドカウンタは、2進数表現としての13を示す01101の各カウント値に設定する。
このカウント値01101に対して、レジスタr5,r6,r7,r4の右8ビット,r1の左8ビットとのXOR演算を行う。
なお、ラウンドカウンタのカウント値00000〜11111とのXOR演算の順番は、各レジスタの格納値の元のデータの上位ビットからの順番とする。図24に示す例では、値の大きい順番であり、38,37,36,35,34の順番とする。
すなわちレジスタ順としては、r5,r6,r7,r4,r1となる。
For example, when generating a round key with round number = 13, the round counter is set to each count value of 01101 indicating 13 as a binary number expression.
An XOR operation is performed on the count value 01101 with the right 8 bits of the registers r5, r6, r7, r4 and the left 8 bits of r1.
Note that the order of the XOR operation with the count values 00000 to 11111 of the round counter is the order from the upper bit of the original data of the stored value of each register. In the example shown in FIG. 24, the values are in the descending order, ie, 38, 37, 36, 35, 34.
That is, the register order is r5, r6, r7, r4, r1.

図55に示すように、
上位から、
カウント値01101の第1ビット目の0に対して、レジスタr5の右8ビットデータ(図55に示すレジスタr5の[38])
カウント値01101の第2ビット目の1に対して、レジスタr6の右8ビットデータ(図55に示すレジスタr6の[37])
カウント値01101の第3ビット目の1に対して、レジスタr7の右8ビットデータ(図55に示すレジスタr7の[36])
カウント値01101の第4ビット目の0に対して、レジスタr4の右8ビットデータ(図55に示すレジスタr6の[35])
カウント値01101の第5ビット目の1に対して、レジスタr1の左8ビットデータ(図55に示すレジスタr1の[34])
これらの値同士のXOR演算を実行して、それぞれのデータを更新する。
As shown in FIG.
From the top
The right 8-bit data of register r5 with respect to 0 of the first bit of count value 01101 ([38] of register r5 shown in FIG. 55)
The right 8-bit data of the register r6 ([37] of the register r6 shown in FIG. 55) with respect to 1 of the second bit of the count value 01101
The right 8-bit data of the register r7 ([36] of the register r7 shown in FIG. 55) for 1 of the third bit of the count value 01101
The right 8-bit data of register r4 with respect to 0 of the fourth bit of count value 01101 ([35] of register r6 shown in FIG. 55)
The left 8-bit data of the register r1 ([34] of the register r1 shown in FIG. 55) for 1 of the fifth bit of the count value 01101
An XOR operation between these values is executed to update the respective data.

なお、この排他的論理和(XOR)演算には、図55に示すようなマスク4(MASK4)、マスク5(MASK5)を適用することが可能である。
マスク4(MASK4)は先行120ビット=0、末尾8ビット=1に設定されたマスクデータである。
マスク5(MASK5)は、先行8ビット=1、末尾120ビット=0に設定されたマスクデータである。
レジスタr5,r6,r7,r4とのXORにMASK4,レジスタr1とのXORにはMASK5を用いる。
Note that mask 4 (MASK4) and mask 5 (MASK5) as shown in FIG. 55 can be applied to the exclusive OR (XOR) operation.
Mask 4 (MASK4) is mask data set with leading 120 bits = 0 and trailing 8 bits = 1.
Mask 5 (MASK5) is mask data in which the preceding 8 bits = 1 and the last 120 bits = 0.
MASK4 is used for XOR with the registers r5, r6, r7, r4, and MASK5 is used for XOR with the register r1.

なお、このステップS230の排他的論理和演算(XOR)は、ラウンドカウンタ(roundcounter)=00000〜11111の構成5ビット中、1が設定されたビットに対応するレジスタを対象として実行し、0の設定されたビットに対応するレジスタは処理を行わない設定としても同様の結果となる。   The exclusive OR operation (XOR) in step S230 is executed for the register corresponding to the bit in which 1 is set in the 5 bits of the round counter (roundcounter) = 00000 to 11111, and is set to 0. The same result is obtained even if the register corresponding to the set bit is set not to be processed.

すなわち、上述した、元のデータの上位から並べたレジスタ順:r5,r6,r7,r4,r1に対して、例えばラアンドカウンタの値が13=01101の場合は、ラウンドカウンタの第2,3,5ビットのみが1であるので、レジスタr5,r6,r7,r4,r1に対して、
レジスタr6,r7とマスク4(MASK4)とのXOR演算、
レジスタr1と、マスク5(MASK5)とのXOR演算、
これらのみを実行する構成としてもよい。
That is, for the register order arranged from the top of the original data: r5, r6, r7, r4, r1, for example, when the value of the run and counter is 13 = 01011, the second and third round counters , 5 bits are 1, so for registers r5, r6, r7, r4, r1,
XOR operation between the registers r6 and r7 and the mask 4 (MASK4),
XOR operation of register r1 and mask 5 (MASK5),
It is good also as a structure which performs only these.

このステップS308の結果として得られるレジスタの、
レジスタr5,r6,r7,r4,r1,r2,r3,r0の格納データを次のラウンド鍵生成用のブロックとする。
このレジスタr5,r6,r7,r4,r1,r2,r3,r0に格納されたブロックから64ブロックを次のラウンドのラウンド鍵として設定する。
以下、この更新されたレジスタ格納ブロックを適用して、図46のフローに従った処理を繰り返して32個のラウンド鍵を生成する。
Of the register obtained as a result of this step S308,
The data stored in the registers r5, r6, r7, r4, r1, r2, r3, r0 is used as the next round key generation block.
64 blocks from the blocks stored in the registers r5, r6, r7, r4, r1, r2, r3, r0 are set as round keys for the next round.
Hereinafter, the updated register storage block is applied, and the process according to the flow of FIG. 46 is repeated to generate 32 round keys.

このように、(鍵スケジュール処理例2)では、鍵スケジュール処理例1において必要となっていた4回の非線形変換処理(Sbox)の実行回数を2回に少なくすることができる。
この(鍵スケジュール処理例2)の処理数の削減効果について考察する。
Thus, in (Key Schedule Processing Example 2), the number of executions of the four non-linear transformation processes (Sboxes) required in Key Schedule Processing Example 1 can be reduced to two.
The effect of reducing the number of processes in this (key schedule process example 2) will be considered.

先に説明した2つの鍵スケジュール処理、すなわち、
(A)鍵スケジュール処理例1(図12、図13のフローに従った処理)
(B)鍵スケジュール処理例2(図27〜図29、図46のローに従った処理)
これらの2つの鍵スケジュール処理の処理ステップ数を比較すると、以下の通りとなる。
The two key schedule processes described above:
(A) Key schedule processing example 1 (processing according to the flow of FIGS. 12 and 13)
(B) Key schedule processing example 2 (processing according to the rows in FIGS. 27 to 29 and FIG. 46)
A comparison of the number of processing steps of these two key schedule processes is as follows.

(A)鍵スケジュール処理例1
Sbox事前計算なしの鍵更新処理に要する命令数は、以下の通りである。
鍵更新処理:1847(=57×31+80)
(B)鍵スケジュール処理例2
Sbox事前計算ありの鍵更新処理に要する命令数は、以下の通りである。
Sbox事前計算+鍵更新処理:1411
(Sbox事前計算:132(=66×2),鍵更新処理:1289(39×31+80))
このように、(B)鍵スケジュール処理例2は、(A)鍵スケジュール処理例1に比較して処理ステップの数を削減でき、より高速な処理が実現される。
(A) Key schedule processing example 1
The number of instructions required for the key update process without Sbox pre-calculation is as follows.
Key update processing: 1847 (= 57 × 31 + 80)
(B) Key schedule processing example 2
The number of instructions required for the key update process with Sbox pre-calculation is as follows.
Sbox pre-calculation + key update processing: 1411
(Sbox pre-calculation: 132 (= 66 × 2), key update processing: 1289 (39 × 31 + 80))
In this way, (B) Key Schedule Processing Example 2 can reduce the number of processing steps compared to (A) Key Schedule Processing Example 1, and higher-speed processing is realized.

[7.暗号処理について]
次に、図7に示す暗号処理部110の実行するステップS122の処理、すなわち、暗号処理の詳細について説明する。
ステップS122の暗号処理(Data Processing)は、ステップS111のデータ変換処理(Data Conversion)において平文データに基づいて生成したビットスライス表現データに対して、ラウンド鍵を適用した暗号処理を実行するステップである。
[7. About cryptographic processing]
Next, the details of the process of step S122 executed by the encryption processing unit 110 shown in FIG. 7, that is, the encryption process will be described.
The encryption process (Data Processing) in step S122 is a step of executing an encryption process using a round key for the bit slice expression data generated based on the plain text data in the data conversion process (Data Conversion) in step S111. .

ビットスライス処理によって生成したビットスライス表現データを構成するブロックを単位としたラウンド鍵との加算(XOR)処理、線形変換処理、非線形変換処理など、暗号アルゴリズムに従った処理をソフトウェア(プログラム)に従って実行する。
図57以下を参照して、この暗号処理の詳細について説明する。
Processing according to the cryptographic algorithm, such as addition (XOR) processing with a round key (XOR) processing, linear conversion processing, and nonlinear conversion processing in units of blocks constituting the bit slice expression data generated by the bit slice processing, is executed according to software (program) To do.
Details of this encryption processing will be described with reference to FIG.

図57に示すフローチャートは、図7に示す暗号処理部110の実行するステップS122の処理、すなわち、暗号処理の詳細シーケンスを説明するフローチャートである。   The flowchart shown in FIG. 57 is a flowchart for explaining the detailed sequence of the process of step S122 executed by the encryption processing unit 110 shown in FIG. 7, that is, the encryption process.

ステップS401においてデータ入力および初期設定を行う。
具体的には、レジスタに格納した暗号化処理対象となる平文データのビットスライス表現データを入力する。
これは、図7のステップS121のデータ変換処理において生成したデータであり、図9を参照して説明した平文データ82の変換処理によって生成したビットスライス表現データある。すなわち、図9に示すビットスライス表現ブロック[0,0]〜[3,15]の64ブロックを入力する。
図9に示すビットスライス表現ブロック[0,0]〜[3,15]は、本実施例では、暗号処理対象となる8つの平文の同一ビット目を格納したブロックであり、各々8ビットデータである。
In step S401, data input and initial setting are performed.
Specifically, bit slice expression data of plaintext data to be encrypted and stored in the register is input.
This is data generated in the data conversion process in step S121 of FIG. 7, and is bit slice expression data generated by the conversion process of the plain text data 82 described with reference to FIG. That is, 64 blocks of bit slice expression blocks [0, 0] to [3, 15] shown in FIG. 9 are input.
In this embodiment, the bit slice expression blocks [0, 0] to [3, 15] shown in FIG. 9 are blocks storing the same bit of eight plaintexts to be encrypted, each of which is 8-bit data. is there.

ステップS401では、このビットスライス表現データを入力し、さらに、暗号処理のラウンド数のカウント値に相当するラウンド番号Rn=0の初期設定と、ラウンド鍵の格納されたメモリ領域を示す鍵ポインタ(pt)の初期設定を行う。鍵ポインタ(pt)はメモリ領域に書き込まれたラウンド鍵のメモリアドレスを表す。ラウンド番号Rnの初期値を0として,各ラウンド終了後にRnをインクリメントする。   In step S401, this bit slice expression data is input, and further, an initial setting of a round number Rn = 0 corresponding to the count value of the number of rounds of encryption processing, and a key pointer (pt indicating the memory area in which the round key is stored) ). The key pointer (pt) represents the memory address of the round key written in the memory area. The initial value of the round number Rn is set to 0, and Rn is incremented after each round.

ステップS402〜S404は、暗号処理の各ラウンド単位の処理であり、
ステップS402:ラウンド鍵加算、すなわちラウンド鍵と入力平文データ(ビットスライス表現データ)との排他的論理和演算処理(addRoundKey)、
ステップS403:ラウンド鍵加算結果に対する非線形変換処理(SboxLayer)、
ステップS404:非線形変換結果に対する線型変換処理(pLayer)、
これらの処理を実行する。
なお、これらの処理の詳細については後述する。
Steps S402 to S404 are processes for each round of encryption processing.
Step S402: Round key addition, that is, exclusive OR operation processing (addRoundKey) of the round key and input plaintext data (bit slice expression data),
Step S403: Nonlinear transformation processing (SboxLayer) for the round key addition result,
Step S404: Linear conversion processing (pLayer) for the nonlinear conversion result;
These processes are executed.
Details of these processes will be described later.

ステップS405では、処理ラウンドが最終ラウンドであるRn=31に達したか否かを確認する。
Rn=31未満である場合は、次ラウンド処理として、ステップS402〜S404の処理を実行する。
In step S405, it is confirmed whether or not the processing round has reached the final round Rn = 31.
When Rn is less than 31, the processes of steps S402 to S404 are executed as the next round process.

ステップS405において、処理ラウンドが最終ラウンドであるRn=31に達したと判定した場合は、ステップS406において暗号文を出力する。
この出力暗号文に対して、図7に示すステップS23のデータ逆変換処理が実行され、最終的な暗号文90として出力される。
If it is determined in step S405 that the processing round has reached the final round Rn = 31, the ciphertext is output in step S406.
The data reverse conversion process in step S23 shown in FIG. 7 is performed on the output ciphertext, and the final ciphertext 90 is output.

図7に示す暗号処理部110の実行するステップS122の暗号処理ステップを例えばハードウェア構成で実行する場合の構成例を図58に示す。
図58は、2ラウンド分の、
(a)ラウンド鍵加算(addRoundKey)、
(b)非線形変換(SboxLayer)、
(c)線形変換(pLayer)
これらの3処理を示している。
この3種類の処理からなるラウンド演算を複数ラウンド繰り返し実行して、暗号文を出力する。
FIG. 58 shows a configuration example when the cryptographic processing step of step S122 executed by the cryptographic processing unit 110 shown in FIG. 7 is executed with a hardware configuration, for example.
58 shows two rounds.
(A) Round key addition (addRoundKey),
(B) Non-linear transformation (SboxLayer),
(C) Linear transformation (pLayer)
These three processes are shown.
A round operation consisting of these three types of processing is repeatedly executed for a plurality of rounds to output a ciphertext.

本開示の装置においては、例えば図58に示すようなアンゴウショリ専用のハードウェアを適用することなく、レジスタに格納されたビットスライス表現データに対する演算処理や、レジスタ格納データのシフト処理等によってラウンド演算、すなわち、図57のフローに示すステップS402〜S404の各処理、
(a)ラウンド鍵加算(addRoundKey)、
(b)非線形変換(SboxLayer)、
(c)線形変換(pLayer)
これらの3処理を実行する。
In the apparatus of the present disclosure, for example, without applying hardware dedicated to an anchovy as shown in FIG. 58, a round operation is performed by an arithmetic process on the bit slice expression data stored in the register, a shift process of the register stored data, That is, each process of steps S402 to S404 shown in the flow of FIG.
(A) Round key addition (addRoundKey),
(B) Non-linear transformation (SboxLayer),
(C) Linear transformation (pLayer)
These three processes are executed.

以下、本開示の装置で実行するこれらの各処理の詳細について説明する。
まず、ステップS402の鍵加算処理(addRoundKey)についして、図59を参照して説明する。
Hereinafter, details of each of these processes executed by the apparatus of the present disclosure will be described.
First, the key addition process (addRoundKey) in step S402 will be described with reference to FIG.

このステップS402のラウンド鍵加算は、ラウンド鍵と入力平文データ(ビットスライス表現データ)との排他的論理和演算処理(addRoundKey)である。
ラウンド鍵は、図7に示す暗号鍵81を入力として、暗号処理部110におけるステップS111の鍵変換処理と、ステップS112の鍵スケジュール処理によって生成されたラウンド鍵である。
このラウンド鍵生成処理は、前述の[4.鍵変換処理とデータ変換処理について]、[5.鍵スケジュール処理について(鍵スケジュール処理例1)]、[6.鍵スケジュール処理について(鍵スケジュール処理例2)]、これらの項目において説明した処理である。
ラウンド鍵は、メモリに格納されており、鍵ボイント(pt)の示す領域からラウンド鍵を取得する。
The round key addition in step S402 is an exclusive OR operation process (addRoundKey) of the round key and the input plaintext data (bit slice expression data).
The round key is a round key generated by the key conversion process in step S111 and the key schedule process in step S112 in the encryption processing unit 110 with the encryption key 81 shown in FIG. 7 as an input.
This round key generation process is performed in the above-mentioned [4. Key conversion process and data conversion process], [5. Key schedule processing (key schedule processing example 1)], [6. The key schedule process (key schedule process example 2)] is the process described in these items.
The round key is stored in the memory, and the round key is acquired from the area indicated by the key point (pt).

暗号処理対象となる平文データは、前述の[4.鍵変換処理とデータ変換処理について]において説明したように、図7に示す平文データ82のビットスライス表現データである。すなわち、図9を参照して説明した処理によってレジスタに格納されたビットスライス表現データである。
なお、本実施例では、図9に示すように(a1)〜(a8)の8つの64ビット平文に基づいて生成されたビットスライス表現データに対する暗号処理を行うものとして説明する。
The plaintext data to be encrypted is the above described [4. As described in [About Key Conversion Process and Data Conversion Process], it is bit slice expression data of the plaintext data 82 shown in FIG. That is, the bit slice expression data stored in the register by the processing described with reference to FIG.
In this embodiment, as shown in FIG. 9, description will be made assuming that encryption processing is performed on bit slice expression data generated based on eight 64-bit plaintexts (a1) to (a8).

図59には、4つの128ビットレジスタr0〜r3に格納されたビットスライス表現データを示している。図59のレジスタ格納データである[i,j]は、図9に示す8つの平文(a1)〜(a8)の同一ビットの集合からなるビットスライス表現ブロックである。
8つの平文(a1)〜(a8)の、
第1ビット目の集合からなるビットスライス表現ブロックが[0,0]
第2ビット目の集合からなるビットスライス表現ブロックが[1,0]
第3ビット目の集合からなるビットスライス表現ブロックが[2,0]
第4ビット目の集合からなるビットスライス表現ブロックが[3,0]
第5ビット目の集合からなるビットスライス表現ブロックが[0,1]
・・
第63ビット目の集合からなるビットスライス表現ブロックが[2,15]
第64ビット目の集合からなるビットスライス表現ブロックが[3,15]
であり、これらの8ビットからなるビットスライス表現ブロック[0,0]〜[3,15]が4つのレジスタr0〜r3に分散して格納されている。
FIG. 59 shows bit slice expression data stored in four 128-bit registers r0 to r3. [I, j], which is the data stored in the register of FIG. 59, is a bit slice expression block including a set of the same bits of the eight plaintexts (a1) to (a8) shown in FIG.
Of the eight plaintexts (a1) to (a8),
The bit slice representation block consisting of the first bit set is [0, 0].
The bit slice representation block consisting of the second bit set is [1, 0].
The bit slice representation block consisting of the third bit set is [2, 0].
The bit slice representation block consisting of the fourth bit set is [3, 0].
The bit slice representation block consisting of the fifth bit set is [0, 1].
・ ・
The bit slice expression block consisting of the set of the 63rd bit is [2,15].
The bit slice representation block consisting of the 64th bit set is [3, 15].
These 8-bit bit slice expression blocks [0, 0] to [3, 15] are distributed and stored in four registers r0 to r3.

図57のフローにおけるステップS402の鍵加算処理は、図59に示す4本の128ビットレジスタr0〜r3の格納データとメモリに各機能されたラウンド鍵との排他的論理和演算(XOR)処理として実行される。
排他的論理和演算(XOR)処理を実行する平文とラウンド鍵は、いずれも、8ビットのビットスライス表現ブロック64ブロック分のデータである。
各レジスタ(=128ビットレジスタ(16ブロック分))単位で、ポインタ(pt)によって指定されるメモリ位置に格納されたラウンド鍵(128ビット(16ブロック))との排他的論理和演算(XOR)処理を実行する。
The key addition process of step S402 in the flow of FIG. 57 is an exclusive OR operation (XOR) process of the stored data of the four 128-bit registers r0 to r3 shown in FIG. 59 and the round key functioned in each memory. Executed.
Both the plaintext and the round key that execute the exclusive OR operation (XOR) processing are data of 64 blocks of 8-bit bit slice expression blocks.
Exclusive OR operation (XOR) with the round key (128 bits (16 blocks)) stored in the memory location specified by the pointer (pt) in units of each register (= 128 bit registers (16 blocks)) Execute the process.

ラウンド鍵は鍵ポインタ(pt)で指示された領域にあるデータを用いる。
1つのレジスタ(128ビット)の排他的論理和演算(XOR)毎に、鍵ポインタ(pt)を16ブロック(128ビット)ずつ進めながら,4本のレジスタr0〜r3に格納された暗号化対象となる平文データのビットスライス表現データとの排他的論理和演算(XOR)を実行して、演算結果をレジスタに格納する。
The round key uses data in the area designated by the key pointer (pt).
For each exclusive OR operation (XOR) of one register (128 bits), the key pointer (pt) is advanced by 16 blocks (128 bits) and the encryption target stored in the four registers r0 to r3 An exclusive OR operation (XOR) with the bit slice expression data of the plaintext data is executed, and the operation result is stored in the register.

次に、図57に示すフローチャートのステップS403の処理について説明する。
ステップS403は、ステップS402におけるラウンド鍵加算結果に対する非線形変換処理(SboxLayer)である。
Next, the process of step S403 in the flowchart shown in FIG. 57 will be described.
Step S403 is a non-linear transformation process (SboxLayer) for the round key addition result in step S402.

この非線形変換処理(SboxLayer)は、ラウンド鍵加算結果を格納した128ビットレジスタ4本とテンポラリのレジスタ1本を利用して、レジスタ間の演算処理として実行する。
具体的には、図60に示すように、レジスタ間の演算処理として実行する。
演算処理によって実現される。
図17に示すレジスタ:x3,x2,x1,x0,x4は、
レジスタx3〜x0がラウンド鍵加算結果を格納した128ビットレジスタ4本、
レジスタx4が、テンポラリ領域として利用するレジスタに相当する。
この非線形変換処理(SboxLayer)の結果は、4本の128ビットレジスタ、例えばレジスタr0〜r4に格納する。
This non-linear conversion process (SboxLayer) is executed as an arithmetic process between registers using four 128-bit registers storing a round key addition result and one temporary register.
Specifically, as shown in FIG. 60, it is executed as an arithmetic process between registers.
Realized by arithmetic processing.
The registers shown in FIG. 17: x3, x2, x1, x0, x4 are
Four 128-bit registers in which the registers x3 to x0 store the round key addition result,
The register x4 corresponds to a register used as a temporary area.
The result of this non-linear transformation process (SboxLayer) is stored in four 128-bit registers, for example, registers r0 to r4.

次に、図57に示すフローチャートのステップS404の処理について説明する。
ステップS404の処理は、ステップS403の非線形変換結果に対する線型変換処理(pLayer)である。
Next, the process of step S404 in the flowchart shown in FIG. 57 will be described.
The process of step S404 is a linear conversion process (pLayer) for the nonlinear conversion result of step S403.

この線型変換処理(pLayer)の詳細シーケンスを説明するフローチャートを図61に示す。
図61に示すフローチャートの各ステップの処理について、順次、説明する。
なお、型変換処理(pLayer)処理対象となるデータは、ステップS403の非線形変換結果であり、このステップS403の非線形変換結果が図62に示すように、4本の128ビットレジスタr0〜r3に格納されている。
FIG. 61 shows a flowchart for explaining the detailed sequence of this linear conversion process (pLayer).
The processing of each step in the flowchart shown in FIG. 61 will be described sequentially.
Note that the data to be subjected to the type conversion process (pLayer) is the non-linear conversion result in step S403, and the non-linear conversion result in step S403 is stored in four 128-bit registers r0 to r3 as shown in FIG. Has been.

まず、ステップS451において、
図63に示すように、レジスタr0,r1,r2,r3に対して,シャッフル命令を実行し,結果をr0,r1,r2,r3に格納する。
First, in step S451,
As shown in FIG. 63, a shuffle instruction is executed for the registers r0, r1, r2, and r3, and the result is stored in r0, r1, r2, and r3.

レジスタr0,r1,r2,r3のシャッフル前のデータの並び(=レジスタr0,r1,r2,r3と同じ)を左から、[i,0],[i,1],[i,2],[i,3],[i,4],[i,5],[i,6],[i,7],[i,8],[i,9],[i,10],[i,11],[i,12],[i,13],[i,14],[i,15]、
ただし、i={0,1,2,3}
としたとき、各レジスタのシャッフルは以下の設定とする。
From the left, the sequence of data before shuffling of registers r0, r1, r2, r3 (= same as registers r0, r1, r2, r3) is [i, 0], [i, 1], [i, 2], [I, 3], [i, 4], [i, 5], [i, 6], [i, 7], [i, 8], [i, 9], [i, 10], [i , 11], [i, 12], [i, 13], [i, 14], [i, 15],
However, i = {0, 1, 2, 3}
The shuffle of each register is set as follows.

レジスタri
i={0,1,2,3}.
([i,0],[i,1],[i,2],[i,3],[i,4],[i,5],[i,6],[i,7],[i,8],[i,9],[i,10],[i,11],[i,12],[i,13],[i,14],[i,15])→([i,0],[i,4],[i,8],[i,12],[i,1],[i,5],[i,9],[i,13],[i,2],[i,6],[i,10],[i,14],[i,3],[i,7],[i,11],[i,15])
Register ri
i = {0, 1, 2, 3}.
([I, 0], [i, 1], [i, 2], [i, 3], [i, 4], [i, 5], [i, 6], [i, 7], [ i, 8], [i, 9], [i, 10], [i, 11], [i, 12], [i, 13], [i, 14], [i, 15]) → ([ i, 0], [i, 4], [i, 8], [i, 12], [i, 1], [i, 5], [i, 9], [i, 13], [i, 2], [i, 6], [i, 10], [i, 14], [i, 3], [i, 7], [i, 11], [i, 15])

次に、ステップS452において、
図64に示すように、レジスタr0,r2をレジスタr4,r5にコピーする。
Next, in step S452,
As shown in FIG. 64, the registers r0 and r2 are copied to the registers r4 and r5.

次に、ステップS453において、
図65に示すように、レジスタr0,r1とレジスタr2,r3の左64ビットに対して,ダブルワード単位でアンパック命令を実行する。
図65に示すように、レジスタr0とレジスタr2の左8ブロック(64ビット)をダブルワード(32ビット(4ブロック))単位で、レジスタr0に左から交互に格納するアンパック処理を実行する。
同様に、レジスタr2とレジスタr3の左8ブロック(64ビット)をダブルワード(32ビット(4ブロック))単位で、レジスタr2に左から交互に格納するアンパック処理を実行する。
Next, in step S453,
As shown in FIG. 65, the unpack instruction is executed in double word units for the left 64 bits of the registers r0 and r1 and the registers r2 and r3.
As shown in FIG. 65, unpack processing is executed in which the left 8 blocks (64 bits) of the registers r0 and r2 are alternately stored in the register r0 from the left in units of double words (32 bits (4 blocks)).
Similarly, unpack processing is executed in which the left 8 blocks (64 bits) of the registers r2 and r3 are alternately stored in the register r2 from the left in units of double words (32 bits (4 blocks)).

次に、ステップS454において、
図66に示すように、レジスタr4,r1とレジスタr5,r3の右64ビットに対して,ダブルワード単位でアンパック命令を実行する。
図66に示すように、レジスタr4とレジスタr1の右8ブロック(64ビット)をダブルワード(32ビット(4ブロック))単位で、レジスタr4に左から交互に格納するアンパック処理を実行する。
同様に、レジスタ5とレジスタr3の右8ブロック(64ビット)をダブルワード(32ビット(4ブロック))単位で、レジスタr5に左から交互に格納するアンパック処理を実行する。
Next, in step S454,
As shown in FIG. 66, the unpack instruction is executed in double word units for the right 64 bits of the registers r4 and r1 and the registers r5 and r3.
As shown in FIG. 66, an unpacking process is executed in which the right 8 blocks (64 bits) of the register r4 and the register r1 are alternately stored from the left in the register r4 in units of double words (32 bits (4 blocks)).
Similarly, unpack processing is executed in which the right 8 blocks (64 bits) of the register 5 and the register r3 are alternately stored from the left in the register r5 in units of double words (32 bits (4 blocks)).

次に、ステップS455において、
図67に示すように、レジスタr0,r4をレジスタr1,r3にコピーする。
Next, in step S455,
As shown in FIG. 67, the registers r0 and r4 are copied to the registers r1 and r3.

次に、ステップS456において、
図68に示すように、レジスタr0,r2とレジスタr4,r5の左64ビットに対して,クワッドワード単位でアンパック命令を実行する。
図68に示すように、レジスタr0とレジスタr2の左8ブロック(64ビット)をクワッドワード(64ビット(8ブロック))単位で、レジスタr0に左から交互に格納するアンパック処理を実行する。
同様に、レジスタr4とレジスタr5の左8ブロック(64ビット)をクワッドワード(64ビット(8ブロック))単位で、レジスタr4に左から交互に格納するアンパック処理を実行する。
Next, in step S456,
As shown in FIG. 68, the unpack instruction is executed in units of quad words for the left 64 bits of the registers r0 and r2 and the registers r4 and r5.
As shown in FIG. 68, an unpacking process is executed in which the left 8 blocks (64 bits) of the registers r0 and r2 are alternately stored in the register r0 from the left in units of quadwords (64 bits (8 blocks)).
Similarly, an unpacking process is executed in which the left 8 blocks (64 bits) of the registers r4 and r5 are alternately stored in the register r4 from the left in units of quadwords (64 bits (8 blocks)).

次に、ステップS457において、
図69に示すように、レジスタr1,r2とレジスタr3,r5の右64ビットに対して,クワッドワード単位でアンパック命令を実行する。
図69に示すように、レジスタr1とレジスタr2の右8ブロック(64ビット)をクワッドワード(64ビット(8ブロック))単位で、レジスタr1に左から交互に格納するアンパック処理を実行する。
同様に、レジスタr3とレジスタr5の右8ブロック(64ビット)をクワッドワード(64ビット(8ブロック))単位で、レジスタr3に左から交互に格納するアンパック処理を実行する。
Next, in step S457,
As shown in FIG. 69, the unpack instruction is executed in quadword units for the right 64 bits of the registers r1 and r2 and the registers r3 and r5.
As shown in FIG. 69, unpack processing is executed in which the right 8 blocks (64 bits) of the register r1 and the register r2 are alternately stored in the register r1 from the left in units of quadwords (64 bits (8 blocks)).
Similarly, unpack processing is executed in which the right 8 blocks (64 bits) of the register r3 and the register r5 are alternately stored in the register r3 from the left in units of quadwords (64 bits (8 blocks)).

これら図61に示すフローのステップS451〜S457の処理結果として生成されたレジスタr0,r1,r4,r3を線形変換結果として、次のラウンドの入力とする。
図70に図57のフローのステップS404の線形変換処理の入力と出力との対応関係を示す。
The registers r0, r1, r4, and r3 generated as the processing results of steps S451 to S457 in the flow shown in FIG. 61 are used as the input of the next round as the linear conversion results.
FIG. 70 shows the correspondence between the input and output of the linear transformation process in step S404 of the flow of FIG.

このように、図57に示すフローのステップS402のラウンド鍵加算、ステップS403の非線形変換、およびステップS404の線形変換によって1つのラウンド演算が構成される。
このラウンド演算処理における各処理の命令数は、以下の通りとなる。
(a)ラウンド鍵加算(addRoundKey):4
(b)非線形変換(SboxLayer):20
(c)線形変換(pLayer):16
In this way, one round operation is constituted by the round key addition in step S402, the non-linear transformation in step S403, and the linear transformation in step S404 in the flow shown in FIG.
The number of instructions in each process in this round calculation process is as follows.
(A) Round key addition (addRoundKey): 4
(B) Nonlinear transformation (SboxLayer): 20
(C) Linear transformation (pLayer): 16

図7に示す暗号処理部110のステップS122では、図57に示すフローに従ったラウンド演算を、暗号アルゴリズムに規定された所定回数(32回)繰り返す。この処理結果に対して、次のステップS123においてデータ逆変換処理を実行する。   In step S122 of the cryptographic processing unit 110 shown in FIG. 7, the round calculation according to the flow shown in FIG. 57 is repeated a predetermined number of times (32 times) defined in the cryptographic algorithm. A data reverse conversion process is performed on the processing result in the next step S123.

このステップS123は、ステップS122の暗号処理(Data Processing)結果に対するデータ逆変換処理(Data Conversion−1)であり、ビットスライス表現データをビットスライスされる前の平文データ82に対応する暗号化データの集合に戻す処理である。この処理は、先に、図9を参照して説明したビットスライス表現データの生成処理の逆の処理として実行される。
この処理により、出力データ90として、平文データ82に対応する暗号化データ91が生成される。
This step S123 is a data reverse conversion process (Data Conversion −1 ) for the result of the encryption process (Data Processing) of Step S122, and the bit slice representation data is encrypted data corresponding to the plain text data 82 before being bit sliced. It is processing to return to the set. This process is executed as the reverse process of the bit slice expression data generation process described above with reference to FIG.
By this processing, encrypted data 91 corresponding to the plain text data 82 is generated as the output data 90.

なお、上述した実施例では、暗号アルゴリズムである[PRESENT]の線形変換処理(pLayer)をソフトウェアで効率よく実行するため、データのビットスライス表現を、図9を参照して説明したように、4ビット間隔で行う構成としている。この構成により、例えば、Intel拡張SIMD命令のシャッフル、アンパック命令を組み合わせて、図61〜図70を参照した処理に従って行うことで1ラウンドにつき、16命令で線形変換(pLayer)を実行することが可能となる。   In the above-described embodiment, in order to efficiently execute the linear conversion processing (pLayer) of [PRESENT], which is an encryption algorithm, by software, as described with reference to FIG. The configuration is performed at bit intervals. With this configuration, for example, it is possible to execute linear conversion (pLayer) with 16 instructions per round by combining the shuffling and unpacking instructions of the Intel extended SIMD instruction and performing the processing according to the processing with reference to FIGS. It becomes.

また、暗号アルゴリズム[PRESENT]では1ラウンドに対応するラウンド鍵の更新処理に際して、1回のSboxを適用した非線形変換処理を行う設定となっている。
これに対して、先に説明した[6.鍵スケジュール処理について(鍵スケジュール処理例2)]において説明した構成によれば、80ビット鍵を入力して処理を行う鍵スケジュール部は、2回の非線型変換処理によって32ラウンド分のラウンド鍵を生成することが可能であり、少ない命令数でのラウンド鍵生成が可能であり、高速処理が実現される。
In addition, the encryption algorithm [PRESENT] is configured to perform a non-linear transformation process to which one Sbox is applied when a round key corresponding to one round is updated.
In contrast, [6. According to the configuration described in “Key Schedule Processing (Key Schedule Processing Example 2)]”, the key schedule unit that performs processing by inputting an 80-bit key receives round keys for 32 rounds by two nonlinear conversion processes. It is possible to generate a round key with a small number of instructions, and high-speed processing is realized.

以上、説明したように、本開示の情報処理装置は、特定の暗号アルゴリズム、例えば上述した暗号アルゴリズム[PRESENT]の処理を、暗号アルゴリズムを実行するための専用ハードウェアを有していない情報処理装置、例えばPC等の情報処理装置において高速に実行することを可能としたものである。   As described above, the information processing apparatus of the present disclosure is an information processing apparatus that does not have dedicated hardware for executing processing of a specific cryptographic algorithm, for example, the above-described cryptographic algorithm [PRESENT]. For example, the information processing apparatus such as a PC can be executed at high speed.

[8.情報処理装置および暗号処理装置の構成例について]
最後に、上述した実施例に従った暗号処理を実行する情報処理装置や暗号処理装置の装置構成例について説明する。情報処理装置には、例えば、図1〜図5を参照して説明したサーバなども含まれる。
上述した実施例に従った暗号処理は、暗号処理アルゴリズムを規定したソフトウェア(プログラム)を実行するCPU等から構成されるデータ処理部、プログラムや、データを格納するメモリを有する例えばPCやサーバ等の機器において実行可能である。
[8. Configuration example of information processing apparatus and cryptographic processing apparatus]
Finally, an apparatus configuration example of an information processing apparatus that executes cryptographic processing according to the above-described embodiment and a cryptographic processing apparatus will be described. The information processing apparatus includes, for example, the server described with reference to FIGS.
The cryptographic processing according to the above-described embodiment is performed by a data processing unit including a CPU or the like that executes software (program) that defines a cryptographic processing algorithm, a program, or a memory that stores data, such as a PC or a server. It can be executed on the device.

図71に、本開示の暗号処理を実行する情報処理装置や、暗号処理装置のハードウェア構成例を示す。
CPU(Central Processing Unit)701は、ROM(Read Only Memory)702、または記憶部708に記憶されているプログラムに従って各種の処理を実行するデータ処理部として機能する。例えば、上述したシーケンスに従った処理を実行する。
FIG. 71 illustrates an example of a hardware configuration of an information processing device that executes the cryptographic processing of the present disclosure and the cryptographic processing device.
A CPU (Central Processing Unit) 701 functions as a data processing unit that executes various processes according to a program stored in a ROM (Read Only Memory) 702 or a storage unit 708. For example, processing according to the above-described sequence is executed.

RAM(Random Access Memory)703には、CPU701が実行するプログラムやデータなどが記憶される。例えば上述した暗号処理シーケンスを規定したプログラムが格納されている。RAMには、上述した各処理に適用するデータを格納するレジスタも含まれ、ワーク領域として使用されるメモリ領域なども含まれる。
これらのCPU701、ROM702、およびRAM703は、バス704により相互に接続されている。
A RAM (Random Access Memory) 703 stores programs executed by the CPU 701, data, and the like. For example, a program defining the above-described cryptographic processing sequence is stored. The RAM also includes a register that stores data to be applied to each process described above, and also includes a memory area that is used as a work area.
The CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704.

CPU701はバス704を介して入出力インタフェース705に接続され、入出力インタフェース705には、各種スイッチ、キーボード、マウス、マイクロホンなどよりなる入力部706、ディスプレイ、スピーカなどよりなる出力部707が接続されている。CPU701は、入力部706から入力される指令に対応して各種の処理を実行し、処理結果を例えば出力部707に出力する。   The CPU 701 is connected to an input / output interface 705 via a bus 704. The input / output interface 705 is connected to an input unit 706 including various switches, a keyboard, a mouse, and a microphone, and an output unit 707 including a display and a speaker. Yes. The CPU 701 executes various processes in response to commands input from the input unit 706 and outputs the processing results to the output unit 707, for example.

入出力インタフェース705に接続されている記憶部708は、例えばハードディスク等からなり、CPU701が実行するプログラムや各種のデータを記憶する。通信部709は、インターネットやローカルエリアネットワークなどのネットワークを介して外部の装置と通信する。
例えば図1〜図5を参照して説明したサーバである場合、通信部709は、多数のユーザ端末やセンサ等からの暗号化データの受信処理、あるいは多数のユーザ端末やセンサ等に対する暗号化データの送信処理を実行する。
The storage unit 708 connected to the input / output interface 705 includes, for example, a hard disk and stores programs executed by the CPU 701 and various data. A communication unit 709 communicates with an external device via a network such as the Internet or a local area network.
For example, in the case of the server described with reference to FIGS. 1 to 5, the communication unit 709 receives encrypted data from a large number of user terminals, sensors, or the like, or encrypted data for a large number of user terminals, sensors, or the like. Execute the transmission process.

入出力インタフェース705に接続されているドライブ710は、磁気ディスク、光ディスク、光磁気ディスク、あるいはメモリカード等の半導体メモリなどのリムーバブルメディア711を駆動し、データの記録または読み取りを実行する。   A drive 710 connected to the input / output interface 705 drives a removable medium 711 such as a semiconductor memory such as a magnetic disk, an optical disk, a magneto-optical disk, or a memory card, and executes data recording or reading.

なお、上述した実施例では、主に入力データとしての平文を暗号化する暗号化処理について説明したが、本開示の処理は、入力データとしての平文を暗号化する暗号化処理のみならず、入力データとしての暗号文を平文に復元する復号処理にも適用可能である。   In the above-described embodiment, the encryption process for mainly encrypting the plain text as the input data has been described. However, the process of the present disclosure is not limited to the encryption process for encrypting the plain text as the input data. The present invention can also be applied to decryption processing for restoring ciphertext as data into plaintext.

[9.本開示の構成のまとめ]
以上、特定の実施例を参照しながら、本開示の実施例について詳解してきた。しかしながら、本開示の要旨を逸脱しない範囲で当業者が実施例の修正や代用を成し得ることは自明である。すなわち、例示という形態で本発明を開示してきたのであり、限定的に解釈されるべきではない。本開示の要旨を判断するためには、特許請求の範囲の欄を参酌すべきである。
[9. Summary of composition of the present disclosure]
As described above, the embodiments of the present disclosure have been described in detail with reference to specific embodiments. However, it is obvious that those skilled in the art can make modifications and substitutions of the embodiments without departing from the gist of the present disclosure. In other words, the present invention has been disclosed in the form of exemplification, and should not be interpreted in a limited manner. In order to determine the gist of the present disclosure, the claims should be taken into consideration.

また、本開示の一実施例に従った復号処理では、レジスタに格納されたビットスライス表現ブロック単位の演算や移動処理によって処理が行われ、高速に大量のデータを処理することが可能となる。具体的には、Intel Core i7 870プロセッサ上で暗号アルゴリズム[PRESENT(鍵長80ビット)]を実行した場合、11.06cycles/byteという高速性を達成している。   In addition, in the decoding process according to an embodiment of the present disclosure, processing is performed by calculation or movement processing in units of bit slice expression blocks stored in a register, and a large amount of data can be processed at high speed. Specifically, when the encryption algorithm [PRESENT (key length 80 bits)] is executed on the Intel Core i7 870 processor, a high speed of 11.06 cycles / byte is achieved.

なお、上記の実施例では、主として暗号アルゴリズム[PRESENT(鍵長80ビット)]の実行処理例について説明したが、本開示の処理は、他のアルゴリズムにも適用可能である。例えば本開示の処理に従って暗号アルゴリズム[Piccolo(鍵長80ビット)]を実行した場合、5.59cycles/byteという高速性が達成された。特にPiccoloの速度は、従来知られていた同プラットフォーム上(Intel Core i7 920)上での米国政府標準暗号AESの速度記録6.92cycles/byteを超えるものとなっている。   In the above embodiment, an example of execution processing of the encryption algorithm [PRESENT (key length: 80 bits)] has been mainly described, but the processing of the present disclosure can be applied to other algorithms. For example, when the cryptographic algorithm [Piccolo (key length: 80 bits)] is executed in accordance with the processing of the present disclosure, a high speed of 5.59 cycles / bytes is achieved. In particular, the speed of Piccolo exceeds the speed record of 6.92 cycles / byte of the US government standard cipher AES on the same platform (Intel Core i7 920) which has been conventionally known.

さらに、本開示の一実施例に従ったビットスライス実装ではS−boxをテーブル参照でなく論理演算で計算するため、キャッシュ攻撃や仮想マシン間攻撃のようなサイドチャネル攻撃に対する耐性を高めることができる。さらに、クラウドコンピューティング処理におけるソフトウェアでの暗号処理の高速化は、より少ないサイクル数で暗号処理を完了することができ、クラウドやデータセンターの電力消費量を下げることにつながる。   Furthermore, in the bit slice implementation according to an embodiment of the present disclosure, the S-box is calculated by a logical operation instead of a table reference, so that it is possible to increase resistance to side channel attacks such as a cache attack and an attack between virtual machines. . Furthermore, the speedup of cryptographic processing by software in cloud computing processing can complete cryptographic processing in a smaller number of cycles, leading to lower power consumption of the cloud and data center.

なお、本明細書において開示した技術は、以下のような構成をとることができる。
(1) 暗号処理シーケンスを規定したプログラムに従ってデータ処理を実行するデータ処理部を有し、
前記データ処理部は、前記プログラムに従って、
暗号化処理対象となる複数の平文データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記複数の平文データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、暗号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した暗号処理と、
前記暗号処理の結果に対する前記ビットスライス処理の逆変換により、前記複数の平文データに対応する複数の暗号化データを生成するデータ逆変換処理を実行し、
前記鍵スケジュール処理において、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する情報処理装置。
The technology disclosed in this specification can take the following configurations.
(1) having a data processing unit for executing data processing in accordance with a program defining a cryptographic processing sequence;
The data processing unit, according to the program,
Data conversion processing for generating bit slice expression data by bit slice processing for a plurality of plaintext data to be encrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each of the plurality of plaintext data encryption keys;
Key schedule processing for inputting the bit slice expression key and generating a round key for each round in cryptographic processing;
An encryption process applying the round key to the bit slice representation data;
A data reverse conversion process for generating a plurality of encrypted data corresponding to the plurality of plaintext data by performing an inverse conversion of the bit slice process with respect to a result of the encryption process,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
An information processing apparatus for generating the round key by applying arithmetic processing and movement processing in units of a bit slice expression key block configured by:

(2)前記データ処理部は、前記データ変換処理において、前記ビットスライス表現データを構成する各平文データの同一ビット目またはnビットおきのビット、ただしnは2のべき数、によって構成されるビットスライス表現データブロックを処理単位として、レジスタに格納する処理を実行し、前記鍵変換処理において、前記ビットスライス表現鍵ブロックを処理単位として、レジスタに格納する処理を実行し、前記暗号処理において、前記レジスタに格納された前記ビットスライス表現データブロックと、前記ビットスライス表現鍵ブロックを単位とするブロック単位の演算処理と移動処理を適用した暗号処理を実行する前記(1)に記載の情報処理装置。   (2) In the data conversion process, the data processing unit is a bit constituted by the same bit or every n bits of plaintext data constituting the bit slice expression data, where n is a power of 2. A process of storing a slice representation data block as a processing unit in a register is executed, and in the key conversion process, a processing of storing the bit slice expression data block as a processing unit in a register is executed. The information processing apparatus according to (1), wherein encryption processing is performed by applying block-unit arithmetic processing and movement processing in units of the bit slice expression data block stored in the register and the bit slice expression key block.

(3)前記データ処理部は、前記鍵変換処理において、前記ビットスライス表現鍵ブロックを処理単位として、複数のレジスタに分散して格納する処理を実行し、前記鍵スケジュール処理において、前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して、前記複数のレジスタ間の演算処理と、各レジスタ格納ブロックのシフトおよびシャッフル処理を実行して、ラウンド鍵生成を行う前記(1)または(2)に記載の情報処理装置。   (3) In the key conversion process, the data processing unit executes a process of storing the bit slice expression key block in a plurality of registers in units of processing, and in the key schedule process, the plurality of registers (1) or (2) for performing round key generation by performing arithmetic processing between the plurality of registers and shifting and shuffling of each register storage block on the bit slice expression key block stored in ).

(4)前記データ処理部は、前記鍵スケジュール処理において、前記複数のレジスタの格納ブロックから選択されたブロックを1つのレジスタに再格納するアンパック処理を実行する前記(3)に記載の情報処理装置。
(5)前記データ処理部は、前記鍵スケジュール処理において、前記ビットスライス表現鍵ブロックを格納した複数のレジスタの複数のビットスライス表現鍵ブロックに対して、暗号処理における各ラウンドのラウンド番号を示すラウンドカウンタとの排他的論理和演算を実行してラウンド鍵生成を行う前記(3)または(4)に記載の情報処理装置。
(4) The information processing apparatus according to (3), wherein the data processing unit executes an unpacking process in which the block selected from the storage blocks of the plurality of registers is re-stored in one register in the key schedule process. .
(5) In the key schedule process, the data processing unit is configured to indicate a round number of each round in the cryptographic process for a plurality of bit slice expression key blocks of a plurality of registers storing the bit slice expression key blocks. The information processing apparatus according to (3) or (4), wherein round key generation is performed by executing an exclusive OR operation with a counter.

(6)前記データ処理部は、前記鍵スケジュール処理において、前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して予め既定した論理命令列に従った演算を実行することで、非線形変換処理(Sbox)を実行してラウンド鍵生成を行う前記(3)〜(5)いずれかに記載の情報処理装置。
(7)前記データ処理部は、前記鍵スケジュール処理において、前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して、レジスタ単位の非線形変換処理(Sbox)を実行して、複数のラウンド鍵生成をまとめて生成する前記(3)〜(6)いずれかに記載の情報処理装置。
(8)前記データ処理部は、前記暗号処理において、暗号アルゴリズムPRESENTに従った暗号処理をプログラムに従って実行する前記(1)〜(7)いずれかに記載の情報処理装置。
(6) In the key schedule process, the data processing unit performs an operation according to a predetermined logical instruction sequence on the bit slice expression key block stored in the plurality of registers, thereby performing nonlinear conversion The information processing apparatus according to any one of (3) to (5), wherein round key generation is performed by executing processing (Sbox).
(7) In the key schedule processing, the data processing unit performs non-linear conversion processing (Sbox) in units of registers on the bit slice expression key blocks stored in the plurality of registers, and performs a plurality of rounds. The information processing apparatus according to any one of (3) to (6), wherein key generation is generated collectively.
(8) The information processing apparatus according to any one of (1) to (7), wherein the data processing unit executes cryptographic processing according to a cryptographic algorithm PRESENT according to a program in the cryptographic processing.

(9)復号処理シーケンスを規定したプログラムに従ってデータ処理を実行するデータ処理部を有し、
前記データ処理部は、前記プログラムに従って、
復号処理対象となる複数の暗号化データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記複数の暗号化データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、復号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した復号処理と、
前記復号処理の結果に対する前記ビットスライス処理の逆変換により、前記複数の暗号化データに対応する複数の平文データを生成するデータ逆変換処理を実行し、
前記鍵スケジュール処理において、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する情報処理装置。
(9) having a data processing unit that executes data processing according to a program that defines a decoding processing sequence;
The data processing unit, according to the program,
Data conversion processing for generating bit slice expression data by bit slice processing for a plurality of encrypted data to be decrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each encryption key of the plurality of encrypted data;
A key schedule process for inputting the bit slice expression key and generating a round key for each round in the decryption process;
Decryption processing applying the round key to the bit slice representation data;
By performing an inverse transform of the bit slice process on the result of the decryption process, a data inverse transform process for generating a plurality of plaintext data corresponding to the plurality of encrypted data is performed,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
An information processing apparatus for generating the round key by applying arithmetic processing and movement processing in units of a bit slice expression key block configured by:

(10)前記データ処理部は、前記データ変換処理において、前記ビットスライス表現データを構成する各暗号化データの同一ビット目またはnビットおきのビット、ただしnは2のべき数、によって構成されるビットスライス表現データブロックを単位として、レジスタに格納する処理を実行し、前記鍵変換処理において、前記ビットスライス表現鍵ブロックを単位として、レジスタに格納する処理を実行し、前記復号処理において、前記レジスタに格納された前記ビットスライス表現データブロックと、前記ビットスライス表現鍵ブロックを単位とするブロック単位の演算処理と移動処理を適用した復号処理を実行する前記(9)に記載の情報処理装置。   (10) In the data conversion process, the data processing unit is configured by the same bit or every n bits of the encrypted data constituting the bit slice expression data, where n is a power of 2. A process of storing in a register in units of bit slice representation data blocks is executed, and a process of storing in a register in units of the bit slice expression key blocks in the key conversion process is executed. The information processing apparatus according to (9), wherein the bit slice expression data block stored in the block and a block unit arithmetic process and a decryption process using the bit slice expression key block as a unit are executed.

(11)前記データ処理部は、前記鍵変換処理において、前記ビットスライス表現鍵ブロックを処理単位として、複数のレジスタに分散して格納する処理を実行し、前記鍵スケジュール処理において、前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して、前記複数のレジスタ間の演算処理と、各レジスタ格納ブロックのシフトおよびシャッフル処理を実行して、ラウンド鍵生成を行う前記(9)または(10)に記載の情報処理装置。
(12)前記データ処理部は、前記鍵スケジュール処理において、前記複数のレジスタの格納ブロックから選択されたブロックを1つのレジスタに再格納するアンパック処理を実行する前記(11)に記載の情報処理装置。
(11) In the key conversion process, the data processing unit executes a process of storing the bit slice expression key block in a plurality of registers in units of processing, and in the key schedule process, the plurality of registers (9) or (10) in which round key generation is performed by performing arithmetic processing between the plurality of registers and shifting and shuffling of each register storage block on the bit slice representation key block stored in ).
(12) The information processing apparatus according to (11), wherein the data processing unit executes an unpacking process in which the block selected from the storage blocks of the plurality of registers is re-stored in one register in the key schedule process. .

さらに、上記した装置およびシステムにおいて実行する処理の方法や、処理を実行させるプログラムも本開示の構成に含まれる。   Furthermore, the configuration of the present disclosure includes a method of processing executed in the above-described apparatus and system, and a program for executing the processing.

また、明細書中において説明した一連の処理はハードウェア、またはソフトウェア、あるいは両者の複合構成によって実行することが可能である。ソフトウェアによる処理を実行する場合は、処理シーケンスを記録したプログラムを、専用のハードウェアに組み込まれたコンピュータ内のメモリにインストールして実行させるか、あるいは、各種処理が実行可能な汎用コンピュータにプログラムをインストールして実行させることが可能である。例えば、プログラムは記録媒体に予め記録しておくことができる。記録媒体からコンピュータにインストールする他、LAN(LocalAreaNetwork)、インターネットといったネットワークを介してプログラムを受信し、内蔵するハードディスク等の記録媒体にインストールすることができる。   The series of processing described in the specification can be executed by hardware, software, or a combined configuration of both. When executing processing by software, the program recording the processing sequence is installed in a memory in a computer incorporated in dedicated hardware and executed, or the program is executed on a general-purpose computer capable of executing various processing. It can be installed and run. For example, the program can be recorded in advance on a recording medium. In addition to being installed on a computer from a recording medium, the program can be received via a network such as a LAN (Local Area Network) or the Internet and installed on a recording medium such as a built-in hard disk.

なお、明細書に記載された各種の処理は、記載に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。また、本明細書においてシステムとは、複数の装置の論理的集合構成であり、各構成の装置が同一筐体内にあるものには限らない。   Note that the various processes described in the specification are not only executed in time series according to the description, but may be executed in parallel or individually according to the processing capability of the apparatus that executes the processes or as necessary. Further, in this specification, the system is a logical set configuration of a plurality of devices, and the devices of each configuration are not limited to being in the same casing.

10 クラウド
20 センサネットワーク
30 サーバ
31 暗号鍵
32 センサID
33 暗号化データ
70 平文データ
80 入力データ
81 暗号鍵
82 平文データ
90 出力データ
91 暗号化データ
100 情報処理装置
110 暗号処理部
701 CPU
702 ROM
703 RAM
704 バス
705 入出力インタフェース
706 入力部
707 出力部
708 記憶部
709 通信部
710 ドライブ
711 リムーバブルメディア
10 cloud 20 sensor network 30 server 31 encryption key 32 sensor ID
33 Encrypted data 70 Plain text data 80 Input data 81 Encryption key 82 Plain text data 90 Output data 91 Encrypted data 100 Information processing device 110 Encryption processing unit 701 CPU
702 ROM
703 RAM
704 Bus 705 I / O interface 706 Input unit 707 Output unit 708 Storage unit 709 Communication unit 710 Drive 711 Removable media

Claims (16)

暗号処理シーケンスを規定したプログラムに従ってデータ処理を実行するデータ処理部を有し、
前記データ処理部は、前記プログラムに従って、
暗号化処理対象となる平文データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記平文データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、暗号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した暗号処理と、
前記暗号処理の結果に対する前記ビットスライス処理の逆変換により、前記平文データに対応する暗号化データを生成するデータ逆変換処理を実行し、
前記鍵スケジュール処理において、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する情報処理装置。
A data processing unit that executes data processing according to a program that defines an encryption processing sequence;
The data processing unit, according to the program,
Data conversion processing for generating bit slice expression data by bit slice processing on plaintext data to be encrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each encryption key of the plaintext data;
Key schedule processing for inputting the bit slice expression key and generating a round key for each round in cryptographic processing;
An encryption process applying the round key to the bit slice representation data;
By performing an inverse transformation of the bit slice processing with respect to the result of the encryption processing, a data inverse transformation processing for generating encrypted data corresponding to the plaintext data is executed,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
An information processing apparatus for generating the round key by applying arithmetic processing and movement processing in units of a bit slice expression key block configured by:
前記データ処理部は、
前記データ変換処理において、前記ビットスライス表現データを構成する各平文データの同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現データブロックを処理単位として、レジスタに格納する処理を実行し、
前記鍵変換処理において、前記ビットスライス表現鍵ブロックを処理単位として、レジスタに格納する処理を実行し、
前記暗号処理において、
前記レジスタに格納された前記ビットスライス表現データブロックと、前記ビットスライス表現鍵ブロックを単位とするブロック単位の演算処理と移動処理を適用した暗号処理を実行する請求項1に記載の情報処理装置。
The data processing unit
In the data conversion process, the same bit or every nth bit of the plaintext data constituting the bit slice expression data, where n is a power of 2.
Execute the process of storing in the register, with the bit slice representation data block configured by
In the key conversion process, a process of storing the bit slice expression key block as a processing unit in a register is performed,
In the cryptographic process,
The information processing apparatus according to claim 1, wherein encryption processing is performed by applying block-unit arithmetic processing and movement processing in units of the bit slice expression data block stored in the register and the bit slice expression key block.
前記データ処理部は、
前記鍵変換処理において、前記ビットスライス表現鍵ブロックを処理単位として、複数のレジスタに分散して格納する処理を実行し、
前記鍵スケジュール処理において、
前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して、前記複数のレジスタ間の演算処理と、
各レジスタ格納ブロックのシフトおよびシャッフル処理を実行して、ラウンド鍵生成を行う請求項1に記載の情報処理装置。
The data processing unit
In the key conversion process, the bit slice expression key block is used as a processing unit, and a process of distributing and storing in a plurality of registers is performed,
In the key schedule process,
For the bit slice representation key block stored in the plurality of registers, arithmetic processing between the plurality of registers,
The information processing apparatus according to claim 1, wherein round key generation is performed by executing shift and shuffle processing of each register storage block.
前記データ処理部は、
前記鍵スケジュール処理において、前記複数のレジスタの格納ブロックから選択されたブロックを1つのレジスタに再格納するアンパック処理を実行する請求項3に記載の情報処理装置。
The data processing unit
The information processing apparatus according to claim 3, wherein in the key schedule process, an unpacking process is performed in which a block selected from the storage blocks of the plurality of registers is re-stored in one register.
前記データ処理部は、
前記鍵スケジュール処理において、前記ビットスライス表現鍵ブロックを格納した複数のレジスタの複数のビットスライス表現鍵ブロックに対して、暗号処理における各ラウンドのラウンド番号を示すラウンドカウンタとの排他的論理和演算を実行してラウンド鍵生成を行う請求項3に記載の情報処理装置。
The data processing unit
In the key schedule processing, exclusive OR operation with a round counter indicating a round number of each round in encryption processing is performed on a plurality of bit slice representation key blocks of a plurality of registers storing the bit slice representation key blocks. The information processing apparatus according to claim 3, which executes round key generation.
前記データ処理部は、
前記鍵スケジュール処理において、前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して予め既定した論理命令列に従った演算を実行することで、非線形変換処理(Sbox)を実行してラウンド鍵生成を行う請求項3に記載の情報処理装置。
The data processing unit
In the key schedule process, a non-linear transformation process (Sbox) is performed by performing an operation according to a predetermined logical instruction sequence for the bit slice expression key block stored in the plurality of registers, thereby performing a round The information processing apparatus according to claim 3, wherein key generation is performed.
前記データ処理部は、
前記鍵スケジュール処理において、前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して、レジスタ単位の非線形変換処理(Sbox)を実行して、複数のラウンド鍵生成をまとめて生成する請求項3に記載の情報処理装置。
The data processing unit
The said key schedule process WHEREIN: The nonlinear transformation process (Sbox) of a register unit is performed with respect to the said bit slice expression key block stored in these registers | resistors, The several round key generation is produced | generated collectively. 3. The information processing apparatus according to 3.
前記データ処理部は、
前記暗号処理において、暗号アルゴリズムPRESENTに従った暗号処理をプログラムに従って実行する請求項1に記載の情報処理装置。
The data processing unit
The information processing apparatus according to claim 1, wherein in the cryptographic processing, cryptographic processing according to a cryptographic algorithm PRESENT is executed according to a program.
復号処理シーケンスを規定したプログラムに従ってデータ処理を実行するデータ処理部を有し、
前記データ処理部は、前記プログラムに従って、
復号処理対象となる暗号化データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記暗号化データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、復号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した復号処理と、
前記復号処理の結果に対する前記ビットスライス処理の逆変換により、前記暗号化データに対応する平文データを生成するデータ逆変換処理を実行し、
前記鍵スケジュール処理において、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する情報処理装置。
A data processing unit that executes data processing according to a program that defines a decoding processing sequence;
The data processing unit, according to the program,
A data conversion process for generating bit slice expression data by a bit slice process for encrypted data to be decrypted;
A key conversion process for generating a bit slice representation key by a bit slice process for each encryption key of the encrypted data;
A key schedule process for inputting the bit slice expression key and generating a round key for each round in the decryption process;
Decryption processing applying the round key to the bit slice representation data;
By performing inverse transformation of the bit slice processing on the result of the decryption processing, performing data inverse transformation processing for generating plaintext data corresponding to the encrypted data,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
An information processing apparatus for generating the round key by applying arithmetic processing and movement processing in units of a bit slice expression key block configured by:
前記データ処理部は、
前記データ変換処理において、前記ビットスライス表現データを構成する各暗号化データの同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現データブロックを単位として、レジスタに格納する処理を実行し、
前記鍵変換処理において、前記ビットスライス表現鍵ブロックを単位として、レジスタに格納する処理を実行し、
前記復号処理において、
前記レジスタに格納された前記ビットスライス表現データブロックと、前記ビットスライス表現鍵ブロックを単位とするブロック単位の演算処理と移動処理を適用した復号処理を実行する請求項9に記載の情報処理装置。
The data processing unit
In the data conversion process, the same bit or every nth bit of each encrypted data constituting the bit slice expression data, where n is a power of 2.
Execute the process of storing in the register in units of the bit slice representation data block configured by
In the key conversion process, a process of storing in a register in units of the bit slice expression key block is performed,
In the decryption process,
The information processing apparatus according to claim 9, wherein a decryption process is performed by applying a block-unit operation process and a move process in units of the bit slice expression data block stored in the register and the bit slice expression key block.
前記データ処理部は、
前記鍵変換処理において、前記ビットスライス表現鍵ブロックを処理単位として、複数のレジスタに分散して格納する処理を実行し、
前記鍵スケジュール処理において、
前記複数のレジスタに格納された前記ビットスライス表現鍵ブロックに対して、前記複数のレジスタ間の演算処理と、
各レジスタ格納ブロックのシフトおよびシャッフル処理を実行して、ラウンド鍵生成を行う請求項9に記載の情報処理装置。
The data processing unit
In the key conversion process, the bit slice expression key block is used as a processing unit, and a process of distributing and storing in a plurality of registers is performed,
In the key schedule process,
For the bit slice representation key block stored in the plurality of registers, arithmetic processing between the plurality of registers,
The information processing apparatus according to claim 9, wherein round key generation is performed by executing shift and shuffle processing of each register storage block.
前記データ処理部は、
前記鍵スケジュール処理において、前記複数のレジスタの格納ブロックから選択されたブロックを1つのレジスタに再格納するアンパック処理を実行する請求項11に記載の情報処理装置。
The data processing unit
The information processing apparatus according to claim 11, wherein in the key schedule process, an unpacking process is performed in which a block selected from the storage blocks of the plurality of registers is re-stored in one register.
情報処理装置において実行する情報処理方法であり、
前記情報処理装置のデータ処理部において、暗号処理シーケンスを規定したプログラムに従って、
暗号化処理対象となる平文データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記平文データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、暗号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した暗号処理と、
前記暗号処理の結果に対する前記ビットスライス処理の逆変換により、前記平文データに対応する暗号化データを生成するデータ逆変換処理を実行し、
前記鍵スケジュール処理において、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する情報処理方法。
An information processing method executed in an information processing apparatus,
In the data processing unit of the information processing apparatus, according to a program that defines an encryption processing sequence,
Data conversion processing for generating bit slice expression data by bit slice processing on plaintext data to be encrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each encryption key of the plaintext data;
Key schedule processing for inputting the bit slice expression key and generating a round key for each round in cryptographic processing;
An encryption process applying the round key to the bit slice representation data;
By performing an inverse transformation of the bit slice processing with respect to the result of the encryption processing, a data inverse transformation processing for generating encrypted data corresponding to the plaintext data is executed,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
An information processing method for generating the round key by applying a calculation process and a transfer process in units of a bit slice expression key block constituted by:
情報処理装置において実行する情報処理方法であり、
前記情報処理装置のデータ処理部において、復号処理シーケンスを規定したプログラムに従って、
復号処理対象となる暗号化データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記暗号化データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、復号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した復号処理と、
前記復号処理の結果に対する前記ビットスライス処理の逆変換により、前記暗号化データに対応する平文データを生成するデータ逆変換処理を実行し、
前記鍵スケジュール処理において、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する情報処理方法。
An information processing method executed in an information processing apparatus,
In the data processing unit of the information processing apparatus, according to a program that defines a decoding processing sequence,
A data conversion process for generating bit slice expression data by a bit slice process for encrypted data to be decrypted;
A key conversion process for generating a bit slice representation key by a bit slice process for each encryption key of the encrypted data;
A key schedule process for inputting the bit slice expression key and generating a round key for each round in the decryption process;
Decryption processing applying the round key to the bit slice representation data;
By performing inverse transformation of the bit slice processing on the result of the decryption processing, performing data inverse transformation processing for generating plaintext data corresponding to the encrypted data,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
An information processing method for generating the round key by applying a calculation process and a transfer process in units of a bit slice expression key block constituted by:
情報処理装置において暗号処理を実行させるプログラムであり、
前記情報処理装置のデータ処理部に、
暗号化処理対象となる平文データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記平文データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、暗号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した暗号処理と、
前記暗号処理の結果に対する前記ビットスライス処理の逆変換により、前記平文データに対応する暗号化データを生成するデータ逆変換処理を実行させ、
前記鍵スケジュール処理においては、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する処理を実行させるプログラム。
A program for executing cryptographic processing in an information processing device,
In the data processing unit of the information processing apparatus,
Data conversion processing for generating bit slice expression data by bit slice processing on plaintext data to be encrypted;
A key conversion process for generating a bit slice expression key by a bit slice process for each encryption key of the plaintext data;
Key schedule processing for inputting the bit slice expression key and generating a round key for each round in cryptographic processing;
An encryption process applying the round key to the bit slice representation data;
By performing an inverse transform of the bit slice process on the result of the encryption process, a data inverse transform process for generating encrypted data corresponding to the plaintext data is executed,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
A program for executing processing for generating the round key by applying arithmetic processing and movement processing in units of a bit slice expression key block constituted by:
情報処理装置において復号処理を実行させるプログラムであり、
前記情報処理装置のデータ処理部に、
復号処理対象となる暗号化データに対するビットスライス処理によりビットスライス表現データを生成するデータ変換処理と、
前記暗号化データ各々の暗号鍵に対するビットスライス処理によりビットスライス表現鍵を生成する鍵変換処理と、
前記ビットスライス表現鍵を入力して、復号処理における各ラウンド用のラウンド鍵を生成する鍵スケジュール処理と、
前記ビットスライス表現データに対して前記ラウンド鍵を適用した復号処理と、
前記復号処理の結果に対する前記ビットスライス処理の逆変換により、前記暗号化データに対応する平文データを生成するデータ逆変換処理を実行させ、
前記鍵スケジュール処理においては、
前記ビットスライス表現鍵を構成する各暗号鍵の同一ビット目またはnビットおきのビット、ただしnは2のべき数、
によって構成されるビットスライス表現鍵ブロック単位の演算処理と移動処理を適用して前記ラウンド鍵を生成する処理を実行させるプログラム。
A program for executing a decryption process in an information processing device,
In the data processing unit of the information processing apparatus,
A data conversion process for generating bit slice expression data by a bit slice process for encrypted data to be decrypted;
A key conversion process for generating a bit slice representation key by a bit slice process for each encryption key of the encrypted data;
A key schedule process for inputting the bit slice expression key and generating a round key for each round in the decryption process;
Decryption processing applying the round key to the bit slice representation data;
By performing an inverse transform of the bit slice process on the result of the decryption process, a data inverse transform process for generating plaintext data corresponding to the encrypted data is executed,
In the key schedule process,
The same bit or every nth bit of each encryption key constituting the bit slice representation key, where n is a power of 2.
A program for executing processing for generating the round key by applying arithmetic processing and movement processing in units of a bit slice expression key block constituted by:
JP2012046308A 2012-03-02 2012-03-02 Information processing apparatus, information processing method, and program Pending JP2013182148A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012046308A JP2013182148A (en) 2012-03-02 2012-03-02 Information processing apparatus, information processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012046308A JP2013182148A (en) 2012-03-02 2012-03-02 Information processing apparatus, information processing method, and program

Publications (1)

Publication Number Publication Date
JP2013182148A true JP2013182148A (en) 2013-09-12

Family

ID=49272823

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012046308A Pending JP2013182148A (en) 2012-03-02 2012-03-02 Information processing apparatus, information processing method, and program

Country Status (1)

Country Link
JP (1) JP2013182148A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015091070A (en) * 2013-11-07 2015-05-11 株式会社日立製作所 Semiconductor element, information terminal, semiconductor element control method and information terminal control method
JP2017211850A (en) * 2016-05-26 2017-11-30 日本電信電話株式会社 Data transmission/reception method and sensing system
JP2018109750A (en) * 2016-12-16 2018-07-12 ザ・ボーイング・カンパニーThe Boeing Company Method and system for generation of cipher round keys by bit-mixers
CN110321162A (en) * 2019-07-01 2019-10-11 无锡沐创集成电路设计有限公司 PRESENT Encryption Algorithm realization method and system based on coarseness Reconfigurable Computation unit

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015091070A (en) * 2013-11-07 2015-05-11 株式会社日立製作所 Semiconductor element, information terminal, semiconductor element control method and information terminal control method
JP2017211850A (en) * 2016-05-26 2017-11-30 日本電信電話株式会社 Data transmission/reception method and sensing system
JP2018109750A (en) * 2016-12-16 2018-07-12 ザ・ボーイング・カンパニーThe Boeing Company Method and system for generation of cipher round keys by bit-mixers
JP7107670B2 (en) 2016-12-16 2022-07-27 ザ・ボーイング・カンパニー System and method for generating cryptographic round keys with a bit mixer
CN110321162A (en) * 2019-07-01 2019-10-11 无锡沐创集成电路设计有限公司 PRESENT Encryption Algorithm realization method and system based on coarseness Reconfigurable Computation unit

Similar Documents

Publication Publication Date Title
JP5835458B2 (en) Information processing apparatus, information processing method, and program
WO2013129055A1 (en) Information processing device, information processing method, and programme
WO2013129054A1 (en) Information processing device, information processing method, and programme
CN101622816B (en) Flexible architecture and instruction for advanced encryption standard (AES)
US9031234B2 (en) Encryption device and decryption device
Muir A tutorial on white-box AES
CN109245881A (en) A kind of photograph video cloud encryption storage method
KR20180110550A (en) Method and apparatus for white-box cryptography for protecting against side channel analysis
JP5652363B2 (en) Cryptographic processing apparatus, cryptographic processing method, and program
CN113098675B (en) Binary data encryption system and method based on polynomial complete homomorphism
JP2013182148A (en) Information processing apparatus, information processing method, and program
Sohel Rana et al. A survey paper of lightweight block ciphers based on their different design architectures and performance metrics
Buell Modern symmetric ciphers—Des and Aes
CN110266481A (en) Rear quantum Encrypt and Decrypt method and decryption device based on matrix
JP6203387B2 (en) Encryption device, storage system, decryption device, encryption method, decryption method, encryption program, and decryption program
Parikibandla et al. FPGA performance evaluation of present cipher using LCC key generation for IoT sensor nodes
JP2013098722A (en) Ciphering device of stream cipher, deciphering device of stream cipher, ciphering method of stream cipher, deciphering method of stream cipher, and program
CN103238291A (en) Code processing device, code processing method, and program
JP7215245B2 (en) Information processing device, information processing method and program
JP6162556B2 (en) Storage device and information processing system
JP5665588B2 (en) Algorithm variable encryption device, algorithm variable decryption device, algorithm variable encryption method, algorithm variable decryption method, and program
REKHA et al. Design and Implementation of Low Power, Light Weight Cryptographic Core using Hummingbird2 Algorithm
Ruhan Bevi et al. RC5 implementation in ARM platform for cryptographic applications
JP2016085341A (en) Round function calculation device and encryption device, method thereof and program
Kumar et al. Efficient Modular Adders for Scalable Encryption Algorithm