Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
暗号技術入門ゼミ 第 2 章前編/Cryptography Primer Semi s2-1
Search
y_k
February 06, 2019
0
90
暗号技術入門ゼミ 第 2 章前編/Cryptography Primer Semi s2-1
暗号技術入門 第3版 第 2 章 歴史上の暗号 -他人が読めない文章を作る- 前編
y_k
February 06, 2019
Tweet
Share
More Decks by y_k
See All by y_k
LDD18Muroran むろらんバスなび
yetanother_yk
0
300
Featured
See All Featured
Visualization
eitanlees
146
15k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Typedesign – Prime Four
hannesfritz
40
2.4k
Why Our Code Smells
bkeepers
PRO
335
57k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
930
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
The Pragmatic Product Professional
lauravandoore
32
6.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Transcript
҉߸ٕज़ೖ ୈ 3 ൛ ୈ 2 ষ ྺ্࢙ͷ҉߸ -ଞਓ͕ಡΊͳ͍จষΛ࡞Δ- લฤ
Koki Yamada February 6, 2019 Muroran-IT σʔλαΠΤϯεݚڀࣨ
͜ͷষͰֶͿ͜ͱ ྺ্࢙࣮ࡍʹΘΕ͖ͯͨ༗໊ͳ҉߸: • γʔβʔ҉߸ • ୯Ұࣈ҉߸ • ΤχάϚ ҉߸ղಡ๏: •
ϒϧʔτɾϑΥʔεɾΞλοΫ • සੳ 1
͜ͷষͰֶͿ͜ͱ ྺ্࢙࣮ࡍʹΘΕ͖ͯͨ༗໊ͳ҉߸: • γʔβʔ҉߸ • ୯Ұࣈ҉߸ • ΤχάϚ ҉߸ղಡ๏: •
ϒϧʔτɾϑΥʔεɾΞλοΫ • සੳ 1
γʔβʔ҉߸
γʔβʔ҉߸ͱ • γʔβʔ҉߸ (caesar cipher) • δϡϦΞεɾγʔβʔʢϢϦεɾΧΤαϧʣ͕͍ͬͯͨ ͱݴΘΕΔ҉߸ • Ұఆͷจࣈ͚ͩʮͣΒ͢ʯ͜ͱʹΑͬͯ҉߸Խ
B C D E F G H I % & ' ( ) จࣈͣΒ͢ 2
ࢼͯ͠ΈΔ https://paiza.io/projects/tGZvu3P_NiusVSHU0cXKWw • encode('yamada') ˠ 'BDPDGD' • decode('BDPDGD') ˠ 'yamada'
3
Ͳ͏ͬͯղಡ͢Δʁ • γʔβʔ҉߸: ͣΒ͢෯Λಛఆ͢Εྑ͍ 4
Ͳ͏ͬͯղಡ͢Δʁ • γʔβʔ҉߸: ͣΒ͢෯Λಛఆ͢Εྑ͍ ྫ: 'PXURUDQ' 4
Ͳ͏ͬͯղಡ͢Δʁ • γʔβʔ҉߸: ͣΒ͢෯Λಛఆ͢Εྑ͍ ྫ: 'PXURUDQ' for i in range(1,
27): print(i, decode('PXURUDQ', i)) 4
Ͳ͏ͬͯղಡ͢Δʁ • γʔβʔ҉߸: ͣΒ͢෯Λಛఆ͢Εྑ͍ ྫ: 'PXURUDQ' 1. owtqtcp 2. nvspsbo
3. muroran 4. ltqnqzm 5. kspmpyl 6. jroloxk 7. iqnknwj 8. hpmjmvi ˠ ʮϒϧʔτɾϑΥʔεɾΞλοΫʯ 4
ϒϧʔτɾϑΥʔεɾΞλοΫ
ϒϧʔτɾϑΥʔεɾΞλοΫͱ • ϒϧʔτɾϑΥʔεɾΞλοΫ (brute-force attack) • ͯ͢ͷݤͷީิΛࢼͯ͠ΈΔͷ • શ୳ࡧɼ૯ͨΓ๏ɼ͠ΒΈͭͿ͠๏ͳͲͱݺΕΔ 5
୯Ұࣈ҉߸
୯Ұࣈ҉߸ͱ • ୯Ұࣈ҉߸ (simple substitution cipher) • จࣈಉ࢜ʹ 1 ର
1 ͷରԠؔ 6
۩ମྫ ʜ B C D E F G H I
% & ' ( ) " # $ J K L M - * + , N O P 0 . / ʜ B C D E F G H I % & ' ( ) " # $ J K L M - * + , N O P 0 . / Figure 1: ࣈදͷҰྫ 7
ϒϧʔτɾϑΥʔεɾΞλοΫʹΑΔղಡ ݤύλʔϯ: 26 × 25 × 24 × · ·
· × 1 = 403291461126605635584000000 4 ஹͷ 1000 ஹഒ 8
ϒϧʔτɾϑΥʔεɾΞλοΫʹΑΔղಡ ݤύλʔϯ: 26 × 25 × 24 × · ·
· × 1 = 403291461126605635584000000 4 ஹͷ 1000 ஹഒ ϒϧʔτɾϑΥʔεɾΞλοΫʹΑΔղಡࠔ ˠผͷํ๏͕ͳ͍͔ʁ 8
සੳʹΑΔղಡ
සੳ • ฏจʹొ͢Δจࣈͷසͱ҉߸จʹొ͢Δจࣈͷස͕ Ұக͢Δ͜ͱΛར༻ • ӳࣈͷొස: e ˠ t ˠ
a ˠ o ˠ i ˠ n ˠ s ... (ΤυΨʔɾΞϥϯɾϙʔʰԫۚʱ) 9
සੳͷཁ • සͷߴ͍จࣈ͚ͩͰͳ͘ɼ͍จࣈख͕͔Γʹ • ͡ΊͱऴΘΓ͕Θ͔Δͱख͕͔Γʹɼ୯ޠͷ۠ΓΘ͔ Εख͕͔Γʹʁ • ҉߸จ͕͍ͱղಡ͍͢͠ • ಉ͡จࣈͷ࿈ଓख͕͔Γʹ
ʢ͋Δจࣈ͕Ͳͷจࣈʹ҉߸Խ͞ΕΔ͔ܾ·͍ͬͯΔͨΊ • ղಡͷεϐʔυͩΜͩΜ্͕Δ 10
ΫΠζ
ΫΠζ 1: γʔβʔ҉߸ͷղಡ 'PELCGBTENCUL' 11
ΫΠζ 2: ୯Ұࣈ҉߸ͷʮվྑʯ ಉ͡จࣈʹม (c ˠ C, q ˠ Q)
͞Εͳ͍Α͏ͳࣈදΛ͏ͱͲ ͏ͳΔ͔ʁ 12