Page 1
Confidential | Date | Other Information, if necessary © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料
暗号理論における安全性の証明:プログラム難読化( Obfuscation)の研究動向
Yury Lifshits & Boaz Barakの資料を一部借用していますPart of slides are copies from the web pages of Yury Lifshits & Boaz Barak http://logic.pdmi.ras.ru/~yura/obfuscation.htmlhttp://www.cs.princeton.edu/~boaz/
羽田 知史( IBM東京基礎研究所)Satoshi Hada (IBM Research - Tokyo)
mailto: satoshih at jp ibm com
Page 2
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation2
アジェンダ
1. プログラムの難読化( Program Obfuscation)とは? アプリケーション 安全性
2.難読化の安全性をどう定義するか?3. Negativeな結果
本質的に難読化できないプログラムの存在4. Positiveな結果
Point functions
Re-encryption functions
Encrypted signature functions
Page 3
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation3
プログラムの難読化( Obfuscation)は、プログラムを Unintelligibleにする技術です
The winning entry for the 1998 International Obfuscated C Code Contest
Page 4
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation4
難読化には様々なアプリケーションがあります
実用の観点からソフトウェア保護ソフトウェアWatermarking
暗号理論の観点から秘密鍵暗号から公開鍵暗号の変換Homomorphic Encryptionの実現Random Oracleの実現
Page 5
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation5
難読化の応用(1):秘密鍵暗号から公開鍵暗号への変換
EncKDecK
C MM
K: 秘密の共有鍵
変換のアイデア EncKのプログラムを難読化して、公開鍵として Publishする。
秘密鍵は、 Kがそのまま使用される。 安全性の根拠
EncKのプログラムには、 Kが埋め込まれているが、難読化されているので Kは漏れないだろう。。。
O(EncK) DecK
C MM
EncKを難読化
Page 6
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation6
難読化の応用(2): Homomorphic Encryptionの実現
Homomorphic Encryptionとは? Given C1=E(M1) and C2=E(M2), easy to compute E(M1+M2) and
E(M1*M2)
公開鍵暗号を使った、以下のプログラムを考える 埋め込まれた情報:秘密鍵公開鍵ペア (pk, sk)
Step 1 : 入力として、 C1=E(pk, M1) and C2=E(pk, M2)が与えられる
Step 2 : skを使って、復号し、M1とM2を計算する Step 3: M1+M2およびM1*M2を pkで暗号化して出力
このプログラムを難読化して、 pkといっしょに、 publishすれば、 Homomorphic Public-Key Encryptionが構成できる
安全性の根拠 秘密鍵が埋め込まれているが、難読化されているので、漏れることないだろう。。。
Page 7
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation7
難読化の応用(3): Random Oracleの実現 Random Oracle Model
An ideal cryptographic setting in which everyone has access to a truly random function
Pseudorandom functions A function is pseudorandom if no adversary can not distinguish it from a
truly random function (when the seed is randomly chosen)
Obfuscating pseudorandom functions may be able to implement the random oracle model.
Distinguisher(Adversary)
fs u
BB accessBB access
S is a secret seed
Page 8
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation8
難読化のテクニックには様々なものがあります
レイアウトの難読化コメントを削除変数名や関数名のスクランブルフォーマットの変更
データの難読化変数の分割変数のマージ順番の入れ替え
制御文の難読化などなどなど
Page 9
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation9
しかし、安全性の評価は難しいです
プログラムの長さOperatorやOperandの数
データフローの複雑さブロックをまたがる変数参照の数
Cyclomatic ComplexityDecisionポイント( if文や while文)の数
Nesting Complexityネストの深さ
Page 10
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation10
近年、難読化の安全性を、暗号理論の観点で、議論する研究がさかんです。
R. Canetti,Y. T. Kalai, M. Varia, and D. Wichs,``On Symmetric Encryption and Point Obfuscation", TCC 2010R. Canetti,Y. G. N. Rothblum, and M. Varia, ``Obfuscation of Hyperplane Membership", TCC 2010S. Hada, ``Secure Obfuscation for Encrypted Signatures”, Eurocrypt 2010.N. Bitansky and R. Canetti, ``On Strong Simulation and Composable Point Obfuscation," CRYPTO 2010.
2010R. Canetti, M. Varia, ``Non-Malleable Obfuscation, “ TCC’09.2009R. Canetti, R. R. Dakdouk, ``Obfuscating Point Functions with Multibit Output,” Eurocrypt 2008.2008
D. Hofheinz, J. Malone-Lee, and M. Stam, ``Obfuscation for Cryptographic Purposes," TCC'07.S. Hohenberger, G. N. Rothblum, a. shelat, and V. Vaikuntanathan, ``Securely Obfuscating Re-Encryption,'' TCC'07.S. Goldwasser and G. N. Rothblum, ``On Best-Possible Obfuscation,'' TCC'07.B. Adida, D. Wikström, ``How to Shuffle in Public,” TCC’07.
2007
H. Wee, ``On Obfuscating Point Functions," STOC'05.S. Goldwasser and Y. T. Kalai, ``On the Impossibility of Obfuscation with Auxiliary Input," FOCS'05.
2005
B. Lynn, M. Prabhakaran, and A. Sahai, ``Positive Results and Techniques for Obfuscation," Eurocrypt’04.
2004
B. Barak, O. Goldreich, R. Impagliazzo, S. Rudich, A. Sahai, S. Vadhan, K. Yang,``On the (Im)possibility of Obfuscating Programs," CRYPTO’01 (ECCC,Report 2001-57)
2001S. Hada, ``Zero-Knowledge and Code Obfuscation," Asiacrypt'2000.2000
赤:主に否定的な結果青:主に肯定的な結果
Page 11
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation11
アジェンダ
1. プログラムの難読化( Program Obfuscation)とは? アプリケーション 安全性
難読化の安全性をどう定義するか? Negativeな結果
本質的に難読化できないプログラムの存在4. Positiveな結果
Point functions
Re-encryption functions
Encrypted signature functions
Page 12
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation12
Obfuscatorの定義: Obfuscatorは、機能を保持したままプログラムをわかりにくく変換するアルゴリズムです。安全性の定義は非自明です。
プログラムとは? Programs as a class of circuits C={Cn}
Cn is a set of circuits of input length n
Cnの circuitが一つのプログラムに対応
Obfuscatorとは? Functionality requirement:
難読化したプログラムは、オリジナルのプログラムと同じ機能をもつべきである。
An probabilistic polynomial-time machine O is an obfuscator if for every class of circuits C ={Cn}, for any circuit P C∈ n , for every input x,
Pr[ P’ ← O(P) : P(x)=P’(x)]=1 Security requirement:
これをどのように定義するかが非自明!!!
Page 13
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation13
Simulation Paradigmに基づいて、 Obfuscatorの安全性を定義することができます(1)Simulation Paradigmとは、「一切、情報が漏れない」を表現する方法攻撃者が計算できるものは、攻撃の対象がなくても、計算できる。
難読化のコンテキストでは?攻撃の対象:難読化されたプログラム(のコード)攻撃の対象が無い状況:プログラムへ Black-boxアクセスだけできる。任意の入力を与えて、出力結果を得ることは可能。
Virtual Blackbox Propertyという性質として定義する難読化されたプログラムから計算できるものは、プログラムへの Blackboxアクセスのみからも計算できる
Page 14
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation14
Simulation Paradigmに基づいて、 Obfuscatorの安全性を定義することができます(2)
A probabilistic polynomial-time machine O is an obfuscator if the two requirements are satisfied:
2. Functionality requirement:
∀ class of circuits C ={Cn}, circuit P C∀ ∈ n , input x,∀Pr[ P’ ← O(P) : P(x)=P’(x)]=1
Virtual blackbox property
∀ class of circuits C, circuit P C∀ ∈ n , ∀ 攻撃者 A, Simulator S s.t. ∃{P’ ← O(P) : A(P’)}と {SP (1n)}が Computationally Indistinguishable.
∀ class of circuits C, circuit P C∀ ∈ n , ∀ 攻撃者 A, Simulator S s.t. ∃ ∀distinguisher D, negligible function δ(n), s.t. ∃|Pr[ P’ ← O(P) ; o←A(P’); D(o)=1] – Pr[o←SP (1n) : D(o)=1] | < δ(n)
この定義は、簡略化できる。 難読化されたプログラム P’を出力する攻撃者だけを考えればいい
∀ class of circuits C, circuit P C∀ ∈ n , Simulator S s.t. distinguisher ∃ ∀D, negligible function δ(n), s.t. ∃|Pr[ P’ ← O(P) ; D(P’)=1] – Pr[P’←SP (1n) : D(P’)=1] | < δ(n)
Page 15
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation15
しかし、前述の Naïveな安全性の定義は強すぎます
A probabilistic polynomial-time machine O is an obfuscator if the two requirements are satisfied:
2. Functionality requirement:
∀ class of circuits C ={Cn}, circuit P C∀ ∈ n , input x,∀Pr[ P’ ← O(P) : P(x)=P’(x)]=1
Virtual blackbox property
∀ class of circuits C, circuit P C∀ ∈ n , Simulator S s.t. distinguisher D, ∃ ∀negligible function δ(n), s.t. ∃
|Pr[ P’ ← O(P) ; D(P’)=1] – Pr[P’←SP (1n) : D(P’)=1] | < δ(n) 問題点
Cが難読化できるためには、 Cは Learnableでないといけない つまり、 Pへの Blackboxアクセスが与えられたとき、 Pと同じ機能をもつプログラムを再構成できる必要がある
Learnableではない Cは存在するので、 Impossible to meet this security requirement
E.g., point functions
Page 16
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation16
攻撃者の計算出力を制限することにより、弱い安全性を定義することも可能です。 アイデア
攻撃者の目的を、オリジナルのプログラムの predicateの計算に限定する
A probabilistic polynomial-time machine O is an obfuscator if the two requirements are satisfied:
4. Functionality requirementは同じ ∀ class of circuits C ={Cn}, circuit P C∀ ∈ n , input x,∀
Pr[ P’ ← O(P) : P(x)=P’(x)]=1
Virtual blackbox property
∀ class of circuits C, circuit P C∀ ∈ n , ∀ 攻撃者 A, predicate π∀ , ∃Simulator S s.t. distinguisher D, negligible function δ(n), s.t. ∀ ∃|Pr[ P’ ← O(P) ; b←A(P’); b=π(P)] – Pr[b←SP (1n) : b=π(P)] | < δ(n)
Page 17
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation17
アジェンダ
1. プログラムの難読化( Program Obfuscation)とは? アプリケーション 安全性
難読化の安全性をどう定義するか? Negativeな結果
本質的に難読化できないプログラムの存在4. Positiveな結果
Point functions
Re-encryption functions
Encrypted signature functions
Page 18
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation18
MAIN RESULT (informal)
Thm [BGI+01]: General-purpose obfs, even under very weak defs, do not exist.
[BGI+01] Barak, Goldreich, Impagliazzo, Rudich, Sahai, Vadhan, Yang “On the (Im)possibility of Obfuscating Programs”, CRYPTO 2001.
Page 19
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation19
DEFINING OBFs
Def: O:PP “totally fails” on P if
1. P can be efficiently recovered from O(P)(i.e., complete recovery of source code)
2. P is hard to learn (i.e., can’t recover P using BB access to its function)
Thm [BGI+01]: ∀ O ∃ P s.t. O totally fails on P. (assuming OWF exist)
* “TASTE” OF PROOF
Page 20
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation20
* “TASTE” OF PROOF
Pf: Show function family {Pα,β} s.t. O totally fails (code recovery + hard to learn) on random member:
Thm [BGI+01]: ∀ O ∃ P s.t. O totally fails on P. (assuming OWF exist)
DefinePα,β(b,x)=
β b=0 , x=α
α,β b=1 , x(0,α)=β
0 otherwise
Claim: ∀O for random α,β w.h.p. O totally fails on Pα,β
Page 21
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation21
DefinePα,β(b,x)=
β b=0 , x=α
α,β b=1 , x(0,α)=β
0 otherwise
Claim: ∀O for random α,β w.h.p. O totally fails on Pα,β
* “TASTE” OF PROOF
Thm [BGI+01]: ∀ O ∃ P s.t. O totally fails on P. (assuming OWF exist)
Pf: Show function family {Pα,β} s.t. O totally fails (code recovery + hard to learn) on random member:
Page 22
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation22
Pf:
To recover α,β from P’=O(Pα,β) - output P’(1,P’)
For random α,β can’t distinguish bet Pα,β and all-zero function using BB access.
DefinePα,β(b,x)=
β b=0 , x=α
α,β b=1 , x(0,α)=β
0 otherwise
Claim: ∀O for random α,β w.h.p. O totally fails on Pα,β
Note: In paper, rule out OBFs for programs with bounded input length.
Black-box access is useless:
Can recover source from obf’d code:
Page 23
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation23
MEANING OF RESULTProved: No general-purpose obf exists.
Maybe “virtually general-purpose” obf exists?
Counter Ex.
“Useful” progs (DES,RSA,AES,SHA,…)
Similar to critique of NP-completeness results.
O secure
Page 24
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation24
Summary by Scott Aaronson (http://scottaaronson.com/blog/?p=16)
There’s no generic, foolproof way to “obfuscate” a computer program. For even if a program looked hopelessly unreadable, you could always feed it its own code as input, which is one thing you couldn’t do if all you had was a “black box” with the same input/output behavior as the program in question.
Page 25
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation25
アジェンダ
1. プログラムの難読化( Program Obfuscation)とは? アプリケーション 安全性
2.難読化の安全性をどう定義するか?3. Negativeな結果
本質的に難読化できないプログラムの存在4. Positiveな結果
Point functions
Re-encryption functions
Encrypted signature functions
Page 26
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation26
研究の方向性:汎用の Obfuscatorは、存在しないので、特定のプログラム用の Obfuscatorを考察する必要があります。
A probabilistic polynomial-time machine O is an obfuscator for a class
of circuits C ={Cn} if the two requirements are satisfied:
2. Functionality requirement
∀ circuit P C∈ n , input x,∀Pr[ P’ ← O(P) : P(x)=P’(x)]=1
Virtual blackbox property
∀ circuit P C∈ n , ∀ 攻撃者 A, predicate π∀ , Simulator S s.t. ∃ ∀distinguisher D, negligible function δ(n), s.t. ∃|Pr[ P’ ← O(P) ; b←A(P’); b=π(P)] – Pr[b←SP (1n) : b=π(P)] | < δ(n)
Page 27
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation27
Positive Result(1) : Point Functionsは難読化できることが知られています。
Pα(x)=
1 if x=α
0 otherwise
Input: x埋め込まれる情報 : f(α)Step 1: f(x)を計算Step 2: f(x)=f(α)なら1を出力
難読化
f(x)は αに関して1ビットも漏らさない特殊な関数。様々な計算量的な困難性の仮定の下での、この関数の設計が研究テーマ。
難読化されたプログラム
Input: x埋め込まれる情報 : αStep 1: x=αなら1を出力
Page 28
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation28
Positive Result(1) : 実は、パスワード認証で広く用いられているテクニックであり、その安全性を、難読化の観点で議論することができます。
(user, password)
Valid / Invalid
Alice αBob β・・・
Password Table
難読化
Alice f(α)Bob f(β)・・・
Page 29
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation29
Sampling Obfuscator:多くの暗号プリミティブ(暗号化など)は確率的なプログラムなので、確率的なプログラムの難読化の重要なテーマです。
これまでは、 Deterministicなプログラムを考えてきたが、 Probabilisticなプログラムを考えることもできる。その場合、 Functionality requirementとして、難読化されたプログラムが、オリジナルのプログラムと同じ確率分布を生成する、ことを要求する。
A probabilistic polynomial-time machine O is a sampling obfuscator for a class of probabilistic circuits C ={Cn} if the two requirements are satisfied:
6. Functionality requirement
∀ circuit P C∈ n , input x,∀Pr[ P’ O(P) :← P(x) と P’(x)の確率分布が等しい ]=1
7. Virtual blackbox property 適切に定義する必要がある
Page 30
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation30
Positive Result(2) : Sampling Obfuscatorの概念に基づいて、 ReEncryptionは難読化できることが知られています。 ReEncryptionとは?
パラメータ :2つの公開鍵・秘密鍵ペア (pk1, sk1) (pk2, sk2)
入力 pk1で暗号化された暗号文
C1=E(pk1,M)
出力 同じメッセージを pk2で暗号化したときの暗号文
C2=E(pk2,M)
ReEncryptionby
メールセンター(sk1が漏れないように難読か )
(pk1, sk1) (pk2, sk2)
E(pk1, M)
E(pk1, M) E(pk2, M)
Page 31
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation31
Positive Result( 3) : 同様に Encrypted Signaturesも難読化できることが知られています。
Encrypted Signatures の処理では、メッセージそのものは暗号化の対象ではないですが、LotusNotesなどの電子メールの署名&暗号化( PGPや S/MIME)のために広く利用されている Sign-then-Encrypt( StE)の処理へ応用可能です。
Sign Encrypt
Alice’s sk(署名鍵) Bob’s pk(暗号化鍵)
m cσ
Verify Decrypt
Alice’s pk(検証鍵) Bob’s sk(復号鍵)
検証結果c
メッセージ
暗号文
難読化の対象Alice(メール送信者)
Bob(メール受信者)
σ
Page 32
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation32
従来のメール・アプリケーションでは、 StE の処理は、ローカル・マシンで行われます。署名鍵もローカルマシンで保持されるので安全です。 (e .g . , Lotus Note s)
Sign-then-Encrypt@LocalApp
Alice’s email application Bob’s email application
ServerServer
Signing keys are stored in
local machines
Page 33
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation33
最近の SaaS環境では、署名鍵はサーバー上に保持され、 StEの処理がサーバー上で行われる必要があります。したがって、署名鍵の漏洩が懸念されます。 (e.g., Lotus Live, Gmail, Hotmail, etc)
Sign-then-Encrypt@
Server
Alice’s Web Mail Bob’s Web Mail
Browser Browser
ServerServerKey leakage is
a potential security issue!!
Browsers have no capability of
sign-then-encrypt
Page 34
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation34
StEプログラムを暗号理論的に難読化することができれば、署名鍵の漏洩を防ぐことができます。
Sign-then-Encrypt@
Server
Alice’s Web Mail Bob’s Web Mail
Browser Browser
ServerServerWe can
obfuscate this program
Page 35
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation35
Basic Idea:署名鍵を暗号化することにより難読化する。ただし、暗号化した署名鍵を使っても、 Encrypted Signature s の処理が可能なようにアルゴリズムを設計する。 Design a pair of signature and encryption schemes such that the
following two are functionally equivalent: signing a message and then encrypting the signature, encrypting the signing key and then signing the message under the
encrypted signing key.
Sign Encrypt
mc
σ
Encrypt
Alice’s sk Bob’s pk
Sign
ObfuscatedEncrypted
Signature Program
Encrypted Alice’s sk
Page 36
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation36
Basic Idea
Input m Output c Stored Info:
Alice’s private signing key
Bob’s public encryption key
Code1. Use Alice’s signing key to sign m
2. Use Bob’s encryption key to encrypt the signature
3. Output the ciphertext
Input m Output c Stored Info:
Alice’s private signing key encrypted by Bob’s public encryption key
Code1.Use the encrypted Alice’s signing key to sign m
2.Output the signature
Obfuscation
難読化前 難読化後
プログラム中に保持される情報は暗号化されているの
で、 Aliceの秘密鍵は漏れない
Page 37
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation37
使用する署名と暗号化のアルゴリズム
署名アルゴリズム (Sign)
Key Pair: (v, s) such that v=gs
g は位数 q (prime) の生成元 for a special group (a bilinear map) v: public verification key s: private signing key
署名生成 σ=Sign(s, m)=H(m) s, where H is a hash function s乗するだけの簡単な計算
検証 Bilinear mapにより簡単にできる(詳細は省略)
暗号化アルゴリズム (Encrypt) Key Pair: (pk, sk)
pk: public encryption key sk: private decryption key
暗号化関数 C←Encrypt(pk, m)とする ランダムに暗号文を生成する
復号の関数については省略
Page 38
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation38
難読化対象の Encrypted Signatureプログラム
Input m Output (c1, c2) Stored Info:
private signing key: s
public encryption key: pk
Code
σ=Sign(m, s )=H(m) sを計算
乱数 rを生成
c1=σ r を計算
c2=Encrypt(pk, r)を計算 (c1,c2)を出力
署名
暗号化
Page 39
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation39
難読化の試み(失敗例)
Input m Output (c1, c2) Stored Info:
private signing key: s
public encryption key: pk
Code
σ=Sign(m, s )=H(m) sを計算
乱数 rを生成
c1=σ r を計算
c2=Encrypt(pk, r)を計算 (c1,c2)を出力
難読化前
Input m Output (c1, c2) Stored Info:
s’=s*r mod q (r は乱数 )
c2=Encrypt(pk, r)
Code
c1=Sign(m, s’ )=H(m) s’ を計算
(c1,c2)を出力Obfuscation
難読化後
(c1,c2)はランダムに生成される (c1,c2)はランダムに生成されない
Page 40
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation40
難読化
Input m Output (c1, c2) Stored Info:
private signing key: s
public encryption key: pk
Code
σ=Sign(m, s )=H(m) sを計算
乱数 rを生成
c1=σ r を計算
c2=Encrypt(pk, r)を計算 (c1,c2)を出力
難読化前
Input m Output (c1, c2) Stored Info:
s’=s*r mod q (r は乱数 )
c=Encrypt(pk, r)
Code 乱数 r’を生成し、 s’’=s’*r’ mod qを計算
c1=Sign(m, s’’ )=H(m) s’’ を計算 ( c1=σ r*r’ を計算)
cと r’から、 (r*r’ mod q)の暗号文c2をランダムに生成(詳細省略するが、こういうことができる特殊な暗号アルゴリズムを使用する必要有り)
(c1,c2)を出力
Obfuscation
難読化後
(c1,c2)はランダムに生成される 同様に、 (c1,c2)はランダムに生成される
Page 41
Confidential | Date | Other Information, if necessary © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料
まとめ
Page 42
IBM China Research Lab
Presentation Title | Presentation Subtitle | Confidential © 2003 IBM Corporation
Tokyo Research Laboratory
講義資料 © 2007 IBM Corporation42
まとめ
安全性の定義
実現可能
実現不可能
安全性の証明が既知(証明が可能)
安全性の証明が不可能あるいは未解決
•プログラムの難読化
•Point Function•ReEncryption•Encrypted signature
•NA
•NA
•Genericな難読化は不可能