JP2014116897A - Encryption device, encryption method and program - Google Patents

Encryption device, encryption method and program Download PDF

Info

Publication number
JP2014116897A
JP2014116897A JP2012271544A JP2012271544A JP2014116897A JP 2014116897 A JP2014116897 A JP 2014116897A JP 2012271544 A JP2012271544 A JP 2012271544A JP 2012271544 A JP2012271544 A JP 2012271544A JP 2014116897 A JP2014116897 A JP 2014116897A
Authority
JP
Japan
Prior art keywords
symbol
encryption
calculation
represented
binary data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012271544A
Other languages
Japanese (ja)
Inventor
Akira Maekawa
晃 前川
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2012271544A priority Critical patent/JP2014116897A/en
Publication of JP2014116897A publication Critical patent/JP2014116897A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To prevent increase of memory capacity when encryption processing is performed by table reference upon converting a plaintext and an encryption key into symbols.SOLUTION: An encryption device comprises: means 1100 for converting a plaintext and an encryption key into symbols according to mapping between binary data and symbols with predetermined humming weight; means 1400 for holding a first operation table in which an output symbol of a first operation is stored in an address shown by an input symbol of the first operation, and a second operation table in which an output symbol of a second operation is stored in an address shown by an input symbol of the second operation as a table obtained by overlapping an unused area of one operation table with a used area of the other operation table; means 1200 for generating a cipher text expressed by the symbols by performing the first operation and the second operation based on the plaintext and the encryption key expressed by the symbols, and the overlapped tables; and means 1300 for converting the cipher text expressed by the symbols into the binary data.

Description

本発明は、暗号化装置、暗号化方法およびプログラムに関し、特に、サイドチャネル攻撃を困難とする耐タンパー性を有する暗号化装置、暗号化方法およびプログラムに関する。   The present invention relates to an encryption device, an encryption method, and a program, and more particularly, to an encryption device, an encryption method, and a program that have tamper resistance that makes side channel attacks difficult.

情報の電子データ化が進む中で、情報の保護、秘匿な通信において、暗号は不可欠の技術となっている。暗号の安全性を保つためには、暗号鍵等の秘密情報が容易に推測できないようにする必要がある。暗号鍵の全数探索、数学的に解読を行う線形解読、差分解読等の暗号解析方法が知られているものの、現状では現実的な時間での解析は不可能である。   As information is converted into electronic data, encryption is an indispensable technology for information protection and confidential communication. In order to maintain encryption security, it is necessary to prevent secret information such as encryption keys from being easily guessed. Although cryptographic analysis methods such as exhaustive search of cryptographic keys, linear decryption that performs mathematical decryption, and differential decryption are known, analysis in real time is impossible at present.

一方、携帯端末等の暗号機能を実装した装置(暗号モジュール)において、攻撃者が処理時間、消費電力、漏洩電磁波等のサイドチャネル情報を精密に測定できる場合には、サイドチャネル情報から秘匿情報の取得を試みるサイドチャネル攻撃への対策が必要となる。   On the other hand, if an attacker can accurately measure side channel information such as processing time, power consumption, and leaked electromagnetic waves in a device (encryption module) equipped with an encryption function such as a portable terminal, the confidential information is It is necessary to take measures against side channel attacks that attempt to acquire.

サイドチャネル攻撃として、暗号モジュールの消費電力を測定し、消費電力から鍵等の秘密情報を解析する電力解析攻撃が知られている。電力解析攻撃の中でも、複数の消費電力波形に対して統計処理を施すことで解析を行う差分電力解析が特に強力な攻撃法とされている(非特許文献1)。   As a side channel attack, a power analysis attack is known in which the power consumption of a cryptographic module is measured and secret information such as a key is analyzed from the power consumption. Among power analysis attacks, differential power analysis in which analysis is performed by performing statistical processing on a plurality of power consumption waveforms is regarded as a particularly powerful attack method (Non-Patent Document 1).

暗号モジュールにおいて、論理ゲートの遷移確率に偏りが生じる場合に、ビット列の中で1となるビットの個数(すなわち、ハミング重み)と消費電力との間に相関があることが指摘されている(非特許文献2)。また、予め規定された暗号化処理を所定回数実行して暗号文を生成する場合、暗号化処理前後でのレジスタのビット遷移(ハミング距離)と消費電力との間にも相関があることが指摘されている(非特許文献3)。   It has been pointed out that there is a correlation between the number of bits that are 1 in a bit string (that is, Hamming weight) and power consumption when there is a bias in the transition probability of logic gates in a cryptographic module (non-null). Patent Document 2). It is also pointed out that there is a correlation between register bit transitions (Hamming distance) and power consumption before and after encryption processing when ciphertext is generated by executing predetermined encryption processing a predetermined number of times. (Non-Patent Document 3).

したがって、ハミング重みやハミング距離に着目することで、秘密鍵が解読されるおそれがある。   Therefore, there is a possibility that the secret key is decrypted by paying attention to the Hamming weight and the Hamming distance.

ハミング重みに着目した攻撃への対策手法として、一例として、DRL(Dual Rail Logic)手法が提案されている(特許文献1)。DRL手法では、オリジナルのデータを1ビット毎に分割し、1ビットの0、1のそれぞれを、所定のハミング重みを有する2ビットの01、10に変換し、ハミング重みが同数となる値を用いて暗号化処理および復号処理を行う。   As an example, a DRL (Dual Rail Logic) method has been proposed as a countermeasure method against an attack focusing on the Hamming weight (Patent Document 1). In the DRL method, the original data is divided into 1-bit bits, each of 1-bit 0s and 1s is converted into 2-bits 01 and 10 having a predetermined hamming weight, and values having the same number of hamming weights are used. To perform encryption processing and decryption processing.

以下では、所定のハミング重みを有する所定のビット幅のバイナリデータ(例えば、01、10)を「シンボル」といい、所定のビット幅のバイナリデータ(例えば、0、1)をシンボル(例えば、01、10)に変換することを「シンボル変換」という。   Hereinafter, binary data (eg, 01, 10) having a predetermined bit width having a predetermined Hamming weight is referred to as a “symbol”, and binary data (eg, 0, 1) having a predetermined bit width is referred to as a symbol (eg, 01 10) is referred to as “symbol conversion”.

特許文献1に記載されたDRL手法によると、暗号化処理および復号処理に含まれる演算がシンボル変換後のシンボルで行われるため、データの相違による消費電力の差が生じない。したがって、DRL手法によると、ハミング重みから秘密鍵を解析できなくなり、安全性が向上する。しかし、DRL手法では、1ビット毎にシンボル変換し、シンボル単位で暗号化および復号の演算を行うため、データのビット幅分演算を繰り返す必要がある。すなわち、サイドチャネル攻撃の対策をDRL手法で行うと、暗号化処理および復号処理の処理時間が増大する。   According to the DRL method described in Patent Document 1, since the calculation included in the encryption process and the decryption process is performed on the symbol-converted symbols, there is no difference in power consumption due to data difference. Therefore, according to the DRL method, the secret key cannot be analyzed from the Hamming weight, and the safety is improved. However, in the DRL method, since symbol conversion is performed for each bit and encryption and decryption operations are performed in symbol units, it is necessary to repeat the operation for the bit width of the data. That is, when the countermeasure against the side channel attack is performed by the DRL method, the processing time of the encryption process and the decryption process increases.

なお、特許文献2には、1ビット毎にシンボル変換する代わりに、所定ビット毎にシンボル変換する技術が記載されている。特許文献2に記載された技術によると、平文を複数ビット毎にシンボル変換することにより演算回数の増加を防ぐことができ、特許文献1に記載された技術の問題点を解消することができる。   Patent Document 2 describes a technique for performing symbol conversion for each predetermined bit instead of performing symbol conversion for each bit. According to the technique described in Patent Document 2, an increase in the number of operations can be prevented by symbol-converting plaintext for each of a plurality of bits, and the problems of the technique described in Patent Document 1 can be solved.

特開2005−260652号公報JP 2005260652 A 特開2010−124276号公報JP 2010-124276 A

P. Kocher, J. Jaffe and B. Jun, "Introduction to Differential Power Analysis and Related Attacks," [online], 1998, [平成24年11月22日検索], インターネット<URL:http://www.cryptography.com/public/pdf/DPATechInfo.pdf>.P. Kocher, J. Jaffe and B. Jun, "Introduction to Differential Power Analysis and Related Attacks," [online], 1998, [retrieved on November 22, 2012], Internet <URL: http: // www. cryptography.com/public/pdf/DPATechInfo.pdf>. 佐々木明彦, 阿部公輝, "暗号回路への電力差分解析攻撃に対するアルゴリズムレベルでの耐性評価," 電気学会論文誌C(電子・情報・システム部門誌), Vol.126, No.10, pp.1221-1228, Oct. 2006.Akihiko Sasaki, Kimiaki Abe, "Evaluation of algorithm-level tolerance against power differential analysis attacks on cryptographic circuits," IEICE Transactions C (Vol.126, No.10, pp.1221) -1228, Oct. 2006. E. Brier, C. Clavier, and F. Olivier, "Correlation Power Analysis with a Leakage Model," [online], 2004, [平成24年11月22日検索], インターネット<URL:http://www.iacr.org/archive/ches2004/31560016/31560016.pdf>.E. Brier, C. Clavier, and F. Olivier, "Correlation Power Analysis with a Leakage Model," [online], 2004, [retrieved on November 22, 2012], Internet <URL: http: // www. iacr.org/archive/ches2004/31560016/31560016.pdf>.

上記の特許文献および非特許文献の各開示内容は、本書に引用をもって繰り込み記載されているものとする。以下の分析は、本発明者によってなされたものである。   The disclosures of the above patent documents and non-patent documents are incorporated herein by reference. The following analysis was made by the present inventors.

特許文献2に記載された技術のようにハミング重みが一定なシンボルを多数用意することで平文および暗号鍵を複数ビット単位でシンボル変換を行う場合に、さらに、暗号化処理に含まれる演算をテーブル参照によって実現することが考えられる。   In the case where symbol conversion is performed on a plaintext and an encryption key in units of multiple bits by preparing a large number of symbols having a constant Hamming weight as in the technique described in Patent Document 2, the calculation included in the encryption processing is further displayed in a table. It can be realized by reference.

しかし、シンボルに変換された平文および暗号鍵に基づく暗号化処理をテーブル参照によって実現しようとすると、テーブル中に多数の未使用領域が生じ得る。なぜなら、シンボルは所定のハミング重みを有する所定ビット幅のバイナリデータであり、とびとびの不連続な値をとるため、シンボルをアドレスとしてテーブルを参照する場合、使用されるアドレス値もとびとびの不連続な値となるからである。特に、暗号化処理手順に複数の種類の演算が含まれる場合には、複数のテーブルをメモリに保持する必要があり、テーブルを保持するための記憶容量の増大が問題となる。   However, if the encryption process based on the plaintext converted into the symbol and the encryption key is to be realized by referring to the table, a large number of unused areas may occur in the table. This is because a symbol is binary data of a predetermined bit width having a predetermined Hamming weight, and takes discrete values. Therefore, when a table is referred to using a symbol as an address, the address value used is discrete and the discrete value is used. This is because it becomes a value. In particular, when a plurality of types of operations are included in the encryption processing procedure, it is necessary to hold a plurality of tables in a memory, and an increase in storage capacity for holding the tables becomes a problem.

そこで、平文および暗号鍵をシンボルに変換した上でテーブル参照によって暗号化処理を行う場合に、テーブルを保持するための記憶容量の増大を防ぐことが望まれる。本発明の目的は、かかる要望に寄与する暗号化装置暗号化方法およびプログラムを提供することにある。   Therefore, it is desirable to prevent an increase in storage capacity for holding a table when encryption processing is performed by referring to a table after converting plaintext and an encryption key into symbols. An object of the present invention is to provide an encryption apparatus encryption method and program that contribute to such a demand.

本発明の第1の視点に係る暗号化装置は、
第1ビット幅のバイナリデータと所定のハミング重みの第2ビット幅のシンボルとの対応付けに従ってバイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換するシンボル変換手段と、
暗号化処理に含まれる第1演算の入力に相当するシンボルが示すアドレスに該第1演算の出力に相当するシンボルが格納された第1演算テーブル、および、該暗号化処理に含まれる第2演算の入力に相当するシンボルが示すアドレスに該第2演算の出力に相当するシンボルが格納された第2演算テーブルを、一方の演算テーブルの未使用領域に他方の演算テーブルの使用領域を重ね合わせたテーブルとして保持するテーブル保持手段と、
シンボルで表された平分および暗号鍵ならびに前記重ね合わせたテーブルに基づいて前記第1演算および前記第2演算を行うことで、シンボルで表された暗号文を生成するシンボル暗号化手段と、
シンボルで表された暗号文を前記対応付けに従ってバイナリデータで表された暗号文に変換する逆シンボル変換手段と、を備える。
The encryption device according to the first aspect of the present invention is:
Symbol conversion means for converting a plaintext and an encryption key represented by binary data into a plaintext and an encryption key represented by a symbol in accordance with the correspondence between the binary data having the first bit width and the second bit width symbol having a predetermined Hamming weight When,
A first operation table in which a symbol corresponding to the output of the first operation is stored at an address indicated by a symbol corresponding to an input of the first operation included in the encryption processing; and a second operation included in the encryption processing The second calculation table in which the symbol corresponding to the output of the second calculation is stored at the address indicated by the symbol corresponding to the input of is overlaid on the unused area of one calculation table with the used area of the other calculation table. Table holding means for holding as a table;
Symbol encryption means for generating a ciphertext represented by a symbol by performing the first operation and the second operation based on the equalization and encryption key represented by the symbol and the superposed table;
Reverse symbol conversion means for converting a ciphertext represented by a symbol into a ciphertext represented by binary data in accordance with the association.

本発明の第2の視点に係る暗号化方法は、
コンピュータが、第1ビット幅のバイナリデータと所定のハミング重みの第2ビット幅のシンボルとの対応付けに従ってバイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換する変換工程と、
暗号化処理に含まれる第1演算の入力に相当するシンボルが示すアドレスに該第1演算の出力に相当するシンボルが格納された第1演算テーブル、および、該暗号化処理に含まれる第2演算の入力に相当するシンボルが示すアドレスに該第2演算の出力に相当するシンボルが格納された第2演算テーブルを、一方の演算テーブルの未使用領域に他方の演算テーブルの使用領域を重ね合わせたテーブルとして記憶部に保持する保持工程と、
シンボルで表された平分および暗号鍵ならびに前記重ね合わせたテーブルに基づいて前記第1演算および前記第2演算を行うことで、シンボルで表された暗号文を生成する生成工程と、
シンボルで表された暗号文を前記対応付けに従ってバイナリデータで表された暗号文に変換する逆変換工程と、を含む。
The encryption method according to the second aspect of the present invention is:
The computer converts the plaintext and the encryption key represented by the binary data into the plaintext and the encryption key represented by the symbol according to the correspondence between the binary data having the first bit width and the symbol having the second bit width having the predetermined Hamming weight. Conversion process;
A first operation table in which a symbol corresponding to the output of the first operation is stored at an address indicated by a symbol corresponding to an input of the first operation included in the encryption processing; and a second operation included in the encryption processing The second calculation table in which the symbol corresponding to the output of the second calculation is stored at the address indicated by the symbol corresponding to the input of is overlaid on the unused area of one calculation table with the used area of the other calculation table. A holding step for holding in the storage unit as a table;
A generation step of generating a ciphertext represented by a symbol by performing the first operation and the second operation based on the equalization and encryption key represented by the symbol and the superposed table;
A reverse conversion step of converting the ciphertext represented by the symbol into a ciphertext represented by binary data according to the association.

本発明の第3の視点に係るプログラムは、
第1ビット幅のバイナリデータと所定のハミング重みの第2ビット幅のシンボルとの対応付けに従ってバイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換する変換処理と、
暗号化処理に含まれる第1演算の入力に相当するシンボルが示すアドレスに該第1演算の出力に相当するシンボルが格納された第1演算テーブル、および、該暗号化処理に含まれる第2演算の入力に相当するシンボルが示すアドレスに該第2演算の出力に相当するシンボルが格納された第2演算テーブルを、一方の演算テーブルの未使用領域に他方の演算テーブルの使用領域を重ね合わせたテーブルとして記憶部に保持する保持処理と、
シンボルで表された平分および暗号鍵ならびに前記重ね合わせたテーブルに基づいて前記第1演算および前記第2演算を行うことで、シンボルで表された暗号文を生成する生成処理と、
シンボルで表された暗号文を前記対応付けに従ってバイナリデータで表された暗号文に変換する逆変換処理と、をコンピュータに実行させる。
なお、プログラムは、非一時的なコンピュータ可読記録媒体(non-transitory computer-readable storage medium)に記録されたプログラム製品として提供することができる。
The program according to the third aspect of the present invention is:
A conversion process for converting a plaintext and an encryption key represented by binary data into a plaintext and an encryption key represented by a symbol according to the association between the binary data having the first bit width and a symbol having a second bit width having a predetermined Hamming weight; ,
A first operation table in which a symbol corresponding to the output of the first operation is stored at an address indicated by a symbol corresponding to an input of the first operation included in the encryption processing; and a second operation included in the encryption processing The second calculation table in which the symbol corresponding to the output of the second calculation is stored at the address indicated by the symbol corresponding to the input of is overlaid on the unused area of one calculation table with the used area of the other calculation table. Holding processing to be stored in the storage unit as a table;
A generation process for generating a ciphertext represented by a symbol by performing the first operation and the second operation based on the equalization and encryption key represented by the symbol and the superposed table;
Inverse conversion processing for converting a ciphertext represented by a symbol into a ciphertext represented by binary data according to the association is executed by a computer.
The program can be provided as a program product recorded on a non-transitory computer-readable storage medium.

本発明に係る暗号化装置、暗号化方法およびプログラムによると、平文および暗号鍵をシンボルに変換した上でテーブル参照によって暗号化処理を行う場合に、テーブルの保持によるメモリ容量の増大を防ぐことが可能となる。   According to the encryption device, the encryption method, and the program according to the present invention, when the plain text and the encryption key are converted into symbols and the encryption process is performed by referring to the table, it is possible to prevent an increase in memory capacity due to holding of the table. It becomes possible.

第1の実施形態に係る暗号化装置の構成を一例として示すブロック図である。It is a block diagram which shows the structure of the encryption apparatus which concerns on 1st Embodiment as an example. 第1の実施形態に係る暗号化装置の暗号化部の構成を一例として示すブロック図である。It is a block diagram which shows the structure of the encryption part of the encryption apparatus which concerns on 1st Embodiment as an example. 第1の実施形態に係る暗号化装置のシンボル変換部の構成を一例として示す図である。It is a figure which shows the structure of the symbol conversion part of the encryption apparatus which concerns on 1st Embodiment as an example. 第1の実施形態に係る暗号化装置における排他的論理和の入出力を表す図である。It is a figure showing the input / output of exclusive OR in the encryption apparatus which concerns on 1st Embodiment. 第1の実施形態に係る暗号化装置における排他的論理和をシンボルによるテーブル実装したときの入出力を表す図である。It is a figure showing the input / output when exclusive OR in the encryption apparatus which concerns on 1st Embodiment mounts the table by a symbol. 第1の実施形態に係る暗号化装置における非線形(2nビットSbox)変換の入出力を表す図である。It is a figure showing the input / output of the nonlinear (2n bit Sbox) conversion in the encryption apparatus which concerns on 1st Embodiment. 第1の実施形態に係る暗号化装置における非線形(2nビットSbox)変換をシンボルによるテーブル実装したときの入出力を表す図である。It is a figure showing the input / output when non-linear (2n bit Sbox) conversion in the encryption apparatus which concerns on 1st Embodiment mounts the table by a symbol. 第1の実施形態に係る暗号化装置における算術加算をシンボルによるテーブル実装したときの入出力を表す図である。It is a figure showing input / output when arithmetic addition in the encryption apparatus which concerns on 1st Embodiment mounts the table by a symbol. 第1の実施形態に係る暗号化装置の逆シンボル変換部の構成を一例として示す図である。It is a figure which shows the structure of the reverse symbol conversion part of the encryption apparatus which concerns on 1st Embodiment as an example. 演算テーブルの重ね合わせについて説明するため図である。It is a figure for demonstrating the superimposition of a calculation table. AES128のフロー図である。It is a flowchart of AES128.

はじめに、一実施形態の概要について説明する。なお、この概要に付記する図面参照符号は、専ら理解を助けるための例示であり、本発明を図示の態様に限定することを意図するものではない。   First, an outline of one embodiment will be described. Note that the reference numerals of the drawings attached to this summary are merely examples for facilitating understanding, and are not intended to limit the present invention to the illustrated embodiment.

図1および図2を参照すると、暗号化装置は、秘密鍵を用いて平文を暗号化して暗号文として出力する暗号化装置であって、平文およびラウンド鍵(以下、暗号鍵ともいう。)のシンボル変換を行うシンボル変換手段(1100)と、シンボルを用いた暗号化を行うシンボル暗号化手段(1200)と、暗号化処理に含まれる演算をテーブル参照に基づいて行うための演算テーブルを保持するテーブル保持手段(1400)と、シンボルから暗号文への逆変換を行う逆シンボル変換手段(1300)と、を備える。   Referring to FIG. 1 and FIG. 2, the encryption device is an encryption device that encrypts plain text using a secret key and outputs it as cipher text, which is a plain text and a round key (hereinafter also referred to as an encryption key). A symbol conversion unit (1100) that performs symbol conversion, a symbol encryption unit (1200) that performs encryption using a symbol, and an operation table for performing an operation included in the encryption process based on a table reference are held. Table holding means (1400) and inverse symbol conversion means (1300) for performing reverse conversion from a symbol to a ciphertext.

シンボル変換手段(1100)は、平文を所定のビット幅の複数のバイナリデータに分割し、各バイナリデータを所定のハミング重みを有する所定のビット幅のシンボルに変換する。シンボル暗号化手段(1200)は、変換されたシンボルを用いて、テーブル保持部(1400)が保持する演算テーブルによって暗号化の演算を行う。演算テーブルには、演算の入力に相当するシンボルが示すアドレス位置に、当該演算の出力に相当するシンボルが格納されている。また、複数の演算テーブルのそれぞれの未使用領域に対して、他の演算テーブルの使用領域を重ね合わせることによって、テーブル中の未使用領域を削減する。   The symbol conversion means (1100) divides the plain text into a plurality of binary data having a predetermined bit width, and converts each binary data into a symbol having a predetermined bit width having a predetermined Hamming weight. The symbol encryption means (1200) performs an encryption operation using an operation table held by the table holding unit (1400) using the converted symbol. In the calculation table, a symbol corresponding to the output of the calculation is stored at an address position indicated by the symbol corresponding to the input of the calculation. Further, the unused areas in the tables are reduced by superimposing the used areas of the other calculation tables on the unused areas of the plurality of calculation tables.

かかる暗号化装置によると、暗号化処理における耐タンパー手法であるDRL(Dual Rail Logic)手法を複数ビット毎に行うことで、処理時間の増加を抑えつつ、演算のテーブル化によって増加する記憶領域(例えば、ROM領域)をテーブルの重ね合わせによって削減することが可能となる。   According to such an encryption apparatus, a DRL (Dual Rail Logic) method, which is a tamper-resistant method in encryption processing, is performed for each of a plurality of bits, thereby suppressing an increase in processing time and increasing a storage area (table storage) ( For example, the ROM area) can be reduced by superimposing the tables.

シンボル変換手段(1100)は、平文およびラウンド鍵を所定の複数のビット幅毎に分割し、シンボルに置換する。シンボルは平文と暗号文を分割したときのビット幅よりも大きい所定のビット幅を有し、かつ、所定の1または2以上のハミング重みを有する。平文と暗号文を分割したときのビット幅のバイナリデータが取り得る値の個数に応じてシンボルを用意し、バイナリデータとシンボルとの対応付けを行う。   The symbol conversion means (1100) divides the plaintext and the round key into a plurality of predetermined bit widths and replaces them with symbols. The symbol has a predetermined bit width larger than the bit width when the plaintext and the ciphertext are divided, and has a predetermined Hamming weight of 1 or 2 or more. Symbols are prepared according to the number of values that can be taken by binary data having a bit width when the plaintext and ciphertext are divided, and the binary data and the symbols are associated with each other.

シンボル暗号化手段(1200)は、暗号化に含まれる演算を全てテーブル参照(テーブル引き)によって実現する。ここで、テーブルの入出に相当するシンボルおよび出力に相当するシンボルは、シンボル単体またはシンボルを連結したビット列のいずれかである。   The symbol encryption means (1200) realizes all operations included in the encryption by referring to the table (table lookup). Here, the symbol corresponding to the input / output of the table and the symbol corresponding to the output are either a single symbol or a bit string obtained by concatenating the symbols.

逆シンボル変換手段(1300)は、シンボルから成る暗号文をシンボルの幅毎に分割し、シンボルに対応するバイナリデータへ変換する。   The inverse symbol conversion means (1300) divides the ciphertext composed of symbols for each symbol width and converts it into binary data corresponding to the symbols.

かかる構成によると、消費電力の差を用いた解析を困難にすることができる。その理由は、演算に用いるバイナリデータを全て所定のハミング重みを有するシンボルに置換することにより、データの違いによる消費電力の差が発生しないからである。   According to such a configuration, analysis using the difference in power consumption can be made difficult. The reason is that, by replacing all binary data used for the calculation with symbols having a predetermined Hamming weight, a difference in power consumption due to a difference in data does not occur.

また、かかる構成によると、平文を複数ビット毎にシンボル変換することにより、演算回数の増加を防ぐことができる。具体的には、1ビット毎にシンボル変換する場合と比較して、複数ビット毎にシンボル変換することにより、演算回数を削減することができる。その理由は、所定のハミング重みを有するシンボルを多数用意することで、多ビット単位でシンボル変換を行うことを可能としたからである。   Further, according to such a configuration, an increase in the number of operations can be prevented by converting the plaintext into symbols for each of a plurality of bits. Specifically, the number of operations can be reduced by performing symbol conversion for each of a plurality of bits as compared to the case of performing symbol conversion for each bit. The reason is that symbol conversion can be performed in units of multiple bits by preparing a large number of symbols having a predetermined Hamming weight.

また、シンボル暗号化手段(1200)による暗号化の演算は、全て演算テーブルを参照することで行われる。演算テーブルの入出力は、シンボル単体またはシンボルを連結したものから構成されている。演算テーブルをアクセスする際のシンボルは不連続な値をとるため、演算テーブル中には多数の未使用領域が生じる。暗号化処理手順に複数の種類の演算が含まれる場合、演算テーブルも複数必要とされ、未使用領域の増大が問題となる。テーブル保持手段(1400)は、各演算テーブルの始端をずらして重ね合わせることにより、一方の演算テーブルの未使用領域に他方の演算テーブルのデータを書き込む。   Also, all encryption operations by the symbol encryption means (1200) are performed by referring to the operation table. The input / output of the operation table is composed of a single symbol or a concatenation of symbols. Since symbols for accessing the calculation table take discontinuous values, a large number of unused areas are generated in the calculation table. When the encryption processing procedure includes a plurality of types of calculations, a plurality of calculation tables are required, and an increase in unused areas becomes a problem. The table holding means (1400) writes the data of the other calculation table in the unused area of one calculation table by shifting the start ends of the calculation tables and overlapping them.

かかる構成を採用し、複数の演算テーブルを一つのテーブルに重ね合わせることにより、テーブルの未使用領域の増加を抑制することができる。   By adopting such a configuration and overlapping a plurality of calculation tables on one table, an increase in unused areas of the table can be suppressed.

本発明によると、演算をテーブル実装することによってできるテーブル中の未使用領域の増加を抑制することができる。その理由は、未使用領域を多数含む複数の演算テーブルを1つに重ね合わせることによって、メモリの浪費を抑制することができるからである。   According to the present invention, it is possible to suppress an increase in unused areas in a table, which can be performed by mounting operations on a table. The reason is that waste of memory can be suppressed by superimposing a plurality of calculation tables including many unused areas.

なお、本発明において、下記の形態が可能である。
[形態1]
前記第1の視点に係る暗号化装置のとおりである。
[形態2]
前記重ね合わせたテーブルは、前記第1演算の入力に相当する複数のシンボルを連結したビット列が示すアドレスに前記第1演算の出力に相当するシンボルが格納され、前記第2演算の入力に相当する複数のシンボルを連結したビット列に所定のオフセットを加えたアドレスに前記第2演算の出力に相当するシンボルが格納されていてもよい。
[形態3]
前記シンボル変換手段は、第1ビット幅のバイナリデータと、所定の複数のハミング重みのいずれかを有する第2ビット幅のシンボルとの対応付けに従って、バイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換してもよい。
[形態4]
前記第1演算および前記第2演算は、前記暗号化処理に含まれる排他的論理和、非線形変換、ガロア体上の乗算、および、算術加算の少なくともいずれかの演算であってもよい。
[形態5]
前記暗号化処理は、AES(Advanced Encryption Standard)に基づく暗号化処理であってもよい。
[形態6]
前記第2の視点に係る暗号化方法のとおりである。
[形態7]
前記暗号化方法において、前記重ね合わせたテーブルは、前記第1演算の入力に相当する複数のシンボルを連結したビット列が示すアドレスに前記第1演算の出力に相当するシンボルが格納され、前記第2演算の入力に相当する複数のシンボルを連結したビット列に所定のオフセットを加えたアドレスに前記第2演算の出力に相当するシンボルが格納されていてもよい。
[形態8]
前記変換工程において、第1ビット幅のバイナリデータと、所定の複数のハミング重みのいずれかを有する第2ビット幅のシンボルとの対応付けに従って、バイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換してもよい。
[形態9]
前記第3の視点に係るプログラムのとおりである。
[形態10]
前記プログラムにおいて、前記重ね合わせたテーブルは、前記第1演算の入力に相当する複数のシンボルを連結したビット列が示すアドレスに前記第1演算の出力に相当するシンボルが格納され、前記第2演算の入力に相当する複数のシンボルを連結したビット列に所定のオフセットを加えたアドレスに前記第2演算の出力に相当するシンボルが格納されていてもよい。
[形態11]
前記変換処理において、第1ビット幅のバイナリデータと、所定の複数のハミング重みのいずれかを有する第2ビット幅のシンボルとの対応付けに従って、バイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換してもよい。
[形態12]
第1ビット幅のバイナリデータと所定のハミング重みの第2ビット幅のシンボルとの対応付けに従ってバイナリデータで表された暗号文および暗号鍵をシンボルで表された暗号文および暗号鍵に変換するシンボル変換手段と、
復号処理に含まれる第1演算の入力に相当するシンボルが示すアドレスに該第1演算の出力に相当するシンボルが格納された第1演算テーブル、および、該復号処理に含まれる第2演算の入力に相当するシンボルが示すアドレスに該第2演算の出力に相当するシンボルが格納された第2演算テーブルを、一方の演算テーブルの未使用領域に他方の演算テーブルの使用領域を重ね合わせたテーブルとして保持するテーブル保持手段と、
シンボルで表された暗号文および暗号鍵ならびに前記重ね合わせたテーブルに基づいて前記第1演算および前記第2演算を行うことで、シンボルで表された平文を生成するシンボル復号手段と、
シンボルで表された平文を前記対応付けに従ってバイナリデータで表された平文に変換する逆シンボル変換手段と、を備える、復号装置。
[形態13]
コンピュータが、第1ビット幅のバイナリデータと所定のハミング重みの第2ビット幅のシンボルとの対応付けに従ってバイナリデータで表された暗号文および暗号鍵をシンボルで表された暗号文および暗号鍵に変換する変換工程と、
復号処理に含まれる第1演算の入力に相当するシンボルが示すアドレスに該第1演算の出力に相当するシンボルが格納された第1演算テーブル、および、該復号処理に含まれる第2演算の入力に相当するシンボルが示すアドレスに該第2演算の出力に相当するシンボルが格納された第2演算テーブルを、一方の演算テーブルの未使用領域に他方の演算テーブルの使用領域を重ね合わせたテーブルとして記憶部に保持する保持工程と、
シンボルで表された暗号文および暗号鍵ならびに前記重ね合わせたテーブルに基づいて前記第1演算および前記第2演算を行うことで、シンボルで表された平文を生成する生成工程と、
シンボルで表された平文を前記対応付けに従ってバイナリデータで表された平文に変換する逆変換工程と、を含む、復号方法。
[形態14]
第1ビット幅のバイナリデータと所定のハミング重みの第2ビット幅のシンボルとの対応付けに従ってバイナリデータで表された暗号文および暗号鍵をシンボルで表された暗号文および暗号鍵に変換する変換処理と、
復号処理に含まれる第1演算の入力に相当するシンボルが示すアドレスに該第1演算の出力に相当するシンボルが格納された第1演算テーブル、および、該復号処理に含まれる第2演算の入力に相当するシンボルが示すアドレスに該第2演算の出力に相当するシンボルが格納された第2演算テーブルを、一方の演算テーブルの未使用領域に他方の演算テーブルの使用領域を重ね合わせたテーブルとして記憶部に保持する保持処理と、
シンボルで表された暗号文および暗号鍵ならびに前記重ね合わせたテーブルに基づいて前記第1演算および前記第2演算を行うことで、シンボルで表された平文を生成する生成処理と、
シンボルで表された平文を前記対応付けに従ってバイナリデータで表された平文に変換する逆変換処理と、をコンピュータに実行させる、プログラム。
In the present invention, the following modes are possible.
[Form 1]
The encryption apparatus according to the first aspect.
[Form 2]
In the superimposed table, a symbol corresponding to the output of the first calculation is stored at an address indicated by a bit string obtained by connecting a plurality of symbols corresponding to the input of the first calculation, and corresponds to the input of the second calculation. A symbol corresponding to the output of the second calculation may be stored at an address obtained by adding a predetermined offset to a bit string obtained by concatenating a plurality of symbols.
[Form 3]
The symbol conversion means converts the plaintext and the encryption key represented by the binary data into symbols according to the association between the binary data having the first bit width and the second bit width symbol having any one of a plurality of predetermined Hamming weights. It may be converted into a plaintext and an encryption key represented by
[Form 4]
The first operation and the second operation may be at least one of exclusive OR, nonlinear transformation, multiplication on a Galois field, and arithmetic addition included in the encryption process.
[Form 5]
The encryption process may be an encryption process based on AES (Advanced Encryption Standard).
[Form 6]
The encryption method according to the second aspect is as described above.
[Form 7]
In the encryption method, the superimposed table stores a symbol corresponding to the output of the first calculation at an address indicated by a bit string obtained by concatenating a plurality of symbols corresponding to the input of the first calculation. A symbol corresponding to the output of the second calculation may be stored at an address obtained by adding a predetermined offset to a bit string obtained by concatenating a plurality of symbols corresponding to the input of the calculation.
[Form 8]
In the conversion step, according to the correspondence between the binary data having the first bit width and the second bit width symbol having any of a plurality of predetermined Hamming weights, the plaintext and the encryption key represented by the binary data are represented by symbols. You may convert into the plaintext and encryption key represented.
[Form 9]
The program according to the third aspect.
[Mode 10]
In the program, the superimposed table stores a symbol corresponding to the output of the first calculation at an address indicated by a bit string obtained by connecting a plurality of symbols corresponding to the input of the first calculation. A symbol corresponding to the output of the second calculation may be stored at an address obtained by adding a predetermined offset to a bit string obtained by concatenating a plurality of symbols corresponding to the input.
[Form 11]
In the conversion process, according to the association between the binary data having the first bit width and the second bit width symbol having any of a plurality of predetermined Hamming weights, the plaintext and the encryption key represented by the binary data are represented by symbols. You may convert into the plaintext and encryption key represented.
[Form 12]
Symbol for converting ciphertext and cipher key represented by binary data into ciphertext and cipher key represented by symbol according to association between binary data of first bit width and second bit width symbol of predetermined Hamming weight Conversion means;
A first calculation table in which a symbol corresponding to the output of the first calculation is stored at an address indicated by a symbol corresponding to the input of the first calculation included in the decoding process, and an input of the second calculation included in the decoding process A table in which a symbol corresponding to the output of the second calculation is stored at an address indicated by a symbol corresponding to is a table in which a use area of the other calculation table is superimposed on an unused area of one calculation table. Table holding means for holding;
Symbol decryption means for generating plaintext represented by a symbol by performing the first computation and the second computation based on the ciphertext and encryption key represented by the symbol and the superposed table;
And a reverse symbol conversion unit that converts plain text represented by symbols into plain text represented by binary data according to the association.
[Form 13]
The computer converts the ciphertext and cipher key represented by the binary data into ciphertext and cipher key represented by the symbol in accordance with the correspondence between the binary data having the first bit width and the symbol having the second bit width having the predetermined Hamming weight. A conversion process to convert;
A first calculation table in which a symbol corresponding to the output of the first calculation is stored at an address indicated by a symbol corresponding to the input of the first calculation included in the decoding process, and an input of the second calculation included in the decoding process A table in which a symbol corresponding to the output of the second calculation is stored at an address indicated by a symbol corresponding to is a table in which a use area of the other calculation table is superimposed on an unused area of one calculation table. Holding process to hold in the storage unit;
Generating a plaintext represented by a symbol by performing the first operation and the second operation based on the ciphertext and encryption key represented by the symbol and the superimposed table;
A reverse conversion step of converting plain text represented by symbols into plain text represented by binary data in accordance with the association.
[Form 14]
Conversion for converting ciphertext and cipher key represented by binary data into ciphertext and cipher key represented by symbols according to the correspondence between the binary data having the first bit width and symbols having the second bit width having a predetermined Hamming weight Processing,
A first calculation table in which a symbol corresponding to the output of the first calculation is stored at an address indicated by a symbol corresponding to the input of the first calculation included in the decoding process, and an input of the second calculation included in the decoding process A table in which a symbol corresponding to the output of the second calculation is stored at an address indicated by a symbol corresponding to is a table in which a use area of the other calculation table is superimposed on an unused area of one calculation table. A holding process held in the storage unit;
Generation processing for generating plaintext represented by a symbol by performing the first operation and the second operation based on the ciphertext and encryption key represented by the symbol and the superimposed table;
A program that causes a computer to execute reverse conversion processing for converting plain text represented by symbols into plain text represented by binary data in accordance with the association.

(実施形態1)
第1の実施形態に係る暗号化装置について、図面を参照して説明する。
(Embodiment 1)
The encryption device according to the first embodiment will be described with reference to the drawings.

図1は、本実施形態に係る暗号化装置の構成を一例として示すブロック図である。図1を参照すると、暗号化装置は、暗号化部1000および鍵生成部2000を備える。なお、以下では、平文を暗号化して暗号文を生成する暗号化装置について説明するが、同様にして、暗号文を復号して平文を生成する復号装置を実現することができる。   FIG. 1 is a block diagram illustrating an example of the configuration of the encryption device according to the present embodiment. Referring to FIG. 1, the encryption apparatus includes an encryption unit 1000 and a key generation unit 2000. In the following, an encryption apparatus that encrypts plain text and generates cipher text will be described, but similarly, a decryption apparatus that decrypts cipher text and generates plain text can be realized.

鍵生成部2000は、入力された秘密鍵をもとに、暗号化部1000で使用するラウンド鍵Knを生成する。   The key generation unit 2000 generates a round key Kn used by the encryption unit 1000 based on the input secret key.

暗号化部1000は、入力された平文と鍵生成部2000から受け取るラウンド鍵Knをもとに、データを暗号化し、暗号文を出力する。   The encryption unit 1000 encrypts data based on the input plaintext and the round key Kn received from the key generation unit 2000, and outputs a ciphertext.

図2は、暗号化部1000の構成を一例として示すブロック図である。図2を参照すると、暗号化部1000は、シンボル変換部1100、シンボル暗号化部1200、逆シンボル変換部1300、および、テーブル保持部1400を備える。   FIG. 2 is a block diagram illustrating the configuration of the encryption unit 1000 as an example. Referring to FIG. 2, the encryption unit 1000 includes a symbol conversion unit 1100, a symbol encryption unit 1200, an inverse symbol conversion unit 1300, and a table holding unit 1400.

まず、シンボル変換部1100は、平文をシンボルに変換する。   First, the symbol conversion unit 1100 converts a plain text into a symbol.

次に、シンボル暗号化部1200は、暗号アルゴリズムに則して暗号化処理を行う。シンボル暗号化部1200は、暗号化の演算方法として、テーブル保持部1400が保持する演算テーブルをシンボルで参照し、演算結果をシンボルで受け取る。   Next, the symbol encryption unit 1200 performs encryption processing in accordance with an encryption algorithm. As an encryption calculation method, the symbol encryption unit 1200 refers to the calculation table held by the table holding unit 1400 with a symbol, and receives the calculation result as a symbol.

シンボルでの暗号化が終了すると、逆シンボル変換部1300は、シンボルから暗号文への変換を行う。   When the encryption with the symbol is completed, the inverse symbol conversion unit 1300 performs conversion from the symbol to the ciphertext.

図3は、シンボル変換部1100の構成を一例として示すブロック図である。図3を参照すると、シンボル変換部1100は、nビットのバイナリデータとシンボルとの対応付けを示す変換テーブル1101を保持している。   FIG. 3 is a block diagram illustrating an example of the configuration of the symbol conversion unit 1100. Referring to FIG. 3, the symbol conversion unit 1100 holds a conversion table 1101 indicating the correspondence between n-bit binary data and symbols.

シンボルとして、mビットから成るビット列であって所定の(一種または複数種の)ハミング重みを有するものを予め選んでおいて、nビットのバイナリデータに割り付ける。   As a symbol, a bit string consisting of m bits and having a predetermined (one or a plurality of types) of Hamming weights is selected in advance and assigned to n-bit binary data.

シンボル変換部1100は、入力された平文またはラウンド鍵をnビット(1<n)毎に分割する。また、シンボル変換部1100は、nビットに分割された入力値を、変換テーブル1101を参照してシンボルに変換する。   The symbol conversion unit 1100 divides the input plaintext or round key every n bits (1 <n). Also, the symbol conversion unit 1100 converts the input value divided into n bits into a symbol with reference to the conversion table 1101.

シンボルのビット幅mとして、nよりも大きく2nよりも小さい値を選択することが好ましい。また、シンボルのハミング重みの種類が少ないほうが、消費電力のばらつきは小さくなる。例えば、ハミング重みが1種類の場合、消費電力のばらつきはゼロとなる。消費電力のばらつきが小さくなるに従って、差分電力解析に基づく攻撃は困難となる。   It is preferable to select a value larger than n and smaller than 2n as the bit width m of the symbol. Also, the variation in power consumption becomes smaller as the number of symbol Hamming weights is smaller. For example, when there is one kind of hamming weight, the variation in power consumption is zero. Attacks based on differential power analysis become more difficult as power consumption variation decreases.

シンボル暗号化部1200は、シンボル変換部1100で変換されたシンボルを入力とし暗号アルゴリズムに則して暗号化の演算を行う。シンボル暗号化部1200は、暗号化処理に含まれる演算を、いずれも、テーブル保持部1400に格納されたテーブルを参照することによって行う。テーブル保持部1400は、当該暗号化アルゴリズムで必要な全ての演算の入出力をテーブル(演算テーブル)として保持している。   The symbol encryption unit 1200 receives the symbol converted by the symbol conversion unit 1100 as input, and performs an encryption operation in accordance with an encryption algorithm. The symbol encryption unit 1200 performs all operations included in the encryption process by referring to the table stored in the table holding unit 1400. The table holding unit 1400 holds input / output of all operations necessary for the encryption algorithm as a table (calculation table).

以下では、演算のテーブル化の例として、排他的論理和(XOR)、非線形変換、ガロア体上の乗算、および、算術加算について説明する。   In the following, exclusive OR (XOR), nonlinear transformation, multiplication on a Galois field, and arithmetic addition will be described as examples of calculation table formation.

図4および図5を用いて、排他的論理和のテーブル実装例を示す。   An example of an exclusive OR table implementation will be described with reference to FIGS.

図4は、排他的論理和の入出力を表した図である。シンボルのビット幅をmビットとしたとき、排他的論理和はmビット×xの入力1、入力2を入力とし、mビット×xの演算結果を出力する。図5は、排他的論理和をシンボルに基づくテーブルで実装した場合を示す。シンボル暗号化部1200は、mビットの入力1と入力2とを連結したものを入力(添字、アドレス)とし、テーブル参照を行い、mビットの出力を得る。   FIG. 4 is a diagram showing exclusive OR input / output. When the bit width of the symbol is m bits, the exclusive logical sum takes the input 1 and the input 2 of m bits × x and outputs the operation result of m bits × x. FIG. 5 shows a case where exclusive OR is implemented using a table based on symbols. The symbol encryption unit 1200 uses an input (subscript, address) obtained by concatenating an m-bit input 1 and an input 2 and performs table lookup to obtain an m-bit output.

シンボル暗号化部1200は、これをx回繰り返して、出力を連結することで、mビット×xの出力を得る。   The symbol encryption unit 1200 repeats this x times and concatenates the outputs to obtain an output of m bits × x.

次に、図6および図7を用いて、シンボルのビット幅がmビットであり、バイナリデータのビット幅をnビットとしたとき、2nビットの非線形(Sbox)変換のテーブル実装例を示す。   Next, using FIG. 6 and FIG. 7, a table implementation example of 2n-bit non-linear (Sbox) conversion when the bit width of a symbol is m bits and the bit width of binary data is n bits is shown.

図6は、非線形(Sbox)変換の入出力を表す。非線形変換は2nビットのデータを入力とし2nビットのデータを出力する。図7は、非線形変換をシンボルに基づくテーブルで実装した場合を示す。シンボル暗号化部1200は、mビットのシンボル2つ分を連結したものを入力(添字)として2つのテーブル(上位ビットテーブル、下位ビットテーブル)を参照し、それぞれmビットの出力を得る。シンボル暗号化部1200は、これらの出力を連結して、2mビットの出力を得る。   FIG. 6 shows input / output of nonlinear (Sbox) transformation. In the non-linear conversion, 2n-bit data is input and 2n-bit data is output. FIG. 7 shows a case where non-linear transformation is implemented with a table based on symbols. The symbol encryption unit 1200 refers to two tables (an upper bit table and a lower bit table) with an input (subscript) obtained by concatenating two m-bit symbols, and obtains an m-bit output. The symbol encryption unit 1200 concatenates these outputs to obtain a 2m-bit output.

ガロア体上の乗算の入出力の構造は、図6に示した非線形変換と同一である。暗号アルゴリズムに応じて2倍乗算、3倍乗算等の必要な乗算を用意する。なお、3倍乗算については、2倍乗算後に自身と排他的論理和をとる演算に置換することができる。   The structure of input / output of multiplication on the Galois field is the same as the nonlinear transformation shown in FIG. Necessary multiplications such as double multiplication and triple multiplication are prepared according to the encryption algorithm. Note that triple multiplication can be replaced with an operation that performs exclusive OR with itself after double multiplication.

次に、図8を参照して、算術加算のテーブル実装について説明する。図8は、算術加算のテーブル実装1430を示す。シンボル暗号化部1200は、算術加算を行う場合、入力をシンボルのビット幅(mビット)単位に分割し、下位側から処理する。シンボル暗号化部1200は、mビットの入力1と入力2とを連結したものを入力(添字)とし、mビット内での算術加算用テーブルを参照し、mビットの出力を得る。また、シンボル暗号化部1200は、mビットを越えた繰り上がり用テーブルを参照し、繰り上がりの有無を取得する。シンボル暗号化部1200は、次のシンボル単位の算術加算を行う際、まず、前段の繰り上がり値と入力1とを算術加算し、この結果と入力2とを算術加算する。なお、ここでの2回の算術加算において、繰り上がりは最大でも1回しか発生しない。   Next, a table implementation for arithmetic addition will be described with reference to FIG. FIG. 8 shows a table implementation 1430 for arithmetic addition. When performing arithmetic addition, the symbol encryption unit 1200 divides the input into units of symbol bit widths (m bits) and processes them from the lower side. The symbol encryption unit 1200 uses an input (subscript) obtained by concatenating an m-bit input 1 and an input 2, and obtains an m-bit output by referring to an arithmetic addition table within m bits. Also, the symbol encryption unit 1200 refers to the carry table exceeding m bits and acquires the presence / absence of carry. When performing symbol-wise arithmetic addition for the next symbol unit, the symbol encryption unit 1200 first arithmetically adds the carry value of the previous stage and the input 1, and arithmetically adds the result and the input 2. In addition, in the two arithmetic additions here, the carry occurs only once at the maximum.

また、算術加算を2回行う方法の他に、「入力1+入力2+1」のmビット内での算術加算用テーブル、および、mビットを越えた繰り上がり用テーブルを用意しておいて、前段の繰り上がりの有無に応じて、参照するテーブルを切り替えるようにしてもよい。さらに、繰り上がりを表すシンボルとして、mビットのシンボルを用いる代わりに、0に対して01、1に対して10という2ビットのシンボルを用いてもよい。   In addition to the method of performing arithmetic addition twice, an arithmetic addition table within m bits of “input 1 + input 2 + 1” and a carry table exceeding m bits are prepared. You may make it switch the table to refer according to the presence or absence of a carry. Furthermore, instead of using m-bit symbols as symbols representing carry, 2-bit symbols such as 01 for 0 and 10 for 1 may be used.

図9は、逆シンボル変換部1300の構成を一例として示すブロック図である。図9を参照すると、逆シンボル変換部1300は、シンボル暗号化1200の出力を受け取る。逆シンボル変換部1300は、受け取ったデータをシンボルのビット幅(mビット)毎に分割し、シンボル変換部1100の変換テーブル1101(図3)を逆引きして、シンボルからnビットの暗号文に変換する。なお、シンボルから暗号文に変換するための逆引き用のテーブルを別途用意してもよい。   FIG. 9 is a block diagram illustrating an example of the configuration of the inverse symbol conversion unit 1300. Referring to FIG. 9, the inverse symbol conversion unit 1300 receives the output of the symbol encryption 1200. The inverse symbol conversion unit 1300 divides the received data for each symbol bit width (m bits), reversely converts the conversion table 1101 (FIG. 3) of the symbol conversion unit 1100, and converts the symbol into an n-bit ciphertext. Convert. A reverse lookup table for converting symbols into ciphertexts may be prepared separately.

図10は、複数の演算テーブルの重ね合わせについて説明するための図である。演算をテーブル実装したときの各演算テーブルは、いずれも同一のインタフェースを有する。すなわち、各演算テーブルは、シンボル2つ分のビット幅の入力と、シンボル1つ分の出力を有する。また、各演算テーブルはシンボルを添字(またはアドレス)としてアクセスされる。シンボルは所定の1または複数のハミング重みを有するため、不連続な値をとる。このとき、演算テーブルには、未使用領域が生じる。そこで、複数の演算テーブルの始点をオフセットすることによって、演算テーブルの未使用領域に他の演算テーブルのデータを代入する。なお、出力のビット幅がそろっていれば、テーブルの重ね合わせの対象となり得る。   FIG. 10 is a diagram for explaining the superposition of a plurality of calculation tables. Each calculation table when the calculation is implemented as a table has the same interface. That is, each calculation table has an input with a bit width of two symbols and an output of one symbol. Each calculation table is accessed using a symbol as a subscript (or address). Since the symbol has a predetermined one or more Hamming weights, the symbol takes a discontinuous value. At this time, an unused area is generated in the calculation table. Therefore, by offsetting the start points of the plurality of calculation tables, the data of other calculation tables are substituted into unused areas of the calculation tables. If the output bit widths are the same, the table can be superposed.

第1の実施形態に係る暗号化装置の実施例を、暗号化処理として128ビットAES(Advanced Encryption Standard)(AES128)を用いた場合について具体的に説明する。   An example of the encryption apparatus according to the first embodiment will be specifically described in a case where 128-bit AES (Advanced Encryption Standard) (AES128) is used as the encryption process.

本実施例では、4ビットのバイナリデータを、ハミング重みが3である6ビットのシンボルに割り当てるものとする。4ビットのバイナリデータが取り得る値は0から15(0xF)の16種である。一方、6ビットでハミング重みが3のシンボルは20種である。これらの20種のシンボルのうちの16種に対して、バイナリデータ0000〜1111(すなわち、数値0から15(0xF))を割り付ける。表1は、このときの変換テーブル1101を一例として示す。表1において、バイナリデータの欄が×のシンボルは未使用のシンボルである。   In this embodiment, it is assumed that 4-bit binary data is assigned to a 6-bit symbol having a Hamming weight of 3. There are 16 types of values from 0 to 15 (0xF) that the 4-bit binary data can take. On the other hand, there are 20 symbols with 6 bits and a Hamming weight of 3. Binary data 0000 to 1111 (that is, numerical values 0 to 15 (0xF)) are assigned to 16 of these 20 symbols. Table 1 shows the conversion table 1101 at this time as an example. In Table 1, symbols with x in the binary data column are unused symbols.

Figure 2014116897
Figure 2014116897

表1においては、シンボルが有するハミング重みを1つのみとしたが、シンボルが有するハミング重みの種類を複数としてもよい。例えば、ビット幅5のビット列のうちの、ハミング重みが2と3のものを選択してシンボルとしてもよい。表2は、このときの変換テーブル1101を一例として示す。表2において、バイナリデータの欄が×のシンボルは未使用のシンボルである。   In Table 1, the symbol has only one hamming weight, but the symbol may have a plurality of types of hamming weights. For example, a bit string having a bit width of 5 and having a Hamming weight of 2 and 3 may be selected as a symbol. Table 2 shows the conversion table 1101 at this time as an example. In Table 2, a symbol with a cross in the binary data column is an unused symbol.

Figure 2014116897
Figure 2014116897

シンボルが有するハミング重みの種類を増やすことで、ハミング重みに着目した攻撃への耐性は弱まるものの、シンボルを構成するビット数を削減することができ、暗号化処理をテーブル参照に基づいて実装する際のテーブルのサイズを小さくすることが可能となる。なお、以下では、表1に示した変換テーブル1101を用いる場合について説明する。   By increasing the types of hamming weights that symbols have, the resistance to attacks focusing on hamming weights is reduced, but the number of bits that make up symbols can be reduced, and when implementing encryption processing based on table references It is possible to reduce the size of the table. Hereinafter, a case where the conversion table 1101 shown in Table 1 is used will be described.

図2のシンボル変換部1100は、読み込んだ平文を4ビット毎に分割し、シンボルに変換する。このとき、平文128ビット(=32×4ビット)は、192ビット(=32個のシンボル×6ビット)に変換される。   The symbol conversion unit 1100 in FIG. 2 divides the read plaintext into 4 bits and converts them into symbols. At this time, 128 bits of plaintext (= 32 × 4 bits) are converted into 192 bits (= 32 symbols × 6 bits).

次に、シンボル暗号化部1200は、シンボルで暗号化を行う。AddRoundKey演算では、128ビットの平文と128のラウンド鍵の排他的論理和を行う。ここでは、シンボル(6ビット)毎に32回のテーブル参照を行うことで、排他的論理和の演算結果を求める。   Next, the symbol encryption unit 1200 performs encryption with symbols. In the AddRoundKey operation, exclusive OR of 128-bit plaintext and 128 round keys is performed. Here, the result of exclusive OR operation is obtained by referring to the table 32 times for each symbol (6 bits).

図5のテーブル実装1411の引数1が平文をシンボルに変換したものに相当し、引数2がラウンド鍵をシンボルに変換したものに相当する。シンボル暗号化部1200は、これらの引数1と引数2とを連結し、連結した値で排他的論理和のテーブル(図5)を参照する。返却値は、シンボル変換する前の値を(4ビット分)排他的論理和したときの値に対応するシンボルである。シンボル暗号化部1200は、このテーブル参照を32回行い、結果を接続する。   The argument 1 in the table implementation 1411 in FIG. 5 corresponds to a plaintext converted into a symbol, and an argument 2 corresponds to a round key converted into a symbol. The symbol encryption unit 1200 concatenates these argument 1 and argument 2 and refers to the exclusive OR table (FIG. 5) with the concatenated value. The return value is a symbol corresponding to a value obtained by exclusive ORing the values before symbol conversion (for 4 bits). The symbol encryption unit 1200 performs this table reference 32 times and connects the results.

SubBytes演算では、中間文をシンボル2つ分ずつ処理する。図7のテーブル実装1421のS1、S2はオリジナルのSbox演算の値を上位4ビット、下位4ビットに分割しシンボルに変換したテーブルである。シンボル暗号化部1200は、中間文のシンボル2つを用いてS1、S2のテーブルを参照し、返却値を連結する。   In the SubBytes operation, the intermediate sentence is processed by two symbols. S1 and S2 of the table implementation 1421 in FIG. 7 are tables in which the original Sbox operation value is divided into upper 4 bits and lower 4 bits and converted into symbols. The symbol encryption unit 1200 refers to the S1 and S2 tables using two intermediate sentence symbols and concatenates the return values.

ShiftRows演算は、中間文のシンボル2つ分毎に区切っての並び替えである。一例として、SubBytes演算等の演算結果を格納する際に並び替えが可能である。   The ShiftRows operation is a rearrangement by dividing every two symbols of the intermediate sentence. As an example, rearrangement is possible when storing a calculation result such as a SubBytes calculation.

MixColumns演算は、SubBytes演算と同様に中間文をシンボル2つ分ずつ処理する。シンボル暗号化部1200は、ガロア体上の乗算テーブルを参照することでMixColumns演算を行う。   The MixColumns operation processes the intermediate sentence by two symbols in the same manner as the SubBytes operation. The symbol encryption unit 1200 performs a MixColumns operation by referring to a multiplication table on the Galois field.

図11に従って処理をラウンド数分繰り返すと、シンボルで構成された暗号文が得られる。   When the process is repeated for the number of rounds according to FIG. 11, a ciphertext composed of symbols is obtained.

図9の逆シンボル変換1300は、シンボルで構成された暗号文を、元のバイナリデータで構成された暗号文に変換する。   The inverse symbol conversion 1300 in FIG. 9 converts a ciphertext composed of symbols into a ciphertext composed of original binary data.

次に、暗号化処理における演算をテーブル実装したときのサイズについて説明する。   Next, the size when the computation in the encryption process is implemented as a table will be described.

テーブルのインタフェースは全て共通で、2つのシンボル(6ビット×2)を連結した値を入力とし、1つのシンボル(6ビット)を返却する。   All the interfaces in the table are common, and a value obtained by concatenating two symbols (6 bits × 2) is input, and one symbol (6 bits) is returned.

2つのシンボルを連結した値でアクセスするため、要素数は2^12(=4096)必要となる。   In order to access with a value obtained by concatenating two symbols, the number of elements is 2 ^ 12 (= 4096).

1つのシンボルが取り得る値は16通りであるため、2つのシンボルを連結したものが取り得る値は256(=16×16)通りである。したがって、1つのテーブルで4096要素が必要となるものの、有効な値が設定されるのは256要素に過ぎない。   Since there are 16 possible values for one symbol, 256 (= 16 × 16) possible values are obtained by concatenating two symbols. Therefore, although 4096 elements are required in one table, only 256 elements can be set as valid values.

AESでの排他的論理和(XOR)演算、SubBytes(Sbox)演算、MixColumns演算におけるガロア体上の2倍乗算をそれぞれテーブル実装する場合には、下記の5つの演算テーブル1〜5が必要となる。   The following five operation tables 1 to 5 are required to implement double multiplication on a Galois field in the exclusive OR (XOR) operation, SubBytes (Sbox) operation, and MixColumns operation in AES. .

演算テーブル1:XOR演算
演算テーブル2:Sbox演算(上位4ビット分用)
演算テーブル3:Sbox演算(下位4ビット分用)
演算テーブル4:2倍乗算(上位4ビット分用)
演算テーブル5:2倍乗算(下位4ビット分用)
Operation table 1: XOR operation Operation table 2: Sbox operation (for upper 4 bits)
Calculation table 3: Sbox calculation (for lower 4 bits)
Calculation table 4: Double multiplication (for upper 4 bits)
Calculation table 5: Double multiplication (for lower 4 bits)

ここで、演算テーブル2〜5の始端を演算テーブル1の始端からそれぞれ10,20,636,646要素ずつ後方にずらして、演算テーブル1に重ね合わせることにより、未使用であった位置にそれぞれのデータを格納することができる。このとき、4742(=4096+646)要素中に1280(=256×5)個のデータを格納することができる。   Here, the start edges of the calculation tables 2 to 5 are shifted backward by 10, 20, 636, and 646 elements from the start edge of the calculation table 1, respectively, and superimposed on the calculation table 1, so that the respective unused positions are placed at the unused positions. Data can be stored. At this time, 1280 (= 256 × 5) data can be stored in 4742 (= 4096 + 646) elements.

1つの要素に1つのシンボルを格納するため、1要素のサイズは1バイトとなる。したがって、5つの演算テーブルを保持するために4742バイトの記憶容量が必要となる。演算テーブルの重ね合わせを行わなかった場合には、20480(=4096×5)バイトの記憶容量が必要となることから、演算テーブルの重ね合わせにより、演算テーブルを保持するための記憶容量を1/4以下に削減することができる。   Since one symbol is stored in one element, the size of one element is 1 byte. Therefore, a storage capacity of 4742 bytes is required to hold five calculation tables. If the calculation tables are not overlapped, a storage capacity of 20480 (= 4096 × 5) bytes is required. Therefore, the storage capacity for holding the calculation tables is reduced by the overlap of the calculation tables. It can be reduced to 4 or less.

表3は、演算テーブルの重ね合わせを行わない場合と行った場合のそれぞれにおいて、演算テーブルを保持するのに必要とされる記憶容量を示す。表3を参照すると、複数の演算テーブルを重ね合わせることにより、演算テーブルを保持するための記憶領域を大幅に削減できることが分かる。   Table 3 shows the storage capacity required to hold the calculation table in each of the cases where the calculation tables are not overlapped and when the calculation tables are not overlapped. Referring to Table 3, it can be seen that by overlapping a plurality of calculation tables, the storage area for holding the calculation tables can be significantly reduced.

Figure 2014116897
Figure 2014116897

なお、演算テーブルの先頭から初めて有効な値が格納されている位置(456番目)までの要素と、最後に有効な値が格納された位置(後ろから456番目)から終端までの要素は、参照されない。したがって、これらの要素を削除することができる。これらの要素を削除することにより、演算テーブル単体では、記憶容量を3186(=4096−455−455)バイトまで削減することができる。また、これらの要素を削除した場合、演算テーブルの重ね合わせを行わないときには、記憶容量は演算テーブル5つで15930バイト必要となる。一方、演算テーブル5つを重ね合わせた場合には、記憶容量を3832(=4742−455−455)バイトまで削減することができる(表4参照)。   Refer to the elements from the beginning of the calculation table to the position where the first valid value is stored (456th) and the elements from the position where the last valid value is stored (the 456th from the back) to the end. Not. Therefore, these elements can be deleted. By deleting these elements, it is possible to reduce the storage capacity to 3186 (= 4096-455-455) bytes in the calculation table alone. In addition, when these elements are deleted, if the calculation tables are not overlapped, the storage capacity is 15930 bytes for five calculation tables. On the other hand, when five calculation tables are overlapped, the storage capacity can be reduced to 3832 (= 4742−455−455) bytes (see Table 4).

Figure 2014116897
Figure 2014116897

なお、上記の特許文献等の先行技術文献の各開示を、本書に引用をもって繰り込むものとする。本発明の全開示(請求の範囲を含む)の枠内において、さらにその基本的技術思想に基づいて、実施形態の変更・調整が可能である。また、本発明の請求の範囲の枠内において種々の開示要素(各請求項の各要素、各実施形態の各要素、各図面の各要素等を含む)の多様な組み合わせ、ないし、選択が可能である。すなわち、本発明は、請求の範囲を含む全開示、技術的思想にしたがって当業者であればなし得るであろう各種変形、修正を含むことは勿論である。特に、本書に記載した数値範囲については、当該範囲内に含まれる任意の数値ないし小範囲が、別段の記載のない場合でも具体的に記載されているものと解釈されるべきである。   It should be noted that the disclosures of prior art documents such as the above patent documents are incorporated herein by reference. Within the scope of the entire disclosure (including claims) of the present invention, the embodiment can be changed and adjusted based on the basic technical concept. Further, various combinations or selections of various disclosed elements (including each element of each claim, each element of each embodiment, each element of each drawing, etc.) are possible within the scope of the claims of the present invention. It is. That is, the present invention of course includes various variations and modifications that could be made by those skilled in the art according to the entire disclosure including the claims and the technical idea. In particular, with respect to the numerical ranges described in this document, any numerical value or small range included in the range should be construed as being specifically described even if there is no specific description.

1000 暗号化部
1100 シンボル変換部
1101 変換テーブル
1200 シンボル暗号化部
1300 逆シンボル変換部
1400 テーブル保持部
1410 排他的論理和
1411 排他的論理和のテーブル実装
1420 非線形変換
1421 非線形変換のテーブル実装
1430 算術加算のテーブル実装
2000 鍵生成部
3000 演算テーブルの重ね合わせ
4000 AES128フロー図
1000 Encryption unit 1100 Symbol conversion unit 1101 Conversion table 1200 Symbol encryption unit 1300 Inverse symbol conversion unit 1400 Table holding unit 1410 Exclusive OR 1411 Exclusive OR table implementation 1420 Non-linear transformation 1421 Non-linear transformation table implementation 1430 Arithmetic addition Table implementation 2000 Key generation unit 3000 Calculation table superposition 4000 AES128 flow diagram

Claims (10)

第1ビット幅のバイナリデータと所定のハミング重みの第2ビット幅のシンボルとの対応付けに従ってバイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換するシンボル変換手段と、
暗号化処理に含まれる第1演算の入力に相当するシンボルが示すアドレスに該第1演算の出力に相当するシンボルが格納された第1演算テーブル、および、該暗号化処理に含まれる第2演算の入力に相当するシンボルが示すアドレスに該第2演算の出力に相当するシンボルが格納された第2演算テーブルを、一方の演算テーブルの未使用領域に他方の演算テーブルの使用領域を重ね合わせたテーブルとして保持するテーブル保持手段と、
シンボルで表された平分および暗号鍵ならびに前記重ね合わせたテーブルに基づいて前記第1演算および前記第2演算を行うことで、シンボルで表された暗号文を生成するシンボル暗号化手段と、
シンボルで表された暗号文を前記対応付けに従ってバイナリデータで表された暗号文に変換する逆シンボル変換手段と、を備える、暗号化装置。
Symbol conversion means for converting a plaintext and an encryption key represented by binary data into a plaintext and an encryption key represented by a symbol in accordance with the correspondence between the binary data having the first bit width and the second bit width symbol having a predetermined Hamming weight When,
A first operation table in which a symbol corresponding to the output of the first operation is stored at an address indicated by a symbol corresponding to an input of the first operation included in the encryption processing; and a second operation included in the encryption processing The second calculation table in which the symbol corresponding to the output of the second calculation is stored at the address indicated by the symbol corresponding to the input of is overlaid on the unused area of one calculation table with the used area of the other calculation table. Table holding means for holding as a table;
Symbol encryption means for generating a ciphertext represented by a symbol by performing the first operation and the second operation based on the equalization and encryption key represented by the symbol and the superposed table;
And a reverse symbol conversion unit configured to convert a ciphertext represented by a symbol into a ciphertext represented by binary data in accordance with the association.
前記重ね合わせたテーブルは、前記第1演算の入力に相当する複数のシンボルを連結したビット列が示すアドレスに前記第1演算の出力に相当するシンボルが格納され、前記第2演算の入力に相当する複数のシンボルを連結したビット列に所定のオフセットを加えたアドレスに前記第2演算の出力に相当するシンボルが格納されている、請求項1に記載の暗号化装置。   In the superimposed table, a symbol corresponding to the output of the first calculation is stored at an address indicated by a bit string obtained by connecting a plurality of symbols corresponding to the input of the first calculation, and corresponds to the input of the second calculation. The encryption device according to claim 1, wherein a symbol corresponding to the output of the second operation is stored at an address obtained by adding a predetermined offset to a bit string obtained by concatenating a plurality of symbols. 前記シンボル変換手段は、第1ビット幅のバイナリデータと、所定の複数のハミング重みのいずれかを有する第2ビット幅のシンボルとの対応付けに従って、バイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換する、請求項1または2に記載の暗号化装置。   The symbol conversion means converts the plaintext and the encryption key represented by the binary data into symbols according to the association between the binary data having the first bit width and the second bit width symbol having any one of a plurality of predetermined Hamming weights. The encryption device according to claim 1, wherein the encryption device converts the data into a plaintext and an encryption key represented by: 前記第1演算および前記第2演算は、前記暗号化処理に含まれる排他的論理和、非線形変換、ガロア体上の乗算、および、算術加算の少なくともいずれかの演算である、請求項1ないし3のいずれか1項に記載の暗号化装置。   4. The first operation and the second operation are at least one of exclusive OR, nonlinear transformation, multiplication on a Galois field, and arithmetic addition included in the encryption process. 5. The encryption device according to any one of the above. 前記暗号化処理は、AES(Advanced Encryption Standard)に基づく暗号化処理である、請求項1ないし4のいずれか1項に記載の暗号化装置。   5. The encryption apparatus according to claim 1, wherein the encryption process is an encryption process based on AES (Advanced Encryption Standard). コンピュータが、第1ビット幅のバイナリデータと所定のハミング重みの第2ビット幅のシンボルとの対応付けに従ってバイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換する変換工程と、
暗号化処理に含まれる第1演算の入力に相当するシンボルが示すアドレスに該第1演算の出力に相当するシンボルが格納された第1演算テーブル、および、該暗号化処理に含まれる第2演算の入力に相当するシンボルが示すアドレスに該第2演算の出力に相当するシンボルが格納された第2演算テーブルを、一方の演算テーブルの未使用領域に他方の演算テーブルの使用領域を重ね合わせたテーブルとして記憶部に保持する保持工程と、
シンボルで表された平分および暗号鍵ならびに前記重ね合わせたテーブルに基づいて前記第1演算および前記第2演算を行うことで、シンボルで表された暗号文を生成する生成工程と、
シンボルで表された暗号文を前記対応付けに従ってバイナリデータで表された暗号文に変換する逆変換工程と、を含む、暗号化方法。
The computer converts the plaintext and the encryption key represented by the binary data into the plaintext and the encryption key represented by the symbol according to the correspondence between the binary data having the first bit width and the symbol having the second bit width having the predetermined Hamming weight. Conversion process;
A first operation table in which a symbol corresponding to the output of the first operation is stored at an address indicated by a symbol corresponding to an input of the first operation included in the encryption processing; and a second operation included in the encryption processing The second calculation table in which the symbol corresponding to the output of the second calculation is stored at the address indicated by the symbol corresponding to the input of is overlaid on the unused area of one calculation table with the used area of the other calculation table. A holding step for holding in the storage unit as a table;
A generation step of generating a ciphertext represented by a symbol by performing the first operation and the second operation based on the equalization and encryption key represented by the symbol and the superposed table;
A reverse conversion step of converting a ciphertext represented by a symbol into a ciphertext represented by binary data in accordance with the association.
前記重ね合わせたテーブルは、前記第1演算の入力に相当する複数のシンボルを連結したビット列が示すアドレスに前記第1演算の出力に相当するシンボルが格納され、前記第2演算の入力に相当する複数のシンボルを連結したビット列に所定のオフセットを加えたアドレスに前記第2演算の出力に相当するシンボルが格納されている、請求項6に記載の暗号化方法。   In the superimposed table, a symbol corresponding to the output of the first calculation is stored at an address indicated by a bit string obtained by connecting a plurality of symbols corresponding to the input of the first calculation, and corresponds to the input of the second calculation. The encryption method according to claim 6, wherein a symbol corresponding to the output of the second operation is stored at an address obtained by adding a predetermined offset to a bit string obtained by concatenating a plurality of symbols. 前記変換工程において、第1ビット幅のバイナリデータと、所定の複数のハミング重みのいずれかを有する第2ビット幅のシンボルとの対応付けに従って、バイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換する、請求項6または7に記載の暗号化方法。   In the conversion step, according to the correspondence between the binary data having the first bit width and the second bit width symbol having any of a plurality of predetermined Hamming weights, the plaintext and the encryption key represented by the binary data are represented by symbols. The encryption method according to claim 6, wherein the encryption method is converted into the expressed plaintext and encryption key. 第1ビット幅のバイナリデータと所定のハミング重みの第2ビット幅のシンボルとの対応付けに従ってバイナリデータで表された平文および暗号鍵をシンボルで表された平文および暗号鍵に変換する変換処理と、
暗号化処理に含まれる第1演算の入力に相当するシンボルが示すアドレスに該第1演算の出力に相当するシンボルが格納された第1演算テーブル、および、該暗号化処理に含まれる第2演算の入力に相当するシンボルが示すアドレスに該第2演算の出力に相当するシンボルが格納された第2演算テーブルを、一方の演算テーブルの未使用領域に他方の演算テーブルの使用領域を重ね合わせたテーブルとして記憶部に保持する保持処理と、
シンボルで表された平分および暗号鍵ならびに前記重ね合わせたテーブルに基づいて前記第1演算および前記第2演算を行うことで、シンボルで表された暗号文を生成する生成処理と、
シンボルで表された暗号文を前記対応付けに従ってバイナリデータで表された暗号文に変換する逆変換処理と、をコンピュータに実行させる、プログラム。
A conversion process for converting a plaintext and an encryption key represented by binary data into a plaintext and an encryption key represented by a symbol according to the association between the binary data having the first bit width and a symbol having a second bit width having a predetermined Hamming weight; ,
A first operation table in which a symbol corresponding to the output of the first operation is stored at an address indicated by a symbol corresponding to an input of the first operation included in the encryption processing; and a second operation included in the encryption processing The second calculation table in which the symbol corresponding to the output of the second calculation is stored at the address indicated by the symbol corresponding to the input of is overlaid on the unused area of one calculation table with the used area of the other calculation table. Holding processing to be stored in the storage unit as a table;
A generation process for generating a ciphertext represented by a symbol by performing the first operation and the second operation based on the equalization and encryption key represented by the symbol and the superposed table;
A program that causes a computer to execute reverse conversion processing for converting a ciphertext represented by a symbol into a ciphertext represented by binary data in accordance with the association.
前記重ね合わせたテーブルは、前記第1演算の入力に相当する複数のシンボルを連結したビット列が示すアドレスに前記第1演算の出力に相当するシンボルが格納され、前記第2演算の入力に相当する複数のシンボルを連結したビット列に所定のオフセットを加えたアドレスに前記第2演算の出力に相当するシンボルが格納されている、請求項9に記載のプログラム。   In the superimposed table, a symbol corresponding to the output of the first calculation is stored at an address indicated by a bit string obtained by connecting a plurality of symbols corresponding to the input of the first calculation, and corresponds to the input of the second calculation. The program according to claim 9, wherein a symbol corresponding to the output of the second operation is stored at an address obtained by adding a predetermined offset to a bit string obtained by concatenating a plurality of symbols.
JP2012271544A 2012-12-12 2012-12-12 Encryption device, encryption method and program Pending JP2014116897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012271544A JP2014116897A (en) 2012-12-12 2012-12-12 Encryption device, encryption method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012271544A JP2014116897A (en) 2012-12-12 2012-12-12 Encryption device, encryption method and program

Publications (1)

Publication Number Publication Date
JP2014116897A true JP2014116897A (en) 2014-06-26

Family

ID=51172456

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012271544A Pending JP2014116897A (en) 2012-12-12 2012-12-12 Encryption device, encryption method and program

Country Status (1)

Country Link
JP (1) JP2014116897A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016050409A (en) * 2014-08-29 2016-04-11 株式会社東海理化電機製作所 Electronic key system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016050409A (en) * 2014-08-29 2016-04-11 株式会社東海理化電機製作所 Electronic key system

Similar Documents

Publication Publication Date Title
Kumar et al. Development of modified AES algorithm for data security
JP5229315B2 (en) Encryption device and built-in device equipped with a common key encryption function
EP2924677B1 (en) Splitting s-boxes in a white-box implementation to resist attacks
Biryukov et al. Block ciphers and systems of quadratic equations
Muir A tutorial on white-box AES
JP5711681B2 (en) Cryptographic processing device
US20120170739A1 (en) Method of diversification of a round function of an encryption algorithm
JP5268609B2 (en) Cryptographic processing apparatus and calculation method
JP2005215688A (en) Hardware encryption/decryption apparatus using s-box operation, and method for the same
US11436946B2 (en) Encryption device, encryption method, decryption device, and decryption method
Orumiehchiha et al. Cryptanalysis of WG-7: a lightweight stream cipher
Singh Modified Vigenere encryption algorithm and its hybrid implementation with Base64 and AES
JP2008513811A (en) Calculation conversion method and system
Jeong et al. Differential fault analysis on block cipher SEED
KR101601684B1 (en) Method for implementing symmetric key encryption algorithm against power analysis attacks
KR101506499B1 (en) Method for encrypting with SEED applying mask
Xu et al. A white-box AES-like implementation based on key-dependent substitution-linear transformations
JP6136325B2 (en) Cryptographic processing apparatus, cryptographic processing method, and program
Yang et al. A new cryptosystem based on chaotic map and operations algebraic
Sharma et al. Cryptography Algorithms and approaches used for data security
JP2014116897A (en) Encryption device, encryption method and program
Nadaf et al. Hardware implementation of modified AES with key dependent dynamic S-box
JP5354914B2 (en) Encryption processing device, decryption processing device, and program
Silva-Garcia et al. The triple-DES-96 cryptographic system
JP2013205437A (en) Method and apparatus for calculating nonlinear function s-box