JP4271077B2 - マスク論理回路及び暗号装置 - Google Patents
マスク論理回路及び暗号装置 Download PDFInfo
- Publication number
- JP4271077B2 JP4271077B2 JP2004136726A JP2004136726A JP4271077B2 JP 4271077 B2 JP4271077 B2 JP 4271077B2 JP 2004136726 A JP2004136726 A JP 2004136726A JP 2004136726 A JP2004136726 A JP 2004136726A JP 4271077 B2 JP4271077 B2 JP 4271077B2
- Authority
- JP
- Japan
- Prior art keywords
- mask
- masked
- bit
- xor
- input
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
しかしながら、この方式は、本来の出力f(x)とは異なる結果を得るが、本来の入力xと相関した計算をするので、DPA対策にはならない。また、この方式は、テーブルを作るために定数r1,r2を固定する必要があるが、定数r1,r2を固定すると、攻撃が容易になる。そのため、もう一段の工夫が必要である。このような工夫をした方式としては、テーブル書換方法及びテーブル切替方法が知られている。
(第1の実施形態)
図1は本発明の第1の実施形態に係るマスク論理回路の構成を示す模式図である。このマスク論理回路10は、乱数発生器(マスク値生成手段)11、入力側のn個の排他的論理和回路(マスク済データ生成手段)121〜12n、マスク素子回路部(論理演算手段)13及び出力側の1個の排他的論理和回路(出力手段)14を備えている。
f(a1,a2)= a1 and a2 …(1)
この関数fの入出力関係は、次の4通りとなる。
f(0,0)=0
f(0,1)=0
f(1,0)=0
f(1,1)=1
この関数fにマスクを適用したマスク論理回路10を図3を用いて説明する。なお、図3は図1をn=2とした例である。マスク素子回路部13では、入力が4つに増え、出力が2つに増える。マスク演算としては、排他的論理和(xor)を使用する。
x1=a1 xor m1 …(2)
x2=a2 xor m2 …(3)
rは出力のマスク値であり、yはマスクされた出力であり、両者r,yは次の(4)式の関係にある。
y=(a1 and a2) xor r …(4)
図4はマスク素子回路部13の関数Fを示す真理値表である。左の4つの列は4つの入力x1,x2,m1,m2の取り得る値を示している。4つの独立な2値変数が取り得るすべての場合は16通りである。次の2列は隠したい入力a1,a2が実際には何であったかを示している。次の2列は出力y,rを示している。
A=a1 and a2 …(5)
B=y xor r …(6)
ここで、マスク無し/有りの出力A,Bが一致しているので、A=Bとして次の(7)〜(8)式の関係が分かる。
y xor r = a1 and a2 …(7)
すなわち
y=(a1 and a2) xor r …(8)
なお、出力y,rの列は1例であり、上式を満足する出力y,rの他の選択も可能である。例えば出力y,rの値の0と1を全て反転させた場合も上式を満足する。但し、上式を満足しても、セキュリティ的に安全とは限らない。このことは後述する。
y=(x1 and x2) or (m1 and (not x2)) …(9)
r=(x1 and m2) or (m1 and (not m2)) …(10)
ここで、再び図4に戻る。図4の右側の4列は入力x1,x2,m1,m2を動かしたときに内部信号t0〜t3が取る値を示している。前述同様に、入力a1,a2と一致する回数が下の2行に示されている。ここでは、全ての値が8であり、内部信号t0〜t3は、入力a1,a2と相関がないことが分かる。
図9及び図10は本発明の第2の実施形態に係るマスク論理回路に適用されるマスクオア素子又はマスクノット素子の構成を示す模式図であり、図5と同一部分には同一符号を付してその詳しい説明を省略し、ここでは異なる部分について主に述べる。
以上のような構成によれば、第1の実施形態で述べたマスクアンド素子mandに限らず、マスクオア素子mor及びマスクノット素子mnotを実現できるので、第1の実施形態の効果に加え、マスク論理回路10の設計の自由度を向上させることができる。
次に、本発明の第3の実施形態に係るマスク論理回路に適用される各マスク論理素子について説明する。ここでは、多入力1ビット出力の場合を述べる。
(1)適用したい論理回路をノット回路、オア回路及びアンド回路の3つのゲート構成される回路に変換する。
図14は本発明の第4の実施形態に係るマスク論理回路に適用されるマスク素子回路部の構成を示す模式図である。
図15は本発明の第5の実施形態に係るマスク論理回路に適用されるマスク素子回路部の構成を示す模式図である。
以上のような構成としても、第1の実施形態と同様の効果を得ることができる。
次に、本発明の第6の実施形態に係るマスク論理回路に適用されるマスク論理素子について説明する。本実施形態は、第1の実施形態の変形例であり、(9)式及び(10)式以外の論理式で表現されるマスク論理素子mandの変形例を列挙するものである。
yAND=(x1 and x2) or (m1 and (not x2))
rAND=(x1 and m2) or (m1 and (not m2))
[AND2]
yAND=(x1 and m2) or (m1 and (not m2))
rAND=(x1 and x2) or (m1 and (not x2))
[AND3]
yAND=not ( (x1 and x2) or (m1 and (not x2)) )
rAND=not ( (x1 and m2) or (m1 and (not m2)) )
[AND4]
yAND=not ( (x1 and m2) or (m1 and (not m2)) )
rAND=not ( (x1 and x2) or (m1 and (not x2)) )
[AND5]
yAND=(x1 and x2) xor (m1 and (not x2))
rAND=(x1 and m2) xor (m1 and (not m2))
[AND6]
yAND=(x1 and m2) xor (m1 and (not m2))
rAND=(x1 and x2) xor (m1 and (not x2))
[AND7]
yAND=not ( (x1 and x2) xor (m1 and (not x2)) )
rAND=not ( (x1 and m2) xor (m1 and (not m2)) )
[AND8]
yAND=not ( (x1 and m2) xor (m1 and (not m2)) )
rAND=not ( (x1 and x2) xor (m1 and (not x2)) )
[AND9]
yAND=(not (x1 and x2) ) xor (m1 and (not x2))
rAND=(not (x1 and m2) ) xor (m1 and (not m2))
[AND10]
yAND=(not (x1 and m2) ) xor (m1 and (not m2))
rAND=(not (x1 and x2) ) xor (m1 and (not x2))
[AND11]
yAND=not ( (x1 and x2) xor (m1 and (not x2)) )
rAND=not ( (x1 and m2) xor (m1 and (not m2)) )
[AND12]
yAND=not ( (x1 and m2) xor (m1 and (not m2)) )
rAND=not ( (x1 and x2) xor (m1 and (not x2)) )
以上のような構成としても、第1の実施形態と同様の作用効果を得ることができる。
次に、本発明の第7の実施形態に係るマスク論理回路に適用されるマスク論理素子について説明する。本実施形態は、第2の実施形態の変形例であり、図9を表現した論理式のマスク論理素子morを列挙するものである。
yOR=not ( ((not x1) and (not x2)) or (m1 and x2))
rOR=((not x1) and m2) or (m1 and (not m2))
[OR2]
yOR=((not x1) and (not x2)) or (m1 and x2)
rOR=not ( ((not x1) and (not m2)) or (m1 and m2))
[OR3]
yOR=not ( (x1 and x2) or ((not m1) and (not x2)) )
rOR=(x1 and (not m2)) or ((not m1) and m2)
[OR4]
yOR=(x1 and x2) or ((not m1) and (not x2))
rOR=not ( (x1 and (not m2)) or ((not m1) and m2) )
以上のような構成としても、第2の実施形態と同様の作用効果を得ることができる。
次に、本発明の第8の実施形態に係るマスク論理回路に適用されるマスク論理素子について説明する。本実施形態は、第2の実施形態の変形例であり、図10を表現した論理式のマスク論理素子mnotを列挙するものである。
yNOT=not x1
rNOT=m1
[NOT2]
yNOT=x1
rNOT=not m1
以上のような構成としても、第2の実施形態と同様の作用効果を得ることができる。
Claims (11)
- n(n≧2)個の一ビットの入力値を論理演算し1個の一ビットの結果値を得る論理演算装置に利用されるマスク素子回路であって、
マスク用の値としてn個のマスク値を入力する第1入力手段と、
前記n個の入力値と対応付けた前記n個のマスク値で排他的論理和されたn個の被マスク化値を入力する第2入力手段と、
入力される前記n個のマスク値と入力される前記n個の被マスク化値との組み合わせによって、それぞれ1ビットの第1と第2の出力値が決まるゲート群であって、前記第1の出力値と前記第2の出力値とを排他的論理和すると前記一ビットの結果値と一致するような前記第1の出力値と前記第2の出力値とを得るゲート群と、
前記第1の出力値と前記第2の出力値とを出力する出力手段と
を備えたことを特徴とするマスク素子回路。 - 請求項1に記載のマスク素子回路において、
前記ゲート群に含まれる各ゲートの出力値と前記一ビットの結果値との間に相関が無いことを特徴とするマスク素子回路。 - 入力されたn個の1ビット入力データ{a1,…,an}の関数f(a1,…,an)を出力する際に、前記各入力データ{a1,…,an}をn個の1ビットマスク値{m1,…,mn}の排他的論理和(xor)によりマスクする機能と、前記マスクにより得られた各マスク済入力データ{x1,…,xn}(但し、xi=ai xor mi、1≦i≦n)及び前記マスク値{m1,…,mn}を論理演算する論理演算機能と、前記論理演算機能により得られた2個の1ビットマスク済演算結果データy,rから互いの排他的論理和により前記マスクの影響を除去し、得られた1個の1ビット出力データf(a1,…,an)を出力する出力機能とを有するマスク論理回路であって、
前記論理演算機能は、
前記各マスク済入力データ{x1,…,xn}及び前記マスク値{m1,…,mn}から前記各マスク済演算結果データy,rを得るまでの途中結果を前記各入力データ{a1,…,an}とは相関が無いように生成するように、複数の論理素子からなる1種類以上の複数のマスク論理素子が互いに接続されてなり、
前記各マスク論理素子は、
前記各1ビットマスク済入力データ{x1,…,xn}及び前記各1ビットマスク値{m1,…,mn}を順番1,…,nで区別するとき、互いに同じ順番同士の複数の各1ビットマスク済入力データ及び各1ビットマスク値が入力された際に、当該各1ビットマスク済入力データ及び各1ビットマスク値の各々を2つに分岐させる機能と、
各々が分岐された各1ビットマスク済入力データ及び各1ビットマスク値のうち、互いに異なる順番の各1ビットマスク済入力データ及び/又は各1ビットマスク値を前記各論理素子により演算する機能と、
を備えたことを特徴とするマスク論理回路。 - 請求項3に記載のマスク論理回路において、
前記各マスク論理素子のうち、第1の種類(論理積)のマスク論理素子は、
同じ順番j(但し、1≦j≦n)のマスク済入力データとマスク値との組{xj,mj}と、他の同じ順番k(但し、1≦k≦n、k≠j)のマスク済入力データとマスク値との組{xk,mk}とが入力されると、途中結果の演算を介して2個の1ビットマスク済論理積結果データyAND,rANDを生成する生成機能を有し、
前記各マスク済論理積結果データyAND,rANDは、
yAND xor rAND=aj and akの関係(但し、andは論理積)を満たし、且つ前記途中結果が順番j,kの入力データ{aj,ak}と相関が無いことを特徴とするマスク論理回路。 - 請求項4に記載のマスク論理回路において、
前記第1の種類のマスク論理素子における生成機能は、
下記式[AND1]〜[AND12]のうち、いずれかの式に示すように、論理積and、論理和or、否定not及び排他的論理和xorのうちの幾つかを用いた論理演算により、前記マスク済入力データとマスク値との組から各マスク済論理積結果データyAND,rANDを生成することを特徴とするマスク論理回路。
[AND1]
yAND=(xj and xk) or (mj and (not xk))
rAND=(xj and mk) or (mj and (not mk))
[AND2]
yAND=(xj and mk) or (mj and (not mk))
rAND=(xj and xk) or (mj and (not xk))
[AND3]
yAND=not ( (xj and xk) or (mj and (not xk)) )
rAND=not ( (xj and mk) or (mj and (not mk)) )
[AND4]
yAND=not ( (xj and mk) or (mj and (not mk)) )
rAND=not ( (xj and xk) or (mj and (not xk)) )
[AND5]
yAND=(xj and xk) xor (mj and (not xk))
rAND=(xj and mk) xor (mj and (not mk))
[AND6]
yAND=(xj and mk) xor (mj and (not mk))
rAND=(xj and xk) xor (mj and (not xk))
[AND7]
yAND=not ( (xj and xk) xor (mj and (not xk)) )
rAND=not ( (xj and mk) xor (mj and (not mk)) )
[AND8]
yAND=not ( (xj and mk) xor (mj and (not mk)) )
rAND=not ( (xj and xk) xor (mj and (not xk)) )
[AND9]
yAND=(not (xj and xk) ) xor (mj and (not xk))
rAND=(not (xj and mk) ) xor (mj and (not mk))
[AND10]
yAND=(not (xj and mk) ) xor (mj and (not mk))
rAND=(not (xj and xk) ) xor (mj and (not xk))
[AND11]
yAND=not ( (xj and xk) xor (mj and (not xk)) )
rAND=not ( (xj and mk) xor (mj and (not mk)) )
[AND12]
yAND=not ( (xj and mk) xor (mj and (not mk)) )
rAND=not ( (xj and xk) xor (mj and (not xk)) ) - 請求項4又は請求項5に記載のマスク論理回路において、
前記各マスク論理素子のうち、第2の種類(論理和)のマスク論理素子は、
同じ順番g(但し、1≦g≦n、g≠j,g≠k)のマスク済入力データとマスク値との組{xg,mg}と、他の同じ順番h(但し、1≦h≦n、h≠g、h≠j、h≠k)のマスク済入力データとマスク値との組{xh,mh}とが入力されると、途中結果の演算を介して2個の1ビットマスク済論理積結果データyOR,rORを生成する生成機能を有し、
前記各マスク済論理和結果データyOR,rORは、
yOR xor rOR=ag or ahの関係(但し、orは論理和)を満たし、且つ前記途中結果が順番g,hの入力データ{ag,ah}と相関が無いことを特徴とするマスク論理回路。 - 請求項6に記載のマスク論理回路において、
前記第2の種類のマスク論理素子における生成機能は、
下記式[OR1]〜[OR4]のうち、いずれかの式に示すように、論理積and、論理和or及び否定notを用いた論理演算により、前記マスク済入力データとマスク値との組から各マスク済論理和結果データyOR,rORを生成することを特徴とするマスク論理回路。
[OR1]
yOR=not ( ((not xg) and (not xh)) or (mg and xh))
rOR=((not xg) and mh) or (mg and (not mh))
[OR2]
yOR=((not xg) and (not xh)) or (mg and xh)
rOR=not ( ((not xg) and (not mh)) or (mg and mh))
[OR3]
yOR=not ( (xg and xh) or ((not mg) and (not xh)) )
rOR=(xg and (not mh)) or ((not mg) and mh)
[OR4]
yOR=(xg and xh) or ((not mg) and (not xh))
rOR=not ( (xg and (not mh)) or ((not mg) and mh) ) - 請求項4乃至請求項7のいずれか1項に記載のマスク論理回路において、
前記各マスク論理素子のうち、第3の種類(否定)のマスク論理素子は、
同じ順番p(但し、1≦p≦n、p≠j、p≠k、p≠g、p≠h)のマスク済入力データとマスク値との組{xp,mp}が入力されると、2個の1ビットマスク済否定結果データyNOT,rNOTを生成する生成機能を有し、
前記各マスク済否定結果データyNOT,rNOTは、
yNOT xor rNOT=not apの関係(但し、notは論理和)を満たすことを特徴とするマスク論理回路。 - 請求項8に記載のマスク論理回路において、
前記第3の種類のマスク論理素子における生成機能は、
下記式[NOT1]又は[NOT2]に示すように、否定notを用いた論理演算により、前記マスク済入力データとマスク値との組から各マスク済否定結果データyNOT,rNOTを生成することを特徴とするマスク論理回路。
[NOT1]
yNOT=not xp
rNOT=mp
[NOT2]
yNOT=xp
rNOT=not mp - 請求項4乃至請求項9のいずれか1項に記載のマスク論理回路において、
前記各マスク論理素子の出力は、他のマスク論理素子への入力又は前記出力機能による出力であることを特徴とするマスク論理回路。 - 請求項10に記載のマスク論理回路を備えた暗号装置。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004136726A JP4271077B2 (ja) | 2004-04-30 | 2004-04-30 | マスク論理回路及び暗号装置 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004136726A JP4271077B2 (ja) | 2004-04-30 | 2004-04-30 | マスク論理回路及び暗号装置 |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005318476A JP2005318476A (ja) | 2005-11-10 |
JP4271077B2 true JP4271077B2 (ja) | 2009-06-03 |
Family
ID=35445405
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004136726A Expired - Fee Related JP4271077B2 (ja) | 2004-04-30 | 2004-04-30 | マスク論理回路及び暗号装置 |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4271077B2 (ja) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4589327B2 (ja) * | 2004-07-07 | 2010-12-01 | 三菱電機株式会社 | 電子素子及びデータ処理方法 |
EP1840732A1 (en) * | 2006-03-31 | 2007-10-03 | Axalto SA | Protection against side channel attacks |
JP4962165B2 (ja) * | 2007-06-22 | 2012-06-27 | 大日本印刷株式会社 | 暗号処理装置,暗号処理プログラム及び暗号処理方法 |
JP2015102639A (ja) * | 2013-11-22 | 2015-06-04 | Kddi株式会社 | 演算装置、演算方法、コンピュータプログラムおよびストリーム暗号化装置 |
US10255462B2 (en) * | 2016-06-17 | 2019-04-09 | Arm Limited | Apparatus and method for obfuscating power consumption of a processor |
-
2004
- 2004-04-30 JP JP2004136726A patent/JP4271077B2/ja not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005318476A (ja) | 2005-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Schneider et al. | ParTI–towards combined hardware countermeasures against side-channel and fault-injection attacks | |
Wyseur et al. | Cryptanalysis of white-box DES implementations with arbitrary external encodings | |
Bilgin et al. | Efficient and first-order DPA resistant implementations of Keccak | |
KR100725169B1 (ko) | 전력 분석 공격에 안전한 논리 연산 장치 및 방법 | |
TWI447683B (zh) | Information processing device | |
KR20180002069A (ko) | 부채널 분석에 대응한 보호 방법 및 장치 | |
CN102648600B (zh) | 由定制的掩蔽保护的低复杂度电子电路 | |
RU2603550C2 (ru) | Устройство обработки данных, способ обработки данных и программа | |
US11700111B2 (en) | Platform neutral data encryption standard (DES) cryptographic operation | |
JP5364840B2 (ja) | 暗号化装置 | |
Shahmirzadi et al. | New first-order secure AES performance records | |
US7003109B2 (en) | Compact crypto-engine for random number and stream cipher generation | |
Gross et al. | First-order masking with only two random bits | |
AlTawy et al. | Spix: An authenticated cipher submission to the NIST LWC competition | |
Kim et al. | Masked implementation of PIPO block cipher on 8-bit AVR microcontrollers | |
Kraleva et al. | Cryptanalysis of strong physically unclonable functions | |
Gafsi et al. | Hardware implementation of a strong pseudorandom number generator based block‐cipher system for color image encryption and decryption | |
JP4271077B2 (ja) | マスク論理回路及び暗号装置 | |
CN106936822B (zh) | 针对sms4抗高阶旁路分析的掩码实现方法及系统 | |
Gandh et al. | FPGA implementation of enhanced key expansion algorithm for Advanced Encryption Standard | |
Maiti et al. | Design of fault-resilient S-boxes for AES-like block ciphers | |
KR102141843B1 (ko) | 암호화 방법을 실행하기 위한 장치 및 방법 | |
Gupta et al. | Correlation power analysis of KASUMI and power resilience analysis of some equivalence classes of KASUMI S-boxes | |
CN113691364B (zh) | 一种基于位片技术的动态s盒分组密码的加密及解密方法 | |
JP5268001B2 (ja) | ストリーム暗号向け擬似乱数生成装置とプログラムと方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050907 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20090217 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090224 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120306 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4271077 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120306 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130306 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130306 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140306 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |