Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
勉強会 #4
Search
titech.crypto
May 27, 2018
330
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
勉強会 #4
ハッシュ関数について②
titech.crypto
May 27, 2018
More Decks by titech.crypto
See All by titech.crypto
Crypgeek 勉強会 #13
titechcrypto
0
460
Lightning network
titechcrypto
0
43
About Bitcoin and its cryptography
titechcrypto
0
110
第8回 CrypGeek勉強会
titechcrypto
0
81
勉強会_7ゼロ知識証明.pdf
titechcrypto
0
440
勉強会7.pdf
titechcrypto
0
450
勉強会 #6
titechcrypto
0
370
勉強会 #6
titechcrypto
0
380
勉強会 #4
titechcrypto
0
260
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
360
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Transcript
ハッシュ関数2 第4回 CrypGeek勉強会
ハッシュ関数のおさらい 衝突困難性 (撹拌) 実用性 (速度) 固定長出力 (圧縮・拡張) 一意対応
MD変換(基本形) • 圧縮関数 固定長 (> )の入力を固定長の出力()に圧縮 ()からがわからないようにする(攪拌・一方向性) • MD変換の手順 パディング・分割・圧縮でハッシュ関数を実現する
1. の長さをの整数倍にパディングする(′) 2.′を長さnのブロックに分割(* ,, , …, .) 3. ℎ0 = 0… 0(長さ)と* を繋げて (入力 + ,出力) に掛ける (ℎ0 ||* ) = ℎ* 4. (ℎ5 ||56* ) = ℎ56* を繰り返して ℎ = ℎ. を出力する
MD変換(一般形) • MD変換(一般形) 基本形同様、パディング・分割・圧縮をする 1.の長さ||をの整数倍にパディングする (′, 7 = + )
2.′を長さnのブロックに分割(* ,, , …, .) 3. ℎ0 = 000… 0(長さ + )と* を繋げて (入力 + + ,出力)に掛ける (ℎ0 ||||* ) = ℎ* 4. (ℎ5 ||||56* ) = ℎ56* を繰り返す 5. .6* = 0… 0||()とし、 (ℎ. ||1||.6* ) = ℎ.6* を出力する
圧縮関数 • ハッシュ関数専用の構成法 • ブロック暗号を利用した構成法:PGV法 • 数論的安全性を根拠とした構成法:算術的圧縮関数
PGV法 • ブロック暗号(AESなど)を使った圧縮関数 • 入力:ℎCD*,C( ℎCD* = C = )
• 攪拌: , , ∈ ℎCD*,C,ℎCD* ⊕ C,0… 0 とし , をブロック暗号アルゴリズム()に入力そ の出力との排他論理和をℎC とする ℎC = , ⊕ = = = = • 出力:ℎC( ℎC = )
算術的圧縮関数 • 算術演算ベースの圧縮関数(論理演算は使わない) • 素数, = 2 + 1とし、をの原始元(P =
− 1), ∈ {1, … , − 1}とする. • 入力:ℎCD* , C ∈ {1, … , − 1} • 攪拌:ℎC = ℎCD* , C = TUVWXU • 出力: ℎC ∈ {1, …, − 1}
圧縮関数の安全性 • 圧縮関数の安全性<ハッシュ関数の安全性 • 近似衝突:似たようなハッシュ値を出す異なるメッセージペア, 7 が効率的に求まる • 擬似衝突性:異なる初期ベクトル, 7に対して
≠ ′かつ(| = (′| 7 なる, ′が効率的に求まる • 近似衝突<擬似衝突<衝突
代表的なハッシュ関数:SHA-1
代表的なハッシュ関数:SHA-3 • MD変換と違って圧縮処理をし ない • スポンジ構造:メッセージを吸収 して、ハッシュを搾り取る 重要な関数は攪拌処理だけで 良いので関数の入出力の長さ に対して柔軟
代表的なハッシュ関数:SHA-3 • Keccac • 撹拌関数について(p.18) • c(capacity)について(p.21) • b(width)について(p.22)