기본 콘텐츠로 건너뛰기

2017 암호경진대회 1번

알파벳으로 구성된 평문을 2개의 값으로 shift하는 key table로 암호화한 암호문이 주어졌을때 평문을 찾는 문제입니다.

소문제 1번은 경우 암호문길이가 길어서 풀 수 있었는데, 2번의 경우 길이가 너무 짧아 못풀었습니다.

제출한 답안 그대로 올릴겠습니다

1-1.
복구된 평문:
youneedtomanageyourresourcesspeednolongermattersitusedtobethecasethatprogramstookareallylongtimetoruncpuswereexpensivememorywasexpensiverunningtimeofaprogramusedtobeanimportantmetriccomputerswereveryexpensiveandsowastheelectricitytorunthemoptimizationoftheseresourceswasdonebecauseofaneternalbusinesslawoptimizeyourmostexpensiveresourcehistoricallythemostexpensiveresourcewascomputerruntimethisiswhatleadtothestudyofcomputersciencewhichfocusesonefficiencyofdifferentalgorithmshoweverthisisnolongertrueassiliconisnowcheaplikereallycheapruntimeisnolongeryourmostexpensiveresourceacompanysmostexpensiveresourceisnowitsemployeestimeorinotherwordsyouitsmoreimportanttogetstuffdonethantomakeitgofastinfactthisissoimportantiamgoingtoputitagainrighthereasifitwasaquoteforthosewhoarejustbrowsingitsmoreimportanttogetstuffdonethantomakeitgofastyoumightbesayingmycompanycaresaboutspeedibuildawebapplicationandallresponseshavetobefasterthanxmillisecondsorwehavehadcustomerscancelbecausetheythinkourappistooslowiamnottryingtosaythatspeeddoesntmatteratalliamsimplytryingtosaythatitsnolongerthemostimportantthingitsnotyourmostexpensiveresourcespeedspeedistheonlythingthatmatterswhenyousayspeedinthecontextofprogrammingyoutypicallymeanperformanceakacpucycleswhenyourceosaysspeedinthecontextofprogramminghemeansbusinessspeedthemostimportantmetricistimetomarketultimatelyitdoesntmatterhowfastyourproductwebappisitdoesntmatterwhatlanguageitswritteninitdoesntevenmatterhowmuchmoneyittakestorunattheendofthedaytheonethingthatwillmakeyourcompanysurviveordieistimetomarketimnotjusttalkingaboutthestartupideaofhowlongittakestillyoumakemoneybutmoresothetimeframeoffromideatocustomershandstheonlywaytosurviveinbusinessistoinnovatefasterthanyourcompetitorsitdoesntmatterhowmanygoodideasyoucomeupwithifyourcompetitorsshipbeforeyoudoyouhavetobethefirsttomarketoratleastkeepuponceyouslowdownyouaredonetheonlywaytosurviveinbusinessistoinnovatefasterthanyourcompetitorsacaseofmicroservicescompanieslikeamazongoogleandnetflixunderstandtheimportanceofmovingfasttheyhavecreatedabusinesssystemwheretheycanmovefastandinnovatequicklymicroservicesarethesolutiontotheirproblemthisarticlehasnothingtodowithwhetherornotyoushouldbeusingmicroservicesbutatleastacceptthatamazonandgooglethinktheyshouldbeusingthemmicroservicesareinherentlyslowtheveryconceptofamicroserviceistobreakupaboundarybyanetworkcallthismeansyouaretakingwhatwasafunctioncallacouplecpucyclesandturningitintoanetworkcallthereisntmuchyoucoulddothatisworseintermsofperformancenetworkcallsarereallyslowcomparedtothecpubutthesebigcompaniesstillchoosetousemicroservicestherereallyisntanarchitectureslowerthanmicroservicesthatiknowofmicroservicesbiggestconisperformancebutgreatestproistimetomarketbybuildingteamsaroundsmallerprojectsandcodebasesacompanyisabletoiterateandinnovateatamuchfasterpacethisjustgoestoshowthatverylargecompaniesalsocareabouttimetomarketnotjuststartupscpuisnotyourbottleneckifyouwriteanetworkapplicationsuchasawebserverchancesarecputimeisnotthebottleneckofyourapplicationwhenyourwebserverhandlesarequestitprobablymakesacouplenetworkcallssuchastoyourdatabaseorperhapsacacheserverlikerediswhiletheseservicesthemselvesmaybefastthenetworkcalltothemisslowthereisareallygreatblogarticleonthespeeddifferencesofcertainoperationsinthearticletheauthorscalescpucycletimesintomoreunderstandablehumantimesifasinglecpucyclewastheequivalentofonesecondthenanetworkcallfromcaliforniatonewyorkwouldbetheequivalentoffouryearsthatishowmuchslowernetworkisforsomeroughestimatesletssayanormalnetworkcallinsidethesamedatacentertakesaboutthreemsthatwouldbetheequivalentofthreemonthsinourhumanscalenowimagineyourprogramisverycpuintensiveittakesahundredthousandcyclestorespondtoasinglecallthatwouldbetheequivalentofjustoveronedaynowletssayyouusealanguagethatisfivetimesasslownowittakesaboutfivedayswellcomparethattoourthreemonthnetworkcallandthefourdaydifferencedoesntreallymattermuchatallifsomeonehastowaitatleastthreemonthsforapackageidontthinkanextrafourdayswillreallymatterallthatmuchtothemwhatthisultimatelymeansisthatevenifpythonisslowitdoesntmatterthespeedofthelanguageorcputimeisalmostnevertheissuegoogleactuallydidastudyonthisveryconceptandtheywroteapaperonitthepapertalksaboutdesigningahighthroughputsystemintheconclusiontheysayitmayseemparadoxicaltou

테이블
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
v
f
c
p
k
g
q
n
h
e
u
y
z
s
o
a
w
b
d
r
x
m
i
t
j
l

시프트 값 : 13, 21

풀이:
테이블이 n번 움직인 후에는 초기의 테이블과 같은 모양을 띌 것으로 생각했다그리고 길이 n위치마다 있는 알파벳은 같은 키테이블로 암호화되기 때문에 일반적인 알파벳의 빈도를 따를 것으로 생각했다
반복되는 길이를 추측하기 위해 암호문을 n의 길이로 나누고 같은 위치를 같은 문자끼리 합하였다
그리고 index of coincidence를 계산하였다그 결과 키 길이(테이블이 처음과 같은 상태로 돌아오는 길이)에서 일반적인 알파벳의 index of coincidence값인 0.6정도가 나왔다
이후 암호문을 26의 길이잡고 알파벳의 빈도를 분석하였다빈도 분석 후에 자주 사용되는 2글자, 3글자를 대입해봄으로써 비밀정보를 구할 수 있었다.

1-2.
답안:
문제 1-1과 같은 방법으로 접근하여 반복되는 길이가 26인 것은 확인하였으나그 외의 비밀정보는 찾지 못하였다. 1-1에 비해 주어진 데이터가 적어 구하기 못하였다.

댓글

이 블로그의 인기 게시물

맥스 어만(Max Ehrmann) - 소망(진정 바라는 것)

진정 바라는 것                                                                       -맥스 어만 소란스럽고 바쁜 일상속에서도  침묵 안에 평화가 있다는 사실을 기억하십시오 포기하지 말고 가능한한 모든 사람들과 잘 지내도록 하십시오 조용하면서도 분명하게 진실을 말하고  어리석고 무지한 사람들의 말에도 귀를 기울이십시오  그들 역시 할 이야기가 있을테니까요  목소리가 크고 공격적인 사람들은 피하십시오  그들은 영혼을 괴롭힙니다 자신을 다른 사람들과 비교하면 자신이 하찮아 보이고  비참한 마음이 들수도 있습니다  더 위대하거나 더 못한 사람들은 언제나...