SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
暗認本読書会5
鍵共有, 有限体, 拡大体, 公開鍵暗号, 安全性
2021/10/28
https://anninbon.connpass.com/
光成滋生
• 1975 Merkle パズルを解く仕組みを利用
• 1976 Diffie, Hellman 鍵共有
• 1970年頃イギリスの政府通信本部GCHQが発見していた
• ベキ乗の性質
• 𝑔𝑎 𝑏 = 𝑔𝑎𝑏 = 𝑔𝑏 𝑎
• コンピュータで扱いづらいのでnで割った余りを考える
• mod nとか% nと書く
• 𝑔𝑎 mod 𝑛 𝑏mod 𝑛 = 𝑔𝑏mod 𝑛
𝑎
mod 𝑛
• 𝐴 = 𝑔𝑎mod 𝑛, 𝐵 = 𝑔𝑏mod 𝑛とすると𝐴𝑏 ≡ 𝐵𝑎(𝑚𝑜𝑑 𝑛)
• 𝑛で割った余りが等しい
2 / 24
鍵共有
3 / 24
DH鍵共有
• 攻撃者(盗聴者)が入手できる情報
• 公開されているgとn
• 通信経路を流れるAとB
• これから𝑔𝑎𝑏mod 𝑛を計算できるか
4 / 24
DH鍵共有の安全性
• (𝑔, 𝑛, 𝑔𝑎
mod 𝑛, 𝑔𝑏
mod 𝑛)から𝑔𝑎𝑏
mod 𝑛を求めよ
• DHPという
• 過去40年以上研究されてる
• 𝑛~22048となる素数なら今後20年ぐらいは解けないだろう
• DLP : (𝑔, 𝑛, 𝑔𝑎mod 𝑛)から𝑎を求めよ
• 同様に研究されていてDHPと同じ難しさ
• 注意 : DLPが解けるならDHPは解ける
• 一方向性関数
5 / 24
DHP(DH Problem)とDLP
• 𝑥𝑎 mod 𝑛を𝑥, 𝑥2, 𝑥3, …と計算していては𝑎~22048なら
永久に終わらない
• バイナリ法
• 𝑥100の計算例
• 𝑎~22048でも約4000回の演算で𝑥𝑎 mod 𝑛を計算可能
6 / 24
ベキ乗の計算方法
• nで割った余りの集合𝑆 = {0, 1, 2, … , 𝑛 − 1}
• 加算・減算・乗算は普通の演算の後mod nすればよい
• 𝑛 = 5のときの乗算表(𝑎 × 𝑏)
• 割り算は?
• 1/3 = ???
• 3倍したら1になる値Xを考える ; 1/3 = X ⇔ 1 = X×3
• 表を見ると2 × 3 = 1
7 / 24
有限体と拡大体(ちょっと数学)
a\b 1 2 3 4
1 1 2 3 4
2 2 4 1 3
3 3 1 4 2
4 4 3 2 1
a 1 2 3 4
1/a 1 3 2 4
• 体
• 加減乗除ができる集合
• 実数体
• 複素数体
• 有理数体(分数の集合)
• 有限体
• 有限個の集合からなる体
• 𝑛が素数のとき𝑛で割った余りの集合は有限体になる
• 𝑛が合成数のときは体にならない
• 𝑛 = 6なら3 × 1 = 3, 3 × 2 = 0, 3 × 3 = 3, 3 × 4 = 0,3 × 5 = 3
• 𝔽𝑝 = {0,1,2,3, … 𝑝 − 1} ; 𝑝は素数
8 / 24
有限体
• 体の要素を複数個並べてより大きな体を作る
• 𝑥1, 𝑥2, 𝑥3 , (𝑦1, 𝑦2, 𝑦3)とあったときに要素ごとの掛け算
(𝑥1𝑦1, 𝑥2𝑦2, 𝑥3𝑦3)では新しいものが生まれない
• 𝔽𝑝
3
のDLPの難しさは𝔽𝑝のDLPの難しさと同じ
• 新しい「掛け算」を導入する
• 例
• 実数𝑎, 𝑏を2個を組み合わせて𝑎 + 𝑏𝑖とする(𝑖 = −1)
• 複素数体は実数体の2次拡大体
• 掛け算 𝑎 + 𝑏𝑖 𝑐 + 𝑑𝑖 = 𝑎𝑐 − 𝑏𝑑 + 𝑎𝑑 + 𝑏𝑐 𝑖
9 / 24
拡大体
• 𝔽2 = 0,1
• 2個しか要素が無いけど体
• 1+1=0, 1-1=0, 1×1=1, 1/1 = 1
• 𝔽22 : 𝔽2の2次拡大体
• 𝔽2の要素𝑎, 𝑏を並べて𝑎 + 𝑏𝑥とする(𝑥は多項式の変数)。
• 加減算は要素ごとの計算
• 𝑎 + 𝑏𝑥 ± 𝑐 + 𝑑𝑥 = 𝑎 ± 𝑐 + 𝑏 ± 𝑑 𝑥
• 乗算 : 規則 : 𝑥2を𝑥 + 1に置き換える
• 例 : 𝑥 𝑥 + 1 = 𝑥2
+ 𝑥 = 𝑥 + 1 + 𝑥 = 2𝑥 + 1 = 1
10 / 24
𝔽2の2次拡大体
• 加算
• 乗算
• 逆数
11 / 24
𝔽22の演算表
a\b 0 1 x x+1
0 0 1 x x+1
1 1 0 x+1 x
x x x+1 0 1
x+1 x+1 x 1 0
a\b 0 1 x x+1
0 0 0 0 0
1 0 1 x x+1
x 0 x x+1 1
x+1 0 x+1 1 x
a 1 x x+1
1/a 1 x+1 x
• 𝔽22 ≠ {0, 1, 2, 3}
• 4で割った余りの集合は体ではない(2 × 𝑎 = 1となる𝑎が無い)
• 複素数体の乗算は𝑥2
を-1に置き換える規則を適用
• 𝑎 + 𝑏𝑥 𝑐 + 𝑑𝑥 = 𝑎𝑐 + 𝑏𝑑𝑥2
+ 𝑎𝑑 + 𝑏𝑐 𝑥
= 𝑎𝑐 − 𝑏𝑑 + 𝑎𝑑 + 𝑏𝑐 𝑥 ; 𝑥を −1とみなせる
• 別の規則を使うと別の拡大体を作れる
• 𝔽28 ; 8bit値の集合(𝑎0, 𝑎1, 𝑎2, 𝑎3, 𝑎4, 𝑎5, 𝑎6, 𝑎7) ; 𝑎𝑖 ∈ 𝔽2
• 𝑥8を𝑥4 + 𝑥3 + 𝑥2 + 1に置き換える ; AESで使われる
• 𝔽2128 ;128bit値の集合
• 𝑥128を𝑥7 + 𝑥2 + 𝑥 + 1に置き換える ; XTS-AESやAES-GCMなど
12 / 24
注意
• 暗号化鍵𝑆 ≠復号鍵𝑠
• 共通鍵暗号 公開鍵暗号
• 復号鍵𝑠は自分だけの秘密(秘密鍵)
• 暗号化鍵𝑆は誰が知っててもよい(公開鍵)
• 公開鍵𝑆から秘密鍵𝑠を求めることはできない
13 / 24
公開鍵暗号
復号鍵𝑠
平文 暗号文
暗号鍵𝑠
暗号化
復号
復号鍵𝑠
平文 暗号文
暗号鍵𝑆
暗号化
復号
• 鍵生成
• 暗号化
• 復号
14 / 24
公開鍵暗号のアルゴリズム
• 多人数の間で管理すべき秘密鍵の比較
• 公開鍵暗号は自分が管理する秘密鍵は人数によらず1個
15 / 24
共通鍵暗号との違い
• 決定的アルゴリズムな公開鍵暗号は安全ではない
• 選択平文攻撃CPA(Chosen Plaintext Attack)
• 攻撃者は自分の好きな平文を選んでその暗号文を取得できる
• 公開鍵暗号はいつでもCPAが可能
• 共通鍵暗号よりも強い攻撃者を想定する必要がある
16 / 24
公開鍵暗号の安全性
• CCA(Chosen Ciphertext Attack)
• 自分の好きな暗号文(≠ターゲット暗号文)を選んで
その平文を取得できる
• 攻撃者と挑戦者アリスのゲーム
• 攻撃者が2個の平文𝑚1, 𝑚2を選びアリスに渡す
• アリスはどちらかの平文を選び、その暗号文𝑐を攻撃者に渡す
• 攻撃者は暗号文𝑐がどちらの平文を暗号化したものか当てる
• 当てたら攻撃者の勝ち(攻撃成功)
• 攻撃者に非常に有利なゲーム
17 / 24
選択暗号文攻撃とゲーム
• CCA1 ; ゲーム開始前に情報収集可
• CCA2 ; ゲーム開始後に情報収集可(適応的CCA)
• CCA1(rep. CCA2)に対して安全な公開鍵暗号を
IND-CCA1(resp. CCA2)安全という(INDistinguishability)
18 / 24
IND-CCA1とIND-CCA2
• IND-CCA2安全な公開鍵暗号は強秘匿性をもつ
• 暗号文から平文の情報が少しも得られない
• 頑強性
• 暗号文を少しいじって平文を操作することができない
• e.g., ストリーム暗号は暗号文の特定のビット反転で対応する
平文のビットが反転できた
• IND-CCA2安全な公開鍵暗号は頑強性も持つ
19 / 24
強秘匿性と頑強性
• 公開鍵暗号は共通鍵暗号に比べて遅い
• 両者を組み合わせて使う
• KEM-DEMフレームワーク
• KEM(Key Encapsulation Mechanism), DEM(Data EM)
• TLSではHPKEの標準化が検討中(後の章で紹介)
20 / 24
ハイブリッド暗号

Weitere ähnliche Inhalte

Was ist angesagt?

『データ解析におけるプライバシー保護』勉強会 秘密計算
『データ解析におけるプライバシー保護』勉強会 秘密計算『データ解析におけるプライバシー保護』勉強会 秘密計算
『データ解析におけるプライバシー保護』勉強会 秘密計算
MITSUNARI Shigeo
 
ペアリングベースの効率的なレベル2準同型暗号(SCIS2018)
ペアリングベースの効率的なレベル2準同型暗号(SCIS2018)ペアリングベースの効率的なレベル2準同型暗号(SCIS2018)
ペアリングベースの効率的なレベル2準同型暗号(SCIS2018)
MITSUNARI Shigeo
 
Lifted-ElGamal暗号を用いた任意関数演算の二者間秘密計算プロトコルのmaliciousモデルにおける効率化
Lifted-ElGamal暗号を用いた任意関数演算の二者間秘密計算プロトコルのmaliciousモデルにおける効率化Lifted-ElGamal暗号を用いた任意関数演算の二者間秘密計算プロトコルのmaliciousモデルにおける効率化
Lifted-ElGamal暗号を用いた任意関数演算の二者間秘密計算プロトコルのmaliciousモデルにおける効率化
MITSUNARI Shigeo
 

Was ist angesagt? (20)

技術勉強会(楕円曲線暗号)資料
技術勉強会(楕円曲線暗号)資料技術勉強会(楕円曲線暗号)資料
技術勉強会(楕円曲線暗号)資料
 
暗認本読書会12
暗認本読書会12暗認本読書会12
暗認本読書会12
 
楕円曲線と暗号
楕円曲線と暗号楕円曲線と暗号
楕円曲線と暗号
 
ブロックチェーン系プロジェクトで着目される暗号技術
ブロックチェーン系プロジェクトで着目される暗号技術ブロックチェーン系プロジェクトで着目される暗号技術
ブロックチェーン系プロジェクトで着目される暗号技術
 
暗認本読書会11
暗認本読書会11暗認本読書会11
暗認本読書会11
 
RSA暗号運用でやってはいけない n のこと #ssmjp
RSA暗号運用でやってはいけない n のこと #ssmjpRSA暗号運用でやってはいけない n のこと #ssmjp
RSA暗号運用でやってはいけない n のこと #ssmjp
 
『データ解析におけるプライバシー保護』勉強会 秘密計算
『データ解析におけるプライバシー保護』勉強会 秘密計算『データ解析におけるプライバシー保護』勉強会 秘密計算
『データ解析におけるプライバシー保護』勉強会 秘密計算
 
暗号化したまま計算できる暗号技術とOSS開発による広がり
暗号化したまま計算できる暗号技術とOSS開発による広がり暗号化したまま計算できる暗号技術とOSS開発による広がり
暗号化したまま計算できる暗号技術とOSS開発による広がり
 
範囲証明つき準同型暗号とその対話的プロトコル
範囲証明つき準同型暗号とその対話的プロトコル範囲証明つき準同型暗号とその対話的プロトコル
範囲証明つき準同型暗号とその対話的プロトコル
 
暗認本読書会4
暗認本読書会4暗認本読書会4
暗認本読書会4
 
楕円曲線入門 トーラスと楕円曲線のつながり
楕円曲線入門トーラスと楕円曲線のつながり楕円曲線入門トーラスと楕円曲線のつながり
楕円曲線入門 トーラスと楕円曲線のつながり
 
暗号技術入門
暗号技術入門暗号技術入門
暗号技術入門
 
ペアリングベースの効率的なレベル2準同型暗号(SCIS2018)
ペアリングベースの効率的なレベル2準同型暗号(SCIS2018)ペアリングベースの効率的なレベル2準同型暗号(SCIS2018)
ペアリングベースの効率的なレベル2準同型暗号(SCIS2018)
 
暗号技術の実装と数学
暗号技術の実装と数学暗号技術の実装と数学
暗号技術の実装と数学
 
新しい暗号技術
新しい暗号技術新しい暗号技術
新しい暗号技術
 
Bitcoinを技術的に理解する
Bitcoinを技術的に理解するBitcoinを技術的に理解する
Bitcoinを技術的に理解する
 
暗認本読書会10
暗認本読書会10暗認本読書会10
暗認本読書会10
 
Lifted-ElGamal暗号を用いた任意関数演算の二者間秘密計算プロトコルのmaliciousモデルにおける効率化
Lifted-ElGamal暗号を用いた任意関数演算の二者間秘密計算プロトコルのmaliciousモデルにおける効率化Lifted-ElGamal暗号を用いた任意関数演算の二者間秘密計算プロトコルのmaliciousモデルにおける効率化
Lifted-ElGamal暗号を用いた任意関数演算の二者間秘密計算プロトコルのmaliciousモデルにおける効率化
 
自作ペアリング/BLS署名ライブラリの紹介
自作ペアリング/BLS署名ライブラリの紹介自作ペアリング/BLS署名ライブラリの紹介
自作ペアリング/BLS署名ライブラリの紹介
 
GoogleのSHA-1のはなし
GoogleのSHA-1のはなしGoogleのSHA-1のはなし
GoogleのSHA-1のはなし
 

Ähnlich wie 暗認本読書会5

Calc 8.7 l'hopital
Calc 8.7 l'hopitalCalc 8.7 l'hopital
Calc 8.7 l'hopital
hartcher
 
Calc 8.7 again
Calc 8.7 againCalc 8.7 again
Calc 8.7 again
hartcher
 

Ähnlich wie 暗認本読書会5 (20)

Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key Signatures
 
Beating Floating Point at its Own Game: Posit Arithmetic
Beating Floating Point at its Own Game: Posit ArithmeticBeating Floating Point at its Own Game: Posit Arithmetic
Beating Floating Point at its Own Game: Posit Arithmetic
 
Number theory and cryptography
Number theory and cryptographyNumber theory and cryptography
Number theory and cryptography
 
Calc 8.7 l'hopital
Calc 8.7 l'hopitalCalc 8.7 l'hopital
Calc 8.7 l'hopital
 
Beyond Floating Point – Next Generation Computer Arithmetic
Beyond Floating Point – Next Generation Computer ArithmeticBeyond Floating Point – Next Generation Computer Arithmetic
Beyond Floating Point – Next Generation Computer Arithmetic
 
CHAPTER 1.ppt
CHAPTER 1.pptCHAPTER 1.ppt
CHAPTER 1.ppt
 
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
Discrete Logarithmic Problem- Basis of Elliptic Curve CryptosystemsDiscrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
 
Cs166 mynote
Cs166 mynoteCs166 mynote
Cs166 mynote
 
02 Analysis of Algorithms: Divide and Conquer
02 Analysis of Algorithms: Divide and Conquer02 Analysis of Algorithms: Divide and Conquer
02 Analysis of Algorithms: Divide and Conquer
 
Counting (Using Computer)
Counting (Using Computer)Counting (Using Computer)
Counting (Using Computer)
 
Class3
Class3Class3
Class3
 
Lec 06
Lec 06Lec 06
Lec 06
 
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
 
PETERSON BERGE
PETERSON BERGEPETERSON BERGE
PETERSON BERGE
 
DDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDD
 
1201 ch 12 day 1
1201 ch 12 day 11201 ch 12 day 1
1201 ch 12 day 1
 
1
11
1
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithms
 
Now You're Speaking My Language!
Now You're Speaking My Language!Now You're Speaking My Language!
Now You're Speaking My Language!
 
Calc 8.7 again
Calc 8.7 againCalc 8.7 again
Calc 8.7 again
 

Mehr von MITSUNARI Shigeo

ElGamal型暗号文に対する任意関数演算・再暗号化の二者間秘密計算プロトコルとその応用
ElGamal型暗号文に対する任意関数演算・再暗号化の二者間秘密計算プロトコルとその応用ElGamal型暗号文に対する任意関数演算・再暗号化の二者間秘密計算プロトコルとその応用
ElGamal型暗号文に対する任意関数演算・再暗号化の二者間秘密計算プロトコルとその応用
MITSUNARI Shigeo
 
レベル2準同型暗号の平文バイナリ制約を与えるコンパクトな非対話ゼロ知識証明
レベル2準同型暗号の平文バイナリ制約を与えるコンパクトな非対話ゼロ知識証明レベル2準同型暗号の平文バイナリ制約を与えるコンパクトな非対話ゼロ知識証明
レベル2準同型暗号の平文バイナリ制約を与えるコンパクトな非対話ゼロ知識証明
MITSUNARI Shigeo
 

Mehr von MITSUNARI Shigeo (14)

Intel AVX-512/富岳SVE用SIMDコード生成ライブラリsimdgen
Intel AVX-512/富岳SVE用SIMDコード生成ライブラリsimdgenIntel AVX-512/富岳SVE用SIMDコード生成ライブラリsimdgen
Intel AVX-512/富岳SVE用SIMDコード生成ライブラリsimdgen
 
暗認本読書会8
暗認本読書会8暗認本読書会8
暗認本読書会8
 
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
 
私とOSSの25年
私とOSSの25年私とOSSの25年
私とOSSの25年
 
WebAssembly向け多倍長演算の実装
WebAssembly向け多倍長演算の実装WebAssembly向け多倍長演算の実装
WebAssembly向け多倍長演算の実装
 
HPC Phys-20201203
HPC Phys-20201203HPC Phys-20201203
HPC Phys-20201203
 
LazyFP vulnerabilityの紹介
LazyFP vulnerabilityの紹介LazyFP vulnerabilityの紹介
LazyFP vulnerabilityの紹介
 
Intro to SVE 富岳のA64FXを触ってみた
Intro to SVE 富岳のA64FXを触ってみたIntro to SVE 富岳のA64FXを触ってみた
Intro to SVE 富岳のA64FXを触ってみた
 
ゆるバグ
ゆるバグゆるバグ
ゆるバグ
 
ElGamal型暗号文に対する任意関数演算・再暗号化の二者間秘密計算プロトコルとその応用
ElGamal型暗号文に対する任意関数演算・再暗号化の二者間秘密計算プロトコルとその応用ElGamal型暗号文に対する任意関数演算・再暗号化の二者間秘密計算プロトコルとその応用
ElGamal型暗号文に対する任意関数演算・再暗号化の二者間秘密計算プロトコルとその応用
 
A compact zero knowledge proof to restrict message space in homomorphic encry...
A compact zero knowledge proof to restrict message space in homomorphic encry...A compact zero knowledge proof to restrict message space in homomorphic encry...
A compact zero knowledge proof to restrict message space in homomorphic encry...
 
Spectre/Meltdownとその派生
Spectre/Meltdownとその派生Spectre/Meltdownとその派生
Spectre/Meltdownとその派生
 
Practical Two-level Homomorphic Encryption in Prime-order Bilinear Groups
Practical Two-level Homomorphic Encryption in Prime-order Bilinear GroupsPractical Two-level Homomorphic Encryption in Prime-order Bilinear Groups
Practical Two-level Homomorphic Encryption in Prime-order Bilinear Groups
 
レベル2準同型暗号の平文バイナリ制約を与えるコンパクトな非対話ゼロ知識証明
レベル2準同型暗号の平文バイナリ制約を与えるコンパクトな非対話ゼロ知識証明レベル2準同型暗号の平文バイナリ制約を与えるコンパクトな非対話ゼロ知識証明
レベル2準同型暗号の平文バイナリ制約を与えるコンパクトな非対話ゼロ知識証明
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

暗認本読書会5

  • 1. 暗認本読書会5 鍵共有, 有限体, 拡大体, 公開鍵暗号, 安全性 2021/10/28 https://anninbon.connpass.com/ 光成滋生
  • 2. • 1975 Merkle パズルを解く仕組みを利用 • 1976 Diffie, Hellman 鍵共有 • 1970年頃イギリスの政府通信本部GCHQが発見していた • ベキ乗の性質 • 𝑔𝑎 𝑏 = 𝑔𝑎𝑏 = 𝑔𝑏 𝑎 • コンピュータで扱いづらいのでnで割った余りを考える • mod nとか% nと書く • 𝑔𝑎 mod 𝑛 𝑏mod 𝑛 = 𝑔𝑏mod 𝑛 𝑎 mod 𝑛 • 𝐴 = 𝑔𝑎mod 𝑛, 𝐵 = 𝑔𝑏mod 𝑛とすると𝐴𝑏 ≡ 𝐵𝑎(𝑚𝑜𝑑 𝑛) • 𝑛で割った余りが等しい 2 / 24 鍵共有
  • 4. • 攻撃者(盗聴者)が入手できる情報 • 公開されているgとn • 通信経路を流れるAとB • これから𝑔𝑎𝑏mod 𝑛を計算できるか 4 / 24 DH鍵共有の安全性
  • 5. • (𝑔, 𝑛, 𝑔𝑎 mod 𝑛, 𝑔𝑏 mod 𝑛)から𝑔𝑎𝑏 mod 𝑛を求めよ • DHPという • 過去40年以上研究されてる • 𝑛~22048となる素数なら今後20年ぐらいは解けないだろう • DLP : (𝑔, 𝑛, 𝑔𝑎mod 𝑛)から𝑎を求めよ • 同様に研究されていてDHPと同じ難しさ • 注意 : DLPが解けるならDHPは解ける • 一方向性関数 5 / 24 DHP(DH Problem)とDLP
  • 6. • 𝑥𝑎 mod 𝑛を𝑥, 𝑥2, 𝑥3, …と計算していては𝑎~22048なら 永久に終わらない • バイナリ法 • 𝑥100の計算例 • 𝑎~22048でも約4000回の演算で𝑥𝑎 mod 𝑛を計算可能 6 / 24 ベキ乗の計算方法
  • 7. • nで割った余りの集合𝑆 = {0, 1, 2, … , 𝑛 − 1} • 加算・減算・乗算は普通の演算の後mod nすればよい • 𝑛 = 5のときの乗算表(𝑎 × 𝑏) • 割り算は? • 1/3 = ??? • 3倍したら1になる値Xを考える ; 1/3 = X ⇔ 1 = X×3 • 表を見ると2 × 3 = 1 7 / 24 有限体と拡大体(ちょっと数学) a\b 1 2 3 4 1 1 2 3 4 2 2 4 1 3 3 3 1 4 2 4 4 3 2 1 a 1 2 3 4 1/a 1 3 2 4
  • 8. • 体 • 加減乗除ができる集合 • 実数体 • 複素数体 • 有理数体(分数の集合) • 有限体 • 有限個の集合からなる体 • 𝑛が素数のとき𝑛で割った余りの集合は有限体になる • 𝑛が合成数のときは体にならない • 𝑛 = 6なら3 × 1 = 3, 3 × 2 = 0, 3 × 3 = 3, 3 × 4 = 0,3 × 5 = 3 • 𝔽𝑝 = {0,1,2,3, … 𝑝 − 1} ; 𝑝は素数 8 / 24 有限体
  • 9. • 体の要素を複数個並べてより大きな体を作る • 𝑥1, 𝑥2, 𝑥3 , (𝑦1, 𝑦2, 𝑦3)とあったときに要素ごとの掛け算 (𝑥1𝑦1, 𝑥2𝑦2, 𝑥3𝑦3)では新しいものが生まれない • 𝔽𝑝 3 のDLPの難しさは𝔽𝑝のDLPの難しさと同じ • 新しい「掛け算」を導入する • 例 • 実数𝑎, 𝑏を2個を組み合わせて𝑎 + 𝑏𝑖とする(𝑖 = −1) • 複素数体は実数体の2次拡大体 • 掛け算 𝑎 + 𝑏𝑖 𝑐 + 𝑑𝑖 = 𝑎𝑐 − 𝑏𝑑 + 𝑎𝑑 + 𝑏𝑐 𝑖 9 / 24 拡大体
  • 10. • 𝔽2 = 0,1 • 2個しか要素が無いけど体 • 1+1=0, 1-1=0, 1×1=1, 1/1 = 1 • 𝔽22 : 𝔽2の2次拡大体 • 𝔽2の要素𝑎, 𝑏を並べて𝑎 + 𝑏𝑥とする(𝑥は多項式の変数)。 • 加減算は要素ごとの計算 • 𝑎 + 𝑏𝑥 ± 𝑐 + 𝑑𝑥 = 𝑎 ± 𝑐 + 𝑏 ± 𝑑 𝑥 • 乗算 : 規則 : 𝑥2を𝑥 + 1に置き換える • 例 : 𝑥 𝑥 + 1 = 𝑥2 + 𝑥 = 𝑥 + 1 + 𝑥 = 2𝑥 + 1 = 1 10 / 24 𝔽2の2次拡大体
  • 11. • 加算 • 乗算 • 逆数 11 / 24 𝔽22の演算表 a\b 0 1 x x+1 0 0 1 x x+1 1 1 0 x+1 x x x x+1 0 1 x+1 x+1 x 1 0 a\b 0 1 x x+1 0 0 0 0 0 1 0 1 x x+1 x 0 x x+1 1 x+1 0 x+1 1 x a 1 x x+1 1/a 1 x+1 x
  • 12. • 𝔽22 ≠ {0, 1, 2, 3} • 4で割った余りの集合は体ではない(2 × 𝑎 = 1となる𝑎が無い) • 複素数体の乗算は𝑥2 を-1に置き換える規則を適用 • 𝑎 + 𝑏𝑥 𝑐 + 𝑑𝑥 = 𝑎𝑐 + 𝑏𝑑𝑥2 + 𝑎𝑑 + 𝑏𝑐 𝑥 = 𝑎𝑐 − 𝑏𝑑 + 𝑎𝑑 + 𝑏𝑐 𝑥 ; 𝑥を −1とみなせる • 別の規則を使うと別の拡大体を作れる • 𝔽28 ; 8bit値の集合(𝑎0, 𝑎1, 𝑎2, 𝑎3, 𝑎4, 𝑎5, 𝑎6, 𝑎7) ; 𝑎𝑖 ∈ 𝔽2 • 𝑥8を𝑥4 + 𝑥3 + 𝑥2 + 1に置き換える ; AESで使われる • 𝔽2128 ;128bit値の集合 • 𝑥128を𝑥7 + 𝑥2 + 𝑥 + 1に置き換える ; XTS-AESやAES-GCMなど 12 / 24 注意
  • 13. • 暗号化鍵𝑆 ≠復号鍵𝑠 • 共通鍵暗号 公開鍵暗号 • 復号鍵𝑠は自分だけの秘密(秘密鍵) • 暗号化鍵𝑆は誰が知っててもよい(公開鍵) • 公開鍵𝑆から秘密鍵𝑠を求めることはできない 13 / 24 公開鍵暗号 復号鍵𝑠 平文 暗号文 暗号鍵𝑠 暗号化 復号 復号鍵𝑠 平文 暗号文 暗号鍵𝑆 暗号化 復号
  • 14. • 鍵生成 • 暗号化 • 復号 14 / 24 公開鍵暗号のアルゴリズム
  • 16. • 決定的アルゴリズムな公開鍵暗号は安全ではない • 選択平文攻撃CPA(Chosen Plaintext Attack) • 攻撃者は自分の好きな平文を選んでその暗号文を取得できる • 公開鍵暗号はいつでもCPAが可能 • 共通鍵暗号よりも強い攻撃者を想定する必要がある 16 / 24 公開鍵暗号の安全性
  • 17. • CCA(Chosen Ciphertext Attack) • 自分の好きな暗号文(≠ターゲット暗号文)を選んで その平文を取得できる • 攻撃者と挑戦者アリスのゲーム • 攻撃者が2個の平文𝑚1, 𝑚2を選びアリスに渡す • アリスはどちらかの平文を選び、その暗号文𝑐を攻撃者に渡す • 攻撃者は暗号文𝑐がどちらの平文を暗号化したものか当てる • 当てたら攻撃者の勝ち(攻撃成功) • 攻撃者に非常に有利なゲーム 17 / 24 選択暗号文攻撃とゲーム
  • 18. • CCA1 ; ゲーム開始前に情報収集可 • CCA2 ; ゲーム開始後に情報収集可(適応的CCA) • CCA1(rep. CCA2)に対して安全な公開鍵暗号を IND-CCA1(resp. CCA2)安全という(INDistinguishability) 18 / 24 IND-CCA1とIND-CCA2
  • 19. • IND-CCA2安全な公開鍵暗号は強秘匿性をもつ • 暗号文から平文の情報が少しも得られない • 頑強性 • 暗号文を少しいじって平文を操作することができない • e.g., ストリーム暗号は暗号文の特定のビット反転で対応する 平文のビットが反転できた • IND-CCA2安全な公開鍵暗号は頑強性も持つ 19 / 24 強秘匿性と頑強性
  • 20. • 公開鍵暗号は共通鍵暗号に比べて遅い • 両者を組み合わせて使う • KEM-DEMフレームワーク • KEM(Key Encapsulation Mechanism), DEM(Data EM) • TLSではHPKEの標準化が検討中(後の章で紹介) 20 / 24 ハイブリッド暗号