М и ни сте р ство о б р а зо ва ни я Ро сси йско й Ф е де р а ци и В о р о не ж ски й Го суда р стве нный уни ве р си те...
23 downloads
551 Views
706KB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
М и ни сте р ство о б р а зо ва ни я Ро сси йско й Ф е де р а ци и В о р о не ж ски й Го суда р стве нный уни ве р си те т Ф а культе тко мпью те р ных на ук Ка ф е др а и нф о р ма ци о нных си сте м
Ко нспе ктле кци й «Инф о р ма ци о нна я б е зо па сно сть и за щ и та и нф о р ма ци и » Для студе нто в 4-го кур са дне вно го и ве че р не го о тде ле ни я ф а культе та ко мпью те р ных на ук
Со ста ви те ль: В .Н .Будко
В о р о не ж – 2003
Инф о р ма ци о нна я б е зо па сно сть и за щ и та и нф о р ма ци и 4 кур с, 8 се ме стр Л е кции– 45 ч а с о в , л а бо ра то рны е ра бо ты – 15 ч а с о в , с а м о с то яте л ьна я ра бо та – 75 ч а с о в , экз а м е н.
В в едени е Ц е ль сп е ц кур са : Изуча е м о сно вные во пр о сы кр и пто гр а ф и и , кр и пто ф о ни и и сте га но гр а ф и и , не о б хо ди мые для о б е спе че ни я ко мпью те р но й б е зо па сно сти и нф о р ма ци и , за щ и ты и нф о р ма ци и о т не са нкци о ни р о ва нно го до пуска и о б е спе че ни я ко нф и де нци а льно сти о б ме на и нф о р ма ци е й в и нф о р ма ци о нно -вычи сли те льных си сте ма х. О сновны е зна ния , уме ния и на вы ки, ко то р ыми о вла де ва е м в р е зульта те и зуче ни я спе цкур са : учи мся о р и е нти р о ва ться в со вр е ме нно й ли те р а тур е по за щ и те и нф о р ма ци и для са мо сто яте льно го э ф ф е кти вно го выб о р а по дхо дящ и х спо со б о в р е ше ни я сво и х пр а кти че ски х за да ч.
Т ем ы сп ец к ур са •
О б щ и е во пр о сыко мпью те р но й б е зо па сно сти
•
М о дуляр на я а р и ф ме ти ка
•
Ге не р а ци я П СП чи се л и б и т, пр и го дных для кр и пто гр а ф и и
•
Кла сси че ска я кр и пто гр а ф и че ска я си сте ма с о дни м клю чо м
•
П о то ко во е ши ф р о ва ни е
•
Кр и пто си сте мыс о ткр ытым клю чо м
•
Кр и пто ф о ни я
•
Сте га но гр а ф и я
И нф ор м а ц ионна я без оп а сност ь (эт о бор ьба ) •
В и р усы
•
Зло вр е дные во зде йстви я: пр о гр а ммные и а ппа р а тные (ф и зи че ски е )
•
Ки б е р не ти че ски е и ви р туа льные во йны (на пр и ме р , уме ю щ и х за ве си ть ва ш П К, по дклю че нный к Инте р не ту, пр е выси ло уж е 19 млн. [25])
•
Ко мпью те р ный те р р о р и зм о тпо ли ти че ски х и сто ко в до
•
Рядо во й по льзо ва те ль П К, выхо дя в Инте р не т, по две р га е тся а та ка м ха ке р о в со все го ми р а . Н а пр и ме р , за пусти те пр о гр а мму о б на р уж е ни я се те вых а та к BlackICE Defender – о пи са ни е э то й пр о гр а ммы е сть в [25, с.329] – и уви ди те , ка к мно го по пыто к ва с а та ко ва ть.
хули га нства
За щит а инф ор м а ц ии (эт о з а сек р ечива ние и сок р ыт ие ее) •
за се кр е чи ва ни е кр и пто ло ги я
•
кр и пто ф о ни я
•
сте га но гр а ф и я (скр ыти е на ли чи я се кр е тно й и нф о р ма ци и )
(ши ф р о ва ни е ) со о б щ е ни я, пи се м, ф а йло в, пр о гр а мм П К –
М е ж ду ме то да ми и нф о р ма ци о нно й б е зо па сно сти и ме то да ми за щ и ты и нф о р ма ци и о со б о выде ляю тся ме то дыи де нти ф и ка ци и и а уте нти ф и ка ци и .
1. О б щ и е в о п р о сы и нф о р м аци о нно й б ез о п асно сти и з ащ и ты и нф о р м аци и , как для ПК, так и для в ы чи сли тельны х и уп р ав ляю щ и х си стем и сетей 1.1. Угр оз ы и необходим ост ь сохр а нност и инф ор м а ц ии П р о б ле ма ко мпью те р но й б е зо па сно сти сло ж на и ко мпле ксна . Э то связа но с глуб о ки ми и зме не ни ями , вно си мыми в на шу ж и знь ко мпью те р но й те хно ло ги е й. Н е о б хо ди мо сть за щ и тыи нф о р ма ци и о со зна ва ла сь и пр е дпр и ни ма ла сь е щ е в са мо м на ча ле ши р о ко го вне др е ни я ср е дств вычи сли те льно й те хни ки (се р е ди на 60-х го до в). В о зр о сла и пр о до лж а е т уве ли чи ва ться за ви си мо сть че ло ве че ско го о б щ е ства о т р а зли чных ко мпью те р ных си сте м: на пр и ме р , на ни х во зла га ю тся о б яза нно сти по сб о р у на ло го в, стр а хо ва ни ю , ме ди ци нско му о б служ и ва ни ю , э ле ктр о нно й о пла те сде ло к и б а нко вски м о пе р а ци ям, упр а вле ни ю тр а нспо р то м и а ви а ци е й и т.п. О со б е нно ста ла ва ж на р о ль ко мпью те р ных си сте м в во е нно м де ле . Изме ни лся са м по дхо д к по няти ю «и нф о р ма ци я». Э то тте р ми н ста л и спо льзо ва ться и для о б о зна че ни я спе ци а льно го то ва р а , ко то р ый мо ж но купи ть, пр о да ть, о б ме нять. П р и э то м сто и мо сть э то го то ва р а ча сто зна чи те льно б о льше сто и мо сти са мо й вычи сли те льно й си сте мы и устр о йств (на пр и ме р , си сте мы связи ), в р а мка х ко то р ых и нф о р ма ци я ф ункци о ни р уе т. Инф о р ма ци о нно -вычи сли те льные си сте мы (ИВ С) ста ли пр и тяга те льно й си ло й ка к для о р га ни зо ва нных пр е ступных гр упп, та к и для зло умышле нни ко в-о ди но че к, вла де ю щ и х не о б хо ди мыми ср е дства ми и зна ни ями для со ве р ше ни я не са нкци о ни р о ва нно го до ступа к и нф о р ма ци и в ИВ С, е е кр а ж и , уни что ж е ни я и др уги х пр е ступных де йстви й, со ве р ше ни я кр упно ма сшта б ных мо ше нни че ски х о пе р а ци й. В о зни кла о стр а я по тр е б но сть в за щ и те о б щ е ства о т по до б ных де йстви й. Си лы пр а во по р ядка , ю р и сты, кр и ми но ло ги , а та кж е спе ци а ли сты ко мпью те р ных си сте м сто лкнули сь с со ве р ше нно но во й и не о ж и да нно й пр о б ле мо й – за щ и то й и нф о р ма ци и . Из а на ли за мно ж е ства ко мпью те р ных пр е ступле ни й мо ж но о пи са ть «ср е дне го » пр е ступни ка . Э то мо ло до й че ло ве к, о тли чно р а зб и р а ю щ и йся в вычи сли те льно й те хни ке , ви р туо зно вла де ю щ и й пр о гр а мми р о ва ни е м. Ч а сто о н со ве р ша е т пр е ступле ни я, не пр е сле дуя пр и э то м пр ямых ма те р и а льных выго д. Для не го мо гут б ыть ва ж не е др уги е мо ти вы: утве р ди ть сво е «я», о то мсти ть за о б и ду, пр о сто по шути ть. П о до б ные пр е ступле ни я тр удно р а скр ыва ю тся – до ста то чно сте р е ть пр о гр а мму и з па мяти Э В М . Е сли ж е пр о гр а мма о б на р уж е на , то ка к до ка за ть е е а вто р ство ? Сто и то тме ти ть, что , па р а лле льно с пр о б ле ма ми за щ и тыи нф о р ма ци и о тпо сяга те льства на не е , о тде льно вста е т во пр о с о за щ и те а вто р ски х пр а в на и нф о р ма ци о нные пр о дукты: пр о гр а ммы, а лго р и тмы, да нные , р е зульта тыи т.п.
1.2. Сла бые м ест а И ВС, п р ивлек а т ельные для з лоум ышленник ов М о ж но о тме ти ть 5 та ки х ко мпо не нтИВ С. 1. В во д да нных. Ч а сто пр е ступле ни е на чи на е тся с це ле на пр а вле нно го и ска ж е ни я вво ди мых да нных и ли и зъяти я ва ж ных вхо дных до куме нто в. Н а пр и ме р , мо ж но за ста ви ть ИВ С о пла чи ва ть не со сто явши е ся услуги , пе р е во ди ть пла те ж и за за купки , ко то р ых не б ыло , ф о р ми р о ва ть ло ж ный кур с а кци й на б и р ж е , ука зыва ть
не сущ е ствую щ и х по льзо ва те ле й си сте мы ма ссо во го о б служ и ва ни я (на пр и ме р , те ле ф о нно й ста нци и ) и т.п. 2. П р и кла дно е и си сте мно е пр о гр а ммно е о б е спе че ни е (П О ). Ч е м сло ж не е пр о гр а мма , те м б о ле е уязви ма о на для умышле нно го вне се ни я о ши б о к и и ска ж е ни й. П р и ме р , та к на зыва е мый «тр о янски й ко нь». Э то та ка я и ска ж е нна я пр о гр а мма , ко то р а я кр о ме де йстви й, пр е дусмо тр е нных ее на зна че ни е м, со ве р ша е т и не са нкци о ни р о ва нные о пе р а ци и : счи тыва ни е и л за пи сь чуж о го се кр е тно го ф а йла , и зме не ни е за щ и щ е нно го уча стка ЗУ , выда чу б ло ки р ую щ и х си гна ло в на вне шне устр о йства , пе р е да чу ло ж ных со о б щ е ни й на др уги е Э В М в со ста ве се ти . «Т р о янски й ко нь» ча сто ма ски р уе тся по д о б ычную пр о гр а мму, стр е мясь уни что ж и ть все сле дыне са нкци о ни р о ва нных де йстви й. 3. П О мо ж е тб ыть та кж е и це лью е го по хи щ е ни я ко нкур е нта ми , р а змно ж е ни е м е го с це лью ко мме р ци и . 4. Ц е нтр а льный пр о це ссо р . М но го чи сле нны случа и , ко гда пр е ступни к по дклю ча лся и ме нно к Ц П . О со б а я угр о за – по пытки выве сти Ц П и з стр о я. 5. В ыда ча р е зульта то в ИВ С. В ыхо дные да нные мо гутб ыть и зме не ны и ли по хи щ е ны в ко р ыстных це лях. 6. П р о це сс связи . Э то пе р е да ча о то дно й Э В М к др уго й, связь ме ж ду це нтр а льными Э В М и те р ми на ла ми , тр а кты связи в се ти Э В М . Э то т пр о це сс до ступе н для по сто р о нне го вме ша те льства и являе тся сла б ым ме сто м в си сте ме б е зо па сно сти ИВ С. А та ку на э то т пр о це сс на зыва ю т «э ле ктр о нным пр о ни кно ве ни е м». Э то э ле ктр о ма гни тный пе р е хва ти по дклю че ни е (о тве твле ни е ) к ли ни и связи устр о йств пе р е хва та и за пи си со о б щ е ни й. Н а р уши те ль по луча е т во змо ж но сть до ступа к се кр е тно й и нф о р ма ци и и по дде лыва ни я чуж и х со о б щ е ни й для вли яни я на р а б о ту ИВ С. Ш и р о ко р а спр о стр а не н ме то д «вхо ж де ни я ме ж ду стр о к». П о дклю ча я к ли ни и связи до по лни те льный те р ми на л, зло умышле нни к уста на вли ва е т связь с ИВ С в то т мо ме нт, ко гда ка ко й-ли б о ле га льный е е по льзо ва те ль не р а б о та е т с си сте мо й, но де р ж и т ка на л за нятым. «В хо ж де ни я ме ж ду стр о к» о б на р уж и ва ю тся си сте мо й за щ и ты и а дми ни стр и р о ва ни я ИВ С не ле гко .
1.3. Ра з вит ие идей и к онц еп ц ий з а щит ы инф ор м а ц ии Н а пе р во м э та пе (60-е – на ча ло 70-х го до в) не о б хо ди мую за щ и ту пыта ли сь о б е спе чи ть чи сто пр о гр а ммными ср е дства ми : •
ди на ми че ско е р а спр е де ле ни е р е сур со в ИВ С и за пр е щ е ни е (мно го за да чный р е ж и м р а б о тыИВ С) и спо льзо ва ть чуж и е р е сур сы;
•
р а згр а ни че ни е до ступа к по лям ЗУ по клю ча м за щ и ты;
•
р а згр а ни че ни е до ступа по льзо ва те ле й к ма сси ва м да нных по па р о лям;
•
за щ и та та б ли цыпа р о ле й с по мо щ ью «гла вно го па р о ля».
за да ча м
О пыт по ка за л, что та ки е о пе р а ци о нные си сте мы сла б о за щ и щ а ю т и нф о р ма ци ю о т зло умышле нно го до ступа к не й. Сле дстви е – б о льшо е ко ли че ство хи щ е ни й. Н а ча лся пе р и о д уси ле ни я ме ха ни змо в за щ и ты в о пе р а ци о нных си сте ма х ка к пр о гр а ммными , та к и схе мными спо со б а ми . П о яви ли сь: ве р си я О С MULTIC, си сте ма ADEPT-50. О дна ко пр а кти ка по ка за ла , что со ср е до то че ни е ср е дств за щ и ты в р а мка х О С, ка ка я б ы са ма по се б е не б ыла со ве р ше нно й, не по зво ляе т со зда ть ско лько -ни б удь на де ж ную за щ и ту и нф о р ма ци и , не да е т по лно й га р а нти и о т не са нкци о ни р о ва нно го по луче ни я и нф о р ма ци и . Бо ле е то го , – са ми О С о ка за ли сь в зна чи те льно й ме р е уязви мыми .
Ста л о б суж да ться во пр о с о до по лне ни и О С вне шни ми ме ха ни зма ми за щ и тыи нф о р ма ци и . Н а пр и ме р , в вычи сли те льных си сте ма х выде лять для за щ и ты спе ци а льные ми ни -Э В М , со зда ва ть по дси сте мы и з те хни че ски х, пр о гр а ммных, ли нгви сти че ски х и о р га ни за ци о нных ср е дств. Н о о ка за ло сь, что и та ки е ме р ы та кж е не да ю т100% га р а нти и о тне са нкци о ни р о ва нно го по луче ни я и нф о р ма ци и . П о яви ли сь выска зыва ни я, что в на сто ящ е е вр е мя во о б щ е не т э ф ф е кти вных спо со б о в за щ и ты да нных в си сте ма х ко лле кти вно го по льзо ва ни я. Сф о р мули р о ва на и до ка за на те о р е ма Х а р р и со на о то м, что ф о р ма льными ср е дства ми во о б щ е не льзя до ка за ть до ста то чно сть за щ и ты. Спе ци а ли сты пр и шли к выво ду, что за щ и та и нф о р ма ци и до лж на пр е дста влять со б о й р е гуляр ный пр о це сс, о сущ е ствляе мый ко мпле ксным и спо льзо ва ни е м пр о гр а ммных, а ппа р а тных и вне шни х те хни че ски х и не те хни че ски х ср е дств на все х э та па х р а зр а б о тки , вне др е ни я и э ксплуа та ци и ИВ С. Н е о б хо ди мо о б ъе ди не ни е все х ср е дств в це ло стный ме ха ни зм – си сте му за щ и ты с не ско льки ми по яса ми за щ и ты: •
вне шни й по яс – си сте ма в це ло м;
•
по яс устр о йств (Э В М , те р ми на лы, ли ни и связи ме ж ду ни ми ,...);
•
по яс ко мпо не нт си сте мы (э ле ме нты б а з по льзо ва те ле й,...);
•
по яс пр о це ссо в в си сте ме (вво д-выво д да нных, внутр е нняя о б р а б о тка и т.п.).
да нных,
О С,
пр о гр а ммы
О сно вные це ли , по ста вле нные пе р е д ме ха ни змо м за щ и ты, мо ж но ф о р мули р о ва ть с р а зных по зи ци й. С о дно й сто р о ныэ то : 7. Исклю че ни е случа йно й и ли пр е дна ме р е нно й выда чи и нф о р ма ци и по сто р о нни м ли ца м. 8. Ра згр а ни че ни е во змо ж но сте й и по лно мо чи й все х по льзо ва те ле й и ли ц (вклю ча я и а дми ни стр а ци ю си сте мы), и ме ю щ и х до ступ к р е сур са м си сте мы. 9. О б е спе че ни е удо б ств р а б о ты с и нф о р ма ци е й для гр упп вза и мо связа нных по льзо ва те ле й. 10. О б е спе че ни е не за ви си мо сти по лно мо чи й.
по льзо ва те ле й в пр е де ла х пр е дста вле нных и м
11. О б е спе че ни е во змо ж но сте й по льзо ва те лям до пуска ть к сво е й и нф о р ма ци и др уги х по льзо ва те ле й. 12. С др уго й сто р о ныо б о б щ е нными за щ и тными ф ункци ями мо гутявляться: 13. За щ и та си сте мыо тпо сто р о нни х ли ц. 14. За щ и та си сте мы о т по льзо ва те ля, т.е ., пр и о б е спе че ни и по льзо ва те ля все ми во змо ж но стями о б р а б о тки сво е й и нф о р ма ци и , и склю ча я во змо ж но сть не са нкци о ни р о ва нных де йстви й с е го сто р о ны: до ступ к супе р ви зо р ным о б ла стям, о б щ е си сте мным да нным, к да нным др уги х по льзо ва те ле й, и зме не ни я пр о гр а мм о б щ е го по льзо ва ни я, сб о р и нф о р ма ци и на р е ги стр а х и в по лях ЗУ и др уги е де йстви я. 15. За щ и та по льзо ва те ле й др уг о т др уга , т.е . пр е дупр е ж де ни е Н СД о дно го по льзо ва те ля к да нным др уго го ка к в пр о це ссе о б р а б о тки и х в со вме щ е нно м р е ж и ме , та к и в пр о це ссе хр а не ни я э ти х да нных в б а за х да нных си сте мы.
16. За щ и та по льзо ва те ля о тсе б я са мо го . П р е дпо ла га е тсо зда ни е та ки х усло ви й, ко гда ни ка ки е во змо ж ные о ши б ки по льзо ва те ля (ни случа йные , ни пр е дна ме р е нные ) не пр и во ди ли б ы к во зни кно ве ни ю во змо ж но й уте чки и нф о р ма ци и , ка к да нно го по льзо ва те ля, та к и лю б о й др уго й и нф о р ма ци и . 17. За щ и та си сте мы о т не е са мо й. Э то со зда ни е на де ж ных б а р ье р о в на путях уте чки и нф о р ма ци и всле дстви е о ши б о к, по являю щ и хся в о сно вных ко мпо не нта х си сте мы, и ли всле дстви е сб о е в (случа йных и ли со зда ва е мы пр е дна ме р е нными де йстви ями лю де й).
1.4. Ка на лы ут ечк и инф ор м а ц ии Н а и б о ле е ве р о ятнысле дую щ и е ка на лыуте чки и нф о р ма ци и . A) Косве нны е ка на лы , т.е . б е з ф и зи че ско го до ступа зло умышле нни ка к ИВ С: 1. П о дслуши ва ю щ и е устр о йства . 2. Ди ста нци о нно е ф о то гр а ф и р о ва ни е э кр а на ди спле я. 3. П е р е хва тэ ле ктр о ма гни тных и злуче ни й. B) Пр я мы е ка на лы , т.е . с до ступо м к ИВ С: 1. Х и щ е ни е но си те ле й и нф о р ма ци и . 2. Ко пи р о ва ни е но си те ле й и нф о р ма ци и . 3. Х и щ е ни е пр о и зво дстве нных о тхо до в. 4. Счи тыва ни е да нных в ма сси ва х др уги х по льзо ва те ле й. 5. Ч те ни е о ста то чно й и нф о р ма ци и са нкци о ни р о ва нных за пр о со в. 6. Н е са нкци о ни р о ва нно е по льзо ва те ле й.
в
и спо льзо ва ни е
ЗУ
си сте мы
те р ми на ло в
по сле
выпо лне ни я
за р е ги стр и р о ва нных
7. М а ски р о вка по д за р е ги стр и р о ва нно го по льзо ва те ля с по мо щ ью хи щ е ни й па р о ле й и др уги х р е кви зи то в р а згр а ни че ни я до ступа . 8. М а ски р о вка не са нкци о ни р о ва нных за пр о со в по д за пр о сы о пе р а ци о нно й си сте мы (ми сти ф и ка ци я). 9. Испо льзо ва ни е пр о гр а ммных ло вуше к. 10. П о луче ни е за щ и щ е нных да нных с по мо щ ью се р и и р а зр е ше нных за пр о со в. 11. Испо льзо ва ни е не до ста тко в языко в пр о гр а мми р о ва ни я и О С. C) Ка на лы сизме не ние м стр уктур ы И ВС или е е комп оне нтов. 1. Н е за ко нно е по дклю че ни е к а ппа р а тур е и ли ли ни и связи ИВ С. 2. Зло умышле нный выво д и з стр о я ме ха ни змо в за щ и ты. Н а пр и ме р , зло умышле нни к мо ж е тво спо льзо ва ться те м, что : •
В не ко то р ых О С и си сте ма х упр а вле ни я б а за ми да нных не пр е дусма тр и ва е тся уни что ж е ни е да нных, о ста ю щ и хся в ЗУ по сле удо вле тво р е ни я са нкци о ни р о ва нных за пр о со в.
•
П р и о тсутстви и ср е дств пр о ве р ки пр а ви льно сти чуж и х пр о гр а мм в ни х мо гутб ыть встр о е ны б ло ки «тр о янски й ко нь»(ви р ус), ко то р ые не нуж ны для о сущ е ствле ни я за явле нных ф ункци й пр о гр а ммы, но по зво ляю т скр ыто и не са нкци о ни р о ва нно р е ги стр и р о ва ть о б р а б а тыва е мую и нф о р ма ци ю в и нте р е са х зло умышле нни ка .
Н о , за ме ти м, и за р е ги стр и р о ва нный по льзо ва те ль мо ж е т за пусти ть в си сте му сво е го «тр о янско го ко ня». •
Е сли и де нти ф и ка ци я по льзо ва те ля по па р о лю о сущ е ствляе тся то лько пр и пе р во на ча льно м е го вклю че ни и в р а б о ту, то зло умышле нна я по дме на по льзо ва те ля в пр о це ссе выпо лне ни я за да чи о ка зыва е тся не за ме че нно й.
•
Е сли па р о ли уда ле нно го по льзо ва те ля пе р е да ю тся в си сте му по ли ни и связи в о ткр ыто м ви де и ли о ста ю тся в ЗУ по сле и де нти ф и ка ци и , то со зда ю тся р е а льные пр е дпо сылки и х хи щ е ни я.
•
Н е до ста тки и не о дно зна чно сти (с по зи ци и за щ и ты и нф о р ма ци и ) в языка х пр о гр а мми р о ва ни я по зво ляю т и скусно му пр о гр а мми сту во йти в супе р ви зо р ные о б ла сти и ли о б ла сти , выде ле нные др уги м пр о гр а мма м. Н а пр и ме р , в языке Pascal мо ж но и спо льзо ва ть не ко то р ую двусмысле нно сть в уста но вле ни и ти по в пе р е ме нных, всле дстви е че го в пр о це ссе ко мпи ляци и и х сф е р а де йстви я б уде т во спр и нята не о дно зна чно . М о ж но во спо льзо ва ться те м, что в Pascal’е не о пр е де ле ны то чные пр а ви ла для о тно си те льно го р а спо ло ж е ни я и де нти ф и ка то р о в и де кла р а ци й. П р и и спо льзо ва ни и в ка че стве ф о р ма льных па р а ме тр о в ф ункци й и пр о це дур пр а ви ла Pascal’я по зво ляю т пр о гр а мми сту не ука зыва ть в явно м ви де чи сло и ти п па р а ме тр о в. Э ти «о ши б ки »не выявляю тся пр и ко мпи ляци и и мо гут со зда ва ть ла зе йки для не ко нтр о ли р уе мых не са нкци о ни р о ва нных де йстви й.
Кр о ме то го , Pascal (ка к и мно ги е др уги е языки ) не за щ и щ е н о тухо да и нде ксо в э ле ме нто в ма сси ва за уста но вле нные гр а ни цы, ко гда но ме р и спо льзуе мо го э ле ме нта вычи слялся в пр о це ссе и спо лне ни я пр о гр а ммы. Спе ци а ли сты утве р ж да ю т, что с по зи ци и за щ и ты и нф о р ма ци и Pascal и ме е ти др уги е не до ста тки .
1.5. Сп особы и ср едст ва з а щит ы инф ор м а ц ии 1. Спо со б пр е пятстви я: за пр е щ е ни е пр о ни кно ве ни я на те р р и то р и ю ИВ С, до пуска к а ппа р а тур е , к но си те лям и нф о р ма ци и и т.п. Ср е дства – ф и зи че ски е и а ппа р а тные . Ф и зи че ски е – э то за мки на две р ях, р е ше тки на о кна х, ко нтр о льно -пр о пускные пункты, о хр а нна я си гна ли за ци я и т.п. А ппа р а тные ср е дства за щ и ты – р а зли чные э ле ктр о нные устр о йства , включа е мы е в со ста в те хни че ски х ср е дств ИВ С, но выпо лняю щ и е са мо сто яте льно го и ли в ко мпле ксе с др уги ми ср е дства ми не ко то р ые ф ункци и за щ и ты в те р ми на ла х, устр о йства х гр уппо во го вво да -выво да да нных, Ц П , вне шни х ЗУ , пе р и ф е р и йно м о б о р удо ва ни и . 2. Спо со б упр а вле ни я: р е гули р о ва ни е все х р е сур со в си сте мы (те хни че ски х ср е дств, пр о гр а мм, э ле ме нто в б а з да нных) в пр е де ла х уста но вле нно го р е гла ме нта . Э то че тки е и о дно зна чные пр а ви ла р а б о ты для по льзо ва те ле й, те х. пе р со на ла , те х. ср е дств, пр о гр а мм, э ле ме нто в б а з да нных и но си те ле й и нф о р ма ци и . Ср е дства – а ппа р а тные , пр о гр а ммные . 3. Спо со б р е гла ме нта ци и те сно связа н с упр а вле ни е м. •
Для по льзо ва те ле й р е гла ме нти р уе тся вр е мя р а зр е ше нно й р а б о ты, те р ми на лы, с ко то р ых р а зр е ше н до ступ, э ле ме нты б а з да нных, к ко то р ым р а зр е ше н до ступ и пе р е че нь пр о це дур (за да ч, пр о гр а мм), р а зр е ше нных для и спо лне ни я.
•
Для о б служ и ва ю щ е го пе р со на ла – вр е мя р а зр е ше нно й р а б о ты, пе р е че нь и по р ядо к до ступа к р е сур са м си сте м.
•
Для те х. ср е дств р е гла ме нти р уе тся спи со к ли ц, ко то р ым пр е до ста вле но и х и спо льзо ва ни е в р а зр е ше нно е вр е мя.
•
Для пр о гр а мм и ф ункци о на льных за да ч р е гла ме нти р уе тся вр е мя и х р а зр е ше нно го и спо льзо ва ни я и спи со к по льзо ва те ле й, и ме ю щ и х пр а во и х и спо льзо ва ни я.
•
Для э ле ме нто в б а з да нных р е гла ме нти р уе тся вр е мя р а зр е ше ни я и х и спо льзо ва ни я, спи со к по льзо ва те ле й с пр а во м до ступа и пе р е че нь р а зр е ше нных пр о це дур .
•
Для но си те ле й и нф о р ма ци и р е гла ме нти р уе тся ме сто по сто янно го хр а не ни я, спи со к ли ц в пр а во м и х по луче ни я и пе р е че нь пр о гр а мм, и ме ю щ и х пр а во о б р а щ е ни я к но си те лям. Ср е дства – пр о гр а ммные , о р га ни за ци о нные , за ко но да те льные . Ф ункци и за щ и тыдо пуско м – э то : o и де нти ф и ка ци я (пр и сво е ни е и ме ни , ко да , па р о ля и т.п.) по льзо ва те лям, пе р со на лу и р е сур са м си сте мы. o уста но вле ни е по дли нно сти суб ъе кта и ли о б ъе кта по и де нти ф и ка то р у.
пр е дъявле нно му
o уста но вка по лно мо чи й с по мо щ ью пр о ве р ки со о тве тстви я р а зр е ше нных вр е ме ни , за пр а ши ва е мых р е сур со в и пр о це дур уста но вле нно му р е гла ме нту. И р а зр е ше ни е , и со зда ни е усло ви й р а б о ты то лько в пр е де ла х э то го р е гла ме нта . o р е ги стр а ци я (пр о то ко ли р о ва ни е ) о б р а щ е ни й к за щ и щ е нным р е сур са м. o р е а ги р о ва ни е пр и по пытка х не са нкци о ни р о ва нных де йстви й: за де р ж ка р а б о т, о тка з, о тклю че ни е , си гна ли за ци я. 4. Спо со б ма ски р о ва ни я (ко ди р о ва ни я, ши ф р о ва ни я) и нф о р ма ци и за клю ча е тся в та ко м пр е о б р а зо ва ни и за щ и щ е нных да нных, что б ы и х со де р ж и мо е б ыло до ступно ли шь пр и пр е дъявле ни и не ко то р о й спе ци ф и че ско й и нф о р ма ци и (клю ча ) и о сущ е ствле ни и о б р а тных пр е о б р а зо ва ни й. Т а ки е пр е о б р а зо ва ни я на зыва ю т кр и пто гр а ф и че ски м за кр ыти е м и нф о р ма ци и . Э ту за щ и ту мо ж но пр и ме нять ка к пр и о б р а б о тке за щ и щ е нно й и нф о р ма ци и , та к и пр и е е хр а не ни и . П р и пе р е да че и нф о р ма ци и по ли ни и связи кр и пто гр а ф и че ско е за кр ыти е являе тся е ди нстве нным спо со б о м на де ж но й за щ и ты пе р е да ва е мых да нных. Н е ко то р о й си ло й кр и пто гр а ф и че ско го за кр ыти я о б ла да ю т и и зве стные ме то де сж а ти я да нных. Ср е дства – а ппа р а тные и пр о гр а ммные . П р о гр а ммные ср е дства – э то спе ци а льные пр о гр а ммы, вхо дящ и е в со ста в П О ИВ С и спо со б ные о сущ е ствлять ф ункци и за щ и ты. О ни уни ве р са льны, ср а вни те льно пр о сты в р е а ли за ци и и ги б ки . О сно вные гр уппыи х ф ункци й за щ и ты: •
пр о гр а ммыи де нти ф и ка ци и , т.е . о по зна ни я те р ми на ла , по льзо ва те ля и т.п.
•
пр о гр а ммы р е гули р о ва ни я р а б о ты те хни че ски х ср е дств, по льзо ва те ле й, за да ч, э ле ме нто в б а з да нных.
•
пр о гр а ммыр а згр а ни че ни я до ступа к за да ча м, пр о гр а мма м, э ле ме нта м б а з да нных.
•
пр о гр а ммыкр и пто гр а ф и че ско го за кр ыти я и нф о р ма ци и .
•
вспо мо га те льные пр о гр а ммы для уни что ж е ни я о ста то чно й и нф о р ма ци и , ф о р ми р о ва ни я гр и ф а се кр е тно сти выда ва е мых до куме нто в, ве де ни я р е ги стр а ци о нных ж ур на ло в, и ми та ци и р а б о ты с на р уши те ле м для о твле че ни я е го вни ма ни я, те сто во го ко нтр о ля ме ха ни зма за щ и тыи др .
О р га ни за ци о нные ср е дства – ме р о пр и яти я, о хва тыва ю щ и е все стр уктур ные э ле ме нты ИВ С на все х э та па х е е ж и зне нно го ци кла : стр о и те льство по ме щ е ни я, пла ни р о ва ни е си сте мы, мо нта ж и на ла дка о б о р удо ва ни я, и спыта ни я и пр о ве р ки , э ксплуа та ци я, о р га ни за ци я пр о пускно го и р а б о че го р е ж и ма , ко нтр о ль те хно ло ги и о б р а б о тки
за щ и щ е нно й и нф о р ма ци и , р а спр е де ле ни е р е кви зи то в р а згр а ни че ни я до ступа (па р о ле й, ур о вне й по лно мо чи й и т.п.), о р га ни за ци я ве де ни я и а на ли за пр о то ко ло в р а б о ты. К за ко но да те льным ср е дства м за щ и ты о тно сятся те за ко но да те льные а кты стр а ны, ко то р ыми р е гла ме нти р ую тся пр а ви ла и спо льзо ва ни я и о б р а б о тки и нф о р ма ци и о гр а ни че нно го до ступа и уста на вли ва ю тся ме р ы о тве тстве нно сти за на р уше ни е э ти х пр а ви л. 5. Спо со б пр и нуж де ни я е сть та ко й спо со б за щ и ты, ко гда по льзо ва те ли и пе р со на л ИВ С вынуж де ны со б лю да ть пр а ви ла о б р а б о тки и и спо льзо ва ни я за щ и щ а е мо й и нф о р ма ци и по д угр о зо й ма те р и а льно й, а дми ни стр а ти вно й и ли уго ло вно й о тве тстве нно сти . Ср е дства – за ко но да те льные . 6. Спо со б по б уж де ни я е сть та ко й спо со б , ко гда по льзо ва те ли и пе р со на л ИВ С внутр е нне , т.е . мо р а льными , э ти че ски ми , пси хо ло ги че ски ми и ли др уги ми мо ти ва ми стр е мятся к со б лю де ни ю все х пр а ви л за щ и ты и нф о р ма ци и . Ср е дства – мо р а льно -э ти че ски е . К ни м о тно сятся все во змо ж ные но р мы, ко то р ые сло ж и ли сь тр а ди ци о нно и ли скла дыва ли сь по ме р е р а спр о стр а не ни я Э В М в да нно й стр а не и л о б щ е стве . Бо льше й ча стью о ни не являю тся о б яза те льными , ка к за ко но да те льные ме р ы. Н е со б лю де ни е мо р а льно -э ти че ски х но р м ве де то б ычно к по те р е а вто р и те та , пр е сти ж а че ло ве ка и ли гр уппы ли ц (о р га ни за ци й) и по те р е к ни м до ве р и я. М о р а льно -э ти че ски е но р мы б ыва ю т ка к не пи са нные (на пр и ме р , о б щ е пр и нятые но р мы че стно сти , па тр и о ти зма и т.п.), та к и пи са нные , на пр и ме р , сво д, ко де кс пр о ф е сси о на льно го по ве де ни я чле но в р а зных гр упп, а ссо ци а ци й и т.п. Н а пр и ме р , ко де кс пр о ф е сси о на льно го по ве де ни я чле но в А ссо ци а ци и по льзо ва те ле й Э В М СШ А . Ф и зи че ски е , а ппа р а тные и пр о гр а ммные ср е дства на зыва ю тф о р ма льными . П р и э то м е щ е ф и зи че ски е и а ппа р а тные ср е дства на зыва ю тте хни че ски ми . А ср е дства о р га ни за ци о нные , за ко но да те льные и мо р а льно -э ти че ски е на зыва ю тне ф о р ма льными . Н а о сно ве и ме ю щ е го ся ми р о во го о пыта утве р ди ли сь сле дую щ и е о б щ и е ф унда ме нта льные пр и нци пыо р га ни за ци и за щ и тыи нф о р ма ци и : 1. Си сте мно сть. В со вр е ме нных ИВ С до лж на б ыть о б е спе че на на де ж на я и со гла со ва нна я за щ и та во все х стр уктур ных е е э ле ме нта х, на все х те хно ло ги че ски х уча стка х о б р а б о тки и нф о р ма ци и и во все вр е мя ф ункци о ни р о ва ни я. 2. Спе ци а ли зи р о ва нно сть. Н а де ж ный ме ха ни зм за щ и ты мо ж е т б ыть спр о е кти р о ва н ли шь пр о ф е сси о на льными спе ци а ли ста ми по за щ и те и нф о р ма ци и и для о б е спе че ни я э ф ф е кти вно го ф ункци о ни р о ва ни я ме ха ни зма за щ и ты в со ста ве ИВ С та кж е до лж е н б ыть спе ци а ли стпо за щ и те и нф о р ма ци и . 3. Н е ф о р ма льно сть – э то т пр и нци п утве р ж да е т, что не сущ е ствуе т и нж е не р но й ме то ди ки пр о е кти р о ва ни я ме ха ни змо в за щ и ты в тр а ди ци о нно м по ни ма ни и э то го те р ми на . Т е ме то ди ки пр о е кти р о ва ни я, ко то р ые к на сто ящ е му вр е ме ни р а зр а б о та ны, в о сно вно м со де р ж а т ко мпле ксы тр е б о ва ни й, пр а ви л и со де р ж а ни е э та по в, сф о р мули р о ва нных на не ф о р ма льно м ур о вне , т.е . ме ха ни че ско е , а лго р и тми че ско е и х о сущ е ствле ни е не во змо ж но . О б щ е е р е ше ни е пр о б ле мы за щ и ты и нф о р ма ци и – э то и ллю зи я. Ц е ль пр о е кти р о ва ни я си сте мы за щ и ты – ка к мо ж но до льше за тр удни ть зло умышле нни ку взло ма ть за щ и ту. О дна ко утве р ж да е тся, что выпо лне ни е спе ци а ли ста ми по за щ и те и нф о р ма ци и э ти х тр е б о ва ни й со зда е т о б ъе кти вные пр е дпо сылки для пр о е кти р о ва ни я до ста то чно на де ж но го ме ха ни зма за щ и ты. Т р е б о ва ни я для ме ха ни зма за щ и ты(о б щ и е ):
•
а де ква тно сть, т.е . о б е спе че ни е тр е б уе мо го по сте пе ни се кр е тно сти ур о вня за щ и ты пр и ми ни ма льных и зде р ж ка х на со зда ни е и ф ункци о ни р о ва ни е ме ха ни зма за щ и ты и ми ни ма льных те кущ и х р а схо да х.
•
ме ха ни зм за щ и ты не до лж е н со зда ва ть для по льзо ва те ле й до по лни те льных тр удно сте й, тр е б ую щ и х зна чи те льных уси ли й для и х пр е о до ле ни я.
•
ми ни ми за ци я пр и ви ле ги й в до ступе , пр е до ста вляе мых по льзо ва те лю (то лько не о б хо ди мые р е сур сыи да нные ).
•
по лно та ко нтр о ля, т.е . о б яза те льный ко нтр о ль все х о б р а щ е ни й к за щ и щ а е мым да нным.
•
на ка зуе мо сть на р уше ни й. Н а пр и ме р , о тка з в до ступе к си сте ме .
•
не се кр е тно сть пр о е кти р о ва ни я, т.е . ме ха ни зм за щ и ты до лж е н ф ункци о ни р о ва ть до ста то чно э ф ф е кти вно да ж е в то м случа е , е сли е го стр уктур а и со де р ж а ни е и зве стнызло умышле нни ку.
Ко нкр е ти за ци я о б щ и х тр е б о ва ни й пр и ме ни те льно вклю ча е то ко ло 200 ча стных тр е б о ва ни й.
к р а зли чным ко мпо не нта м ИВ С
2. Э лем енты кр и п то ло ги и на и сто р и чески х п р и м ер ах 2.1. Т ер м инология CRYPTOS — та йный. LOGOS — сло во . Кр и пто ло ги я (cryptology) – о б ъе ди не нна я ди сци пли на , о хва тыва ю щ а я кр и пто гр а ф и ю и кр и пто а на ли з. Кр и пто гр а ф и я — ме то ды за се кр е чи ва ни я исх одной (откр ы той) и нф о р ма ци и с и спо льзо ва ни е м кодов и /и ли шифр ов для за щ и тных (се кр е тных) пр е о б р а зо ва ни й фор мы и нф о р ма ци и . Кр ип тоа на лиз — ме то дыр а скр ыва ни я ко да и ли ши ф р а . Кодир уе тся и нф о р ма ци я с це лью е е пе р е да чи , хр а не ни я и о б р а б о тки . Ш и ф р уе тся (пе р е ко ди р уе тся) — с це лью за се кр е чи ва ни я. В се кр и пто пр е о б р а зо ва ни я мо ж но р а ссма тр и ва ть ка к за ме ну, в ко то р о й и схо дна я и нф о р ма ци я (откр ы ты й те кст) в по нятно й ф о р ме за ме няе тся не ко то р о й не по нятно й ф о р мо й — шифр оте кстом (кр ип тогр а ммой). Ш иф р — э то ме то д пр е о б р а зо ва ни я о ткр ытых те ксто в в кр и пто гр а мму. Ш и ф р о ва ни е , ка к пр а ви ло , выпо лняе тся по си мво льно по то чно о пр е де ле нно му а лго р и тму иэ то та лго р и тм мо ж но пр и ме нять к лю б о й и нф о р ма ци и . Ка ж да я кр и пто гр а ф и че ска я си сте ма связа на с по няти е м ключа , пр и о б р е та ю щ е го р а зли чные ф о р мыв за ви си мо сти о ткр и пто си сте мы. Ш и р о ко е то лко ва ни е те р ми на «клю ч» — э то со б стве нно а лго р и тм пр е о б р а зо ва ни я и схо дно го те кста в за се кр е че нную ф о р му. У зко е (спе ци а льно е то лко ва ни е ) пр о и сте ка е ти з явно го р а зде ле ни я клю ча (и ме ю щ е го те ксто по до б ную и ли чи сло вую ф о р му) о топ е р а ц ии шифр ова ния , пр и ме няе мо й к по ста вле нным в со о тве тстви е си мво ло в о ткр ыто го те кста с си мво ла ми клю ча в р е зульта те ко то р о й и о б р а зую тся си мво лыкр и пто гр а ммы. В се а лго р и тмыкр и пто гр а ф и и мо ж но сф о р мули р о ва ть в тр и кла сса : •
по дста но вка (о дно го зна ко во го р яда вме сто др уго го );
•
тр а нспо зи ци я (пе р е ста но вка по р ядка сле до ва ни я зна ко в и схо дно го те кста );
•
до по лне ни е (а лге б р а и че ски е пр е о б р а зо ва ни я зна ко в (ко до в) и схо дно го те кста со зна ка ми клю ча );
•
ко мб и на ци и выше пр и ве де нных ме то до в.
2.2. Пер иоды р а з вит ия к р ип т ологии. П е р вые шр и ф ты и спо льзо ва ли сь уж е в др е вни х Е ги пте , Гр е ци и , Ш уме р е , Ки та е , за те м в Ри ме и Спа р те . У че ные ср е дне ве ко вья ча сто за ши ф р о выва ли сво и р а б о ты. Сло ж ные за ши ф р о ва нные те кстывстр е ча ю тся и в сла вянски х па мятни ка х Х II- Х III ве ко в. Ра зли ча ю ттр и пе р и о да р а зви ти я кр и пто ло ги и . 1) До 1949 го да . До на учна я (до кла си че ска я) кр и пто ло ги я, о сно ва нна я на и скусстве , и нтуи ци и и ве р е кр и пто ло га в на де ж но сть е го ши ф р а . Э то — р учные ши ф р ы для пи сьма . 2) 1949 — 1976. Кла сси че ска я кр и пто ло ги я. В 1948 г. Ш е нно н о пуб ли ко ва л со зда нную и м те о р и ю и нф о р ма ци и . А в 1949 г. б ыла о пуб ли ко ва на е го ста тья “Т е о р и я связи в се кр е тных си сте ма х”. Ро ди ла сь кла сси че ска я (ка к мы те пе р ь го во р и м) кр и пто ло ги я. Э то кр и пто ло ги я с о дно й е ди ни це й се кр е тно й
и нф о р ма ци и – клю че м, ко то р ый являе тся о б щ и м для ши ф р о ва ни я и де ши ф р о ва ни я, а э ти пр о це дур ы о сущ е ствляю тся с по мо щ ью о б р а ти мых о пе р а ци й (т. е . ф ункци й пр е о б р а зо ва ни я о ткр ыто го те кста и си мво ла се кр е тно го клю ча в си мво л кр и пто гр а ммы). О пе р а ци я ши ф р о ва ни я/де ши ф р о ва ни я с б о льше й ве р о ятно стью не выпо лни ма б е з зна ни я клю ча . Се кр е тный клю ч пе р е да е тся о тпр а ви те лю и по луча те лю и нф о р ма ци и , на пр и ме р , кур ье р о м. 3) С 1976 го да . Н о вый пе р и о д са мо сто яте льно го на пр а вле ни я в те о р и и за щ и ты и нф о р ма ци и . П о яви ла сь ста тья Ди ф ф и и Х е ллма на “Н о вые на пр а вле ни я в кр и пто гр а ф и и ”. Ста тья по ка за ла , что во змо ж на се кр е тна я связь б е з пе р е да чи се кр е тно го клю ча . В во зни кше й кр и пто гр а ф и и , и ме нуе мо й кр и пто гр а ф и е й с о ткр ытыми клю ча ми , и ме ю тся, по кр а йне й ме р е , два клю ча ; о ди н для ши ф р о ва ни я, др уго й для р а сши ф р о ва ни я. П р и че м и з зна ни я о дно го клю ча пр а кти че ски не льзя о пр е де ли ть др уго й. П о э то му клю ч для ши ф р о ва ни я мо ж е т б ыть о ткр ытым, е сли клю ч для р а сши ф р о ва ни я се кр е те н, ге не р и р уе т и хр а ни тся то лько по луча те ле м и нф о р ма ци и . За ме ти м, что в со вр е ме нно м на пр а вле ни и кр и пто гр а ф и и для э ле ктр о нных ма ши нных си сте м: ИВ С, А СУ и др . ши р о ко и спо льзую тся до сти ж е ни я и кр и пто гр а ф и и пи сьма и кла сси че ско й кр и пто гр а ф и и . А с р а зви ти е м ко мме р че ски х се те й связи , э ле ктр о нно й по чты и гло б а льных и нф о р ма ци о нных се те й (си сте м) вни ма ни е кр и пто ло го в пр и вле че но к пр о б ле ма м р а спр е де ле ни я се кр е тных клю че й, по дтве р ж де ни я а вто р ства , а уте нти ф и ка ци и (по дтве р ж де ни я по дли нно сти ) да нных, па р о ле й и т. п. Э ти пр о б ле мывышли на пе р вый пла н.
2.3. Пр им ер ы шиф р ова ния п исьм а от др евност и до на ших дней П р и ме р ы б уде м и нте р пр е ти р о ва ть и спо льзуя со вр е ме нную те р ми но ло ги ю кла сси ф и ка ци и ши ф р о в. Кла ссыши ф р о в: 1. П о дста но вка и ли пр о ста я (пр яма я) за ме на . Ка ж до й б укве а лф а ви та ста ви тся в со о тве тстви е б уква , ци ф р а , си мво л и ли ка ка я-ли б о и х ко мб и на ци я. Э та та б ли ца за ме ныо дна для все го те кста . 2. М но го зна чна я за ме на (мно го б укве нна я/мно го -а лф а ви тна я си сте ма ши ф р о ва ни я). В за ви си мо сти о т по р ядка сле до ва ни я б уквы в со о б щ е ни и (на пр и ме р : но ме р а е е зна ко ме ста в со о б щ е ни и ) пр и ме няю тся р а зные а лф а ви ты— та б ли цыза ме ны. 3. П е р е ста но вка . Буквы со о б щ е ни я ка ки м-ни б удь спо со б о м пе р е ста вляю тся ме ж ду со б о й. 4. Си сте мыши ф р о ва ни я с клю ча ми . О б щ а я схе ма :
Р исун о к 2.1
Пр акти чески е ш и ф р ы , п р и м еняв ш и еся о т др ев ни х в р ем ен до п адени я Ри м а. 4. Свящ е нные , и уде йски е те ксты ши ф р о ва ли сь пр о сто й за ме но й. В ме сто пе р во й б уквы а лф а ви та пи са ла сь по сле дняя, вме сто вто р о й – пр е дпо сле дняя и т. д. Т а ко й ши ф р на зыва лся а тба ш. В кни ге пр о р о ка Ие р е ми и чи та е м: “… ца р ь СЕ ССА Х А выпье тпо сле ни х”. Т а ко го ца р я и ли ца р ства не б ыло . Ра сши ф р о выва я СЕ ССА Х А , по луча е м В А В ИЛ О Н . 5. За два ве ка до на ше й э р ы гр е че ски й пи са те ль и и сто р и к П о ли б и й и зо б р е л ши ф р о ва льный ква др а тр а зме р о м 5х5 кле то к, за по лняе мый в случа йно м а лф а ви то м по р ядке (24 б уквы гр е че ско го а лф а ви та и пр о б е л). В ла ти нско м ва р и а нте в о дну кле тку по ме щ а ли две б уквы “i” и “j”. Для ши ф р о ва ни я в по ли б и а нско м ква др а те на хо ди м б укву те кста и вста вляе м в ши ф р о вку ни ж ню ю (со се дню ю ) о тне е в то м ж е сто лб и ке ква др а та . Для б уквыв ни ж не й стр о ке ква др а та б р а ли ве р хню ю и з то го ж е сто лб ца . 6. Для связи гр е ки и р и мляне и спо льзо ва ли ко д на о сно ве по ли б и а нско го ква др а та с е сте стве нным за по лне ни е м а лф а ви та (т. е . в а лф а ви тно м по р ядке ). Буква ко ди р о ва ла сь но ме р о м стр о ки и сто лб ца чи сло м ф ла го в спр а ва и сле ва . Л е гко пр о нуме р о ва в стр о ки и сто лб цы по лучи ть чи сло во й ши ф р со о б щ е ни я, со сто ящ и й и з по сле до ва те льно сти па р ци ф р . Н о о пр и ме не ни и та ко го ши ф р а в и сто р и че ски х па мятни ка х упо ми на ни я не т. П р и ме р : Л а ти нски й ва р и а нтс за по лне ни е м ква др а та б уква ми в а лф а ви тно м по р ядке 1
2
4
5
1 A B
C D
E
2 F
G
H I,J K
3 L
M N O
4 Q R
3
S
Ко д ф р а зы“Festina lente»- то р о пи сь ме дле нно . 21 15 43 44 24 33 11 31 15 33 44 15
P
T
U
5 V W X Y
Z
7. В IV в. до на ше й э р ыр и мляне пр и ме няли для упр о щ е ни я ши ф р о ва ни я два ди ска на о б щ е й о си , со де р ж а щ и х по о б о ду а лф а ви тв случа йно й по сле до ва те льно сти . Н а йдя на о дно м ди ске б укву те кста , счи тыва ли с др уго го ди ска со о тве тствую щ ую е й б укву ши ф р а . Т а ки е пр и б о р ы, по р о ж да ю щ и е ши ф р пр о сто й за ме ны и спо льзо ва ли сь впло ть до э по хи во зр о ж де ни я. 8. В I ве ке н. э . Ю ли й Ц е за р ь по сла ни е се на ту за ши ф р о ва л путе м сдви га а лф а ви та на 4 по зи ци и . Ка ж да я б уква и схо дно го те кста за ме няла сь че тве р то й по сче ту о тне е в а лф а ви те . Исхо дный те кстVENI VIDI VICI — пр и ше л, уви де л, по б е ди л. Ш и ф р о вка SBKF SFAF SFZF (сдви гна за д на 4-ю б укву, вклю ча я и схо дную ) Т а б ли ца пр о сто й за ме ныЦ е за р я. ↑ABCD… WXYZ ↓DEFG… ZABC
Импе р а то р А вгуст(1 ве к н. э .) за ме нял пе р вую б укву на вто р ую , вто р ую – на тр е тью и т. д. … по сле дню ю – на пе р вую . Т а б ли ца по дста но вки А вгуста . ↑ABCD… WXYZ ↓BCDE… XYZA В се пр и ве де нные выше пр и ме р ыэ то ши ф р ыпр о сто й за ме ны. В а р а б ско й э нци кло пе ди и (на ча ло Х V ве ка ) в ста тье “Ш и ф р »(ши ф р -сло во а р а б ско е ) уж е ука за н спо со б вскр ыти я ши ф р а пр о сто й за ме ны путе м по дсче та ча сто ты (ча сто сти ) по вто р яе мо сти б укв те кста и пр и во ди тся пе р е че нь б укв в по р ядке уб ыва ни я и х ча сто сти в те ксте Ко р а на . Для спр а вки ча сто сть б укв р усско го а лф а ви та с то чно стью до де сятых до ле й пр о це нта . б уква
о
е ,ё а ,и
%
9,0 7,2 6,2 5,3 4,5 4,0 3,8 3,5 2,8 2,6 2,5 2,3 2,1 1,8 1,6 1,4
б уква
г
%
1,3 1,2 1,0 0,9 0,7 0,6
ч
й
н,т с
х
ж
р
в
ш,ю
л
ц
к
м
д
п
у
я
ы,з ь,ъ
щ ,э ф
0,4 0,3
0,2
За ме ти м, что ча сто сть за ви си т не ско лько о т то го по ка ко му те ксту о на счи та ла сь: худо ж е стве нна я ли те р а тур а , по ли ти че ска я (га зе ты), на учна я, сти хи П ушки на и т. п. Русски й а лф а ви т: 1
2
3
4
5
6
7
8
9
10 11
а
б
в
г
д
е
ё
ж
з
и
й
12 13 14 15 16 17 18 19 20 21 22 к
л
м
н
о
п
р
с
т
у
ф
23 24 25 26 27 28 29 30 31 32 33 х
ц
ч
ш
щ
ъ
ы ь
э ю
я
Т а б ли ца ча сто сте й б укв а лф а ви та по зво ляе т о пр е де ли ть о ди н и ли не ско лько си мво ло в ши ф р о ва нно го со о б щ е ни я, ко то р ых и но гда до ста то чно для р а сши ф р о вки все го со о б щ е ни я. Н а пр и ме р в р а сска за х Ко на н До йля “П ляшущ и е че ло ве чи ки ” и Э дга р а П о “Зо ло то й ж ук”. 9. В V – IV ве ка х до на ше й э р ы в Спа р те и Гр е ци и пр и ме няли пе р во е и зве стно е на м кр и пто ло ги че ско е устр о йство па ло чку-СКИТ А Л У за да нно го (се кр е тно го ) ди а ме тр а . Н а не е на ма тыва ли б е з пр о ме ж утко в дли нную узкую по ло ску па пи р уса и по стр о чно пи са ли те кст, на пр и ме р “за втр а не выступа йте ”. Сняв ле нту со ски та лы, по луча ли пи сьмо с ши ф р о ва нным те ксто м.
Р исун о к 2.2
Ски та ла — э то ши ф р пе р е ста но вки . А р и сто те ль пр е дло ж и л спо со б де ши ф р а ци и о б е р тыва ни е м ле нты на ко нус, на чи на я с е го о сно ва ни я. Где -то на ко нусе б удут пр о сма тр и ва ться куски со о б щ е ни я. Т а к о пр е де ли тся ди а ме тр ски та лы. О со б е нно сть. Для по луче ни я на ле нте спло шно го б е з пр о б е ло в те кста тр е б уе тся, что б ы все стр о ки , по ме щ а ю щ и е ся по о кр уж но сти ски та лы, б ыли за по лне ны. Ина че на ле нте о б р а зую тся пр о б е лы, ко то р ые пр и во дятк р а сши ф р о вке . Н а пр и ме р , на ма тыва е м ле нту на ше сти гр а нный ка р а нда ш (удо б не е кр угло й ски та лы — за ко ди р о ва ны6 стр о к по о кр уж но сти ) и пи ше м 6 стр о к те кста на гр а нях ка р а нда ша Дли на стр о ки до лж на б ыть р а вна INT (N/6) + 1. N – ко ли че ство б укв в те ксте со о б щ е ни я. О ста то к ме ст на по сле дне й гр а ни (е сли N не де ли тся на 6 на це ло ) за по лняе м лю б ыми б уква ми (“шумо м”). Со вр е ме нный спо со б р а сши ф р о вки – пе р е б о р все х во змо ж ных дли н (на чи на я с 1) ска чко в чте ни я по по сле до ва те льно сти б укв на ле нте ски та лы.
Ш и ф р ы в о з р о ждени я кр и п то гр аф и и п о сле тем ны х в еко в в ар в ар ств а, п о следо в ав ш и х п о сле п адени я Ри м а. (Ко нец ср еднев еко в ья 1390 г. до начала но в о го в р ем ени ХIХ в ек) 10. Т а б ли цы пр о стых ши ф р ую щ и х пр о це дур пе р е ста но вки б укв в со о б щ е ни и . Се кр е то м (клю чо м) зде сь служ и тр а зме р та б ли цы. Н а пр и ме р , пр о ста я пе р е ста но вка б е з клю ча , та б ли чный а на ло гски та лы. Исхо дный те кст В Ы СТ У П А Й Т Е Н А РА ССВ Е Т Е за пи сыва ли по сто лб ца м в та б ли цу и з 4-х стр о к и 5 сто лб цо в, а ши ф р о вку по луча ли чте ни е м по стр о ка м: В У Т РВ Ы П Е А Е СА Н СТ Т Й А СЕ . Или , на пр и ме р , за пи сыва я в гр уппыпо 4 б уквыдля удо б ства чте ни я: В
У
Т
Р
В
Ы
П
Е
А
Е
С
А
Н
С Т
1234
Т
Й
А
С Е
Э то тспо со б на зыва ю ти по сто лб цо во й тр а нспо зи ци е й
В У Т Р В Ы П Е А Е СА Н СТ Т Й А СЕ 5123
4512
3451 2345
П р и ме р . Исхо дный те кстза пи сыва е м по спи р а ли . Ш и ф р о вку чи та е м по стр о ка м:
В
А
Р
А
Н
Ы
С Е
Т
Е
В А РА Н Ы СЕ Т Е СС В Е Т Т У П А Й
С
С В
Е
Т
ма р шр утна я
Т
У
А
Й
П
тр а нспо зи ци я
11. О ди но чна я пе р е ста но вка стр о к и ли сто лб цо в та б ли цы тр а нспо зи ци и по клю чу (сло ву и ли чи слу) со о тве тствую щ е й дли ны. Н а пр и ме р для пе р е ста но вки сто лб цо в в ве р хне й стр о ке за пи са но клю че во е сло во . БАРАН ← КЛЮЧ 31524
12345
ВУТРВ
УРВВТ
ЫПЕАЕ
ПАЫЕЕ
САНСТ
АССТН
ТЙАСЕ
ЙСТЕА
В ве р хне й стр о ке за пи са но клю че во е сло во . П о д ни м по сле до ва те льно сть пе р е ста но вки по е сте стве нно му по р ядку б укв клю ча в а лф а ви те (но не по но ме р а м n/n б укв а лф а ви та ). Ч и та е м по стр о ка м по сле пе р е ста но вки ши ф р о те кст. У РВ В Т П А И Е Е А С СТ ИЙ СТ Е А
и схо дна я
по сле
та б ли ца
пе р е ста но вки
Для до по лни те льно й скр ытно сти мо ж но до б а ви ть е щ е пе р е ста но вку (по лучи м дво йную пе р е ста но вку) с по мо щ ью ж е ла те льно др уги х р а зме р о в, на пр и ме р 5х4. Е щ е лучше е сли дли ны стр о к и сто лб цо в б удут вза и мно пр о стыми . Или вто р о й р а з пе р е ста влять не сто лб цы, а стр о ки . 12. Дво йна я пе р е ста но вка для стр о к и сто лб цо в. 2
4
1
4 П
Р
1 З
2
3
4
1
2
3
4
И Е
4 И П
Е
Р
1 А
З
Ю
Ж
Ж
А
Ю
1 А
Ю
Ж
2 Е
С
Ш
2
Ш
Е
С
2 Е
С
Ш
3 Г
Т
О
О
3 Т
О
Г
О
3 Г
О
О
4 И П
Е
Р
и сх.те кст
3
1
З Т
1-а я пе р е ст. сто лб .
2-а я пе р е ста но вка сто лб цо в
ши ф р о вку чи та ли по стр о ка м: А ЗЮ Ж
Е _Е Ш
ГТ О О
ИП Е Р
Клю чи зде сь – э то но ме р а (чи сла ) по р ядко в пе р е ста но во к стр о к 4123 и сто лб цо в 2413 и схо дно й та б ли цы. Ч и сло ва р и а нто в дво йно й пе р е ста но вки б ыстр о р а сте тс уве ли че ни е м р а зме р а та б ли цыи схо дно й Ра зме р и схо дно й Ко ли че ство та б ли цы пе р е ста но во к 3х3
36
4х4
576
5х5
14400
ва р и а нто в
13. М а ги че ски е ква др а ты со впи са нными в ни х на тур а льным р ядо м чи се л, да ю щ и х в сумме по сто лб ца м, стр о ка м и ди а го на лям о ди на ко во е чи сло . В ср е дне ве ко вье счи та ло сь, что та ки е ква др а ты о хр а няю т се кр е т те кста не то лько клю чо м, но и ма ги е й ква др а та . Т е кст впи сыва лся в ква др а т по по р ядку пр и ве де нно й в не м нуме р а ци и . В пи са ли П РИЕ ЗЖ А Ю Ш Е СТ О ГО . 16
3
2
13
О
И
Р
Т
5
10 11
8
З
Ш
Е
Ю
все чи сла р а зные и з на тур а льно го р яда 1… 16
9
6
7
12
Ж
А
С
Ч и та е м ши ф р о вку по стр о ка м:
4
15 14
1
Г
О
П
О ИРТ ЗШ Е Ю _Ж А С Е ГО П
Е
Ко ли че ство р а зли чных ма ги че ски х ква др а то в б ыстр о уве ли чи ва е тся с е го р а зме р о м: 3х3 –1 4х4 –880 5х5 –250 000 14. Ита льяне ц Дж . Ка р да нно , увле ка ясь те о р и е й ма ги че ски х ква др а то в, о ткр ыл но вый кла сс пе р е ста но во к – р е ше тки и ли тр а ф а р е т. Э то ква др а тные та б ли цы с че тным чи сло м стр о к И сто лб цо в, в ко то р ых че тве р ть яче е к пр о р е за ны та к, что пр и 4-х по сле до ва те льных по во р о та х на 90 гр а дусо в о ни по кр ыва ю тве сь ква др а т. Т е кствпи сыва е тся в пр о р е за нные яче йки по стр о ка м и по во р о ты пр о до лж а ю тся по ка ве сь ква др а т не б уде т за по лне н. В о змо ж ны та кж е по во р о ты вдо ль ве р ти ка льно й и го р и зо нта льно й о се й си мме тр и и на 180 гр а дусо в. Се кр е т– р а зме р р е ше тки и выр е зо в в не й. В о змо ж на и пр ямо уго льна я р е ше тка (не ква др а т), но для не е до пуска ю тся то лько по во р о ты, на пр и ме р , сна ча ла вдо ль ве р ти ка льно й о си си мме тр и и на 180 гр а дусо в, за те м вдо ль го р и зо нта льно й о си си мме тр и и на 180 гр а дусо в, за те м сно ва вдо ль ве р ти ка льно й о си . В пи сыва е м в те кст: П РИЕ ЗЖ А Ю Ш Е СТ О ГО
Р исун о к 2.3
Ш и ф р чи та е м по стр о ка м : ЗТ П _ О Ж Ш Р Е ИГА Е СЮ О Ч и сло по до б ных р е ше то к б ыстр о р а сте тс и х р а зме р о м Ква др а т 2х2 — 1 р е ше тка 4х4 — 256 р е ше то к 6х6 — свыше 100 000
П р и ме р пр ямо уго льно й р е ше тки 6х8 = 48, 12 = 48/4 выр е зо в
Р исун о к 2.4
15. П р о сто й клю ч за ме ны, пр и дума нный то р го вца ми в ср е дни е ве ка для ши ф р о вки да ты пр и е зда и ли це ны то ва р а , до ж и вши й до на ча ла пр о шло го ве ка и з-за пр о сто ты и удо б ства . Т о р го вцы за р а не е до го ва р и ва ю тся о б о б щ е м клю че во м сло ве , б уквы ко то р о го о б о зна ча ю тци ф р ыпо по р ядку б укв в клю че . Н а пр и ме р : Р Е С П У Б Л И К А – клю ч ши ф р о ва ни я 0 1 2 3 4 5 6 7 8 9 – ци ф р ыи схо дно го те кста П о лучи в со о б щ е ни е П РИБЫ В А Ю 16/03/92.
Е Л РП А С, то р го вцы чи та ли е го ка к П РИБЫ В А Ю
16. Ш и ф р Гр о не ф е льда . Э то сло ж на я мно го а лф а ви тна я мо ди ф и ка ци я ши ф р а Ю . Ц е за р я с чи сло вым клю чо м, ци ф р ы ко то р о го о зна ча ю т сво й сдви г а лф а ви та для ка ж до го си мво ла и схо дно го те кста . Ко р о тки й клю ч для дли нно го те кста по вто р яю т ци кли че ски . С О В _ С Е К Р Е Т Н О — со о б щ е ни е 3 1 4 3 1 4 3 1 4 3 1 4 — клю ч 314 Ф П Ё В Т ИН СИХ О Т — ши ф р о гр а мма (на пр и ме р , б укву “В “ и схо дно го те кста ши ф р уе м 4о й о тне е о тсто ящ е й б укво й по по лно му а лф а ви ту с Ё и пр о б е ло м. 17. Т а б ли ца В и ж и ке р а , ди пло ма та кр и пто гр а ф и че ски е си сте мы.
Х У1
ве ка ,
со ве р ше нство ва вше го
А
Б
В
Г
…
Ю
Я
_
- а лф а ви тб е з Ё и Й но с пр о б е ло м в ко нце
А
Б
В
Г
…
Ю
Я
_
- сме щ е ни е на о дну по зи ци ю
Б _
А
Б
В
…
Э
Ю
Я
- сме щ е ни е на две по зи ци и
В
Я
_
А
Б
…
Ь
Э
Ю
и тд.
... …
…
…
…
…
…
…
…
Я
В
Г
Д
Е
…
_
А
Б
Ка ж да я стр о ка (но вый а лф а ви т) со о тве тствуе т ши ф р у за ме ны вр о де ши ф р а Ц е за р я
_
Б
В
Г
Д
…
Я
_
А
А
О го ло во к сдви нуто го а лф а ви та – о тсю да выб и р а ю тб уквы сло ва клю ча . Исхо дный те кст выпи сыва ю т в о дну сто р о ну, а по д не й клю ч. Е сли клю ч ко р о че со о б щ е ни я, то е го ци кли че ски по вто р яю т. П р и ши ф р о ва ни и по льзую тся для ка ж до й б уквыо ткр ыто го те кста те м а лф а ви то м, ко то р ый и ме е т о го ло во к и з б уквы клю ча . Для удо б ства о б ычно и з та б ли цыВ и ж и ке р а выпи сыва ю тпо клю чу по д та б ли цу стр о к а лф а ви то в со о тве тствую щ и х б уква м клю ча .
Н а пр и ме р во зьме м клю че во е За ши ф р уе м те кст. А
Б В
В
Я
_
А
А
Г А
Г
сло во
В А ГА . Т о гда
по дта б ли ца
а лф а ви то в б уде т:
…
Ю
Я
_
Б …
Ь
Э
Ю
О Ж ИДА Й БУ РИ — со о б щ е ни е
Б В
Г
…
Ю
Я
_
В А ГА В А ГА В А Г — клю ч
Ю
Я
_
А
…
Ы
Ь
Э
М Ж Е ДЯ И Э БСРЕ — ши ф р о вка
А
Б В
Г
…
Ю
Я
_
А
Т а ко й ши ф р сло ж ный (мно го а лф а ви тно й) за ме ны и спо льзуе тся и по се й де нь. Клю ч для та б ли цыВ и ж и ке р а на зыва ю т“ло зунг”. 18. В 1508 г. а б б а тТ р а смус (Т р и пе ми ус) и зда л пе р вую пе ча тную кни гу о та йно пи си , в ко то р о й пр е дло ж и лне ско лько сво и х ши ф р о в. 1) Т а к ка к пр и р учно м ши ф р о ва ни и де р ж а ть в уме случа йную та б ли цу за ме ны не во змо ж но Т р и пе ми ус пр е дло ж и л за по лнять та б ли цу за ме ны по стр о ка м сна ча ла клю че вым сло во м с не по вто р яю щ и ми ся б уква ми , за те м не и спо льзо ва нными б уква ми а лф а ви т по по р ядку. Н а пр и ме р для р усско го а лф а ви та (б е з пр о б е ла , ё, й, ъ) впи сыва е м в та б ли цу 5х6 клю че во е сло во РЕ СП У БЛ ИКА . Да ле е , на пр и ме р , ка к и в ши ф р е П о ли б и я на хо ди м о че р е дную б укву в та б ли це и за ме няе м е е б укво й р а спо ло ж е нно й ни ж е (ци кли че ски ) в то м ж е сто лб це . Р
Е
С
П
У
Б
Л
И
К
А
В
Г
Д
Ж
З
М
Н
О
Т
Ф
Х
Ц
Ч
Ш
Щ
Ь
Ы
Э
Ю
Я
Со о б щ е ни е О Т П Л Ы В А Е М да е тши ф р Ш Щ А /ДСН /М ИЦ и ли Ш Щ А Д СН М ИЦ
2) Др уго й ши ф р Т р и смуса – мно го а лф а ви тно е с клю чо м усо ве р ше нство ва ни е ши ф р а Ц е за р я –до ж и л до на ши х дне й. В се б уквы а лф а ви та (и ли р а сши р е нно го а лф а ви та со зна ка ми пр е пи на ни я и ци ф р а ми по со вр е ме нно му) нуме р ую тся по по р ядку о т0 до N-1. В ыб и р а е тся се кр е тно е сло во – клю ч. Е сли о но ко р о че со о б щ е ни я то по дпи сыва е тся ко д со о б щ е ни е м не о б хо ди мо е ко ли че ство р а з. Скла дыва я по мо дулю N но ме р о че р е дно й б уквы те кста с но ме р о м со о тве тствую щ е й б уквы клю ча по луча ю т ци ф р о вую ши ф р о гр а мму. В но вь за ме няя чи сла ши ф р о гр а ммы со о тве тствую щ и ми си мво ла ми по луча е м ши ф р о ва нный те кст. _ А Б В … Я (см. п. 6) 0 1 2 3 … 33 Тn
О
Т
П
Л
Ы
В
А
Е
М
– те кст
Сn
Я
Р
У
С
Я
Р
У
С
Я
– клю ч
33
18
21
19
33
18
21
19
33
– но ме р а б укв клю ча
16
20
17
13
29
3
1
6
14
– но ме р а б укв те кста
Sn
15
4
4
32
28
19
22
25
13
– ши ф р о гр а мма
Н
Г
Г
Ю
Ъ
Е
Ф
Ч
Л
– ши ф р о те кст
Т а к для на ше й за да чи ши ф р о ва ни я/де ши ф р о ва ни я и ме е м Т n, Сn, Sn ∈ {0,1,2, … N-1} N = 34, то э ти пр о це дур ыб удуто пр е де ляться сле дую щ и ми пр о стыми ф о р мула ми Ш и ф р о ва ни е : сумма Т n + Сn по мо дулю N Sn = (Т n + Сn) mod N = {Т n + Cn пр и Т n + Cn < N и ли Т n + Cn — N пр и Т n + Cn ≥ N} Де ши ф р о ва ни е : р а зни ца Sn — Сn по мо дулю N Tn = (Sn — Сn) mod N = {Sn — Cn пр и Sn — Cn ≥ 0 и ли Sn — Cn + N пр и Sn — Cn < 0} П р и ме р : В ИРУ С_П О Ш Е Л — те кст Я РУ СЯ РУ СЯ РУ — клю ч 33 18 21 19 0 17 16 26 7 13 — но ме р а б укв те кста 2 28 5 6 18 18 4 1 25 25 0 — но ме р а б укв ши ф р о гр а ммы БЪ ДЕ РРГА Ч Ч _ — ши ф р о те кст За ме ти м, что для а лф а ви та (чи се л 0, 1) сло ж е ни е по мо дулю 2 и вычи та ни е по мо дулю 2 выпо лняю тся о дно й и то й ж е о пе р а ци е й Х О R. 19. В XVIII ве ке по яви лся ши ф р , на зыва е мый “ши ф р по кни ге ”. Испо льзуе тся та кж е си сте ма ши ф р о ва ни я, что и о пи са нна я в п. 15.2. О дна ко , в ка че стве клю ча выб и р а е тся то й ж е дли ны, что и со о б щ е ни е о тр е зо к те кста в кни ге , и ме ю щ е йся у о тпр а ви те ля и у по луча те ля со о б щ е ни я. Со о б щ е ни е на чи на е тся с па р ы чи се л, ука зыва ю щ и х но ме р стр а ни цыи но ме р стр о ки те кста клю ча в кни ге . 20. Би гр а мные ши ф р ы. Ш и ф р ы, пр и ве де нные выше , на зыва ю тмо но гр а мными , та к ка к ши ф р о ва ни е ве де тся по о дно й б укве по о че р е ди . Т р и се мус пе р вый за ме ти л, что мо ж но ши ф р о ва ть и по две б уквы за р а з. Т а ки е ши ф р ы на зыва ю т б и гр а мными . Н а и б о ле е и зве сте н в но во м вр е ме ни ши ф р Playfair (В е ли ко б р и та ни я, 1-я ми р о ва я во йна ). Исхо дный те кст р а зб и ва е тся на па р ы б укв (б и гр а ммы) и те кстши ф р о вки стр о и тся по сле дую щ и м пр о стым пр а ви ла м: 1) Е сли о б е б уквыи схо дно го те кста пр и на дле ж а ли о дно й ко ло нке , то б уква ми ши ф р а счи та ли сь б уквы, ко то р ые ле ж а ли по д ни ми (ци кли че ски ) (по д ка ж до й). 2) Е сли о б е б уквы на хо ди ли сь в о дно й стр о ке та б ли цы, то б уквы ши ф р а б р а ли сь спр а ва о тни х (ци кли че ски ) (спр а ва о тка ж до й). 3) Е сли о б е б уквына хо ди ли сь в р а зных стр о ка х и ко ло нка х, то вме сто ни х для ши ф р а б р а ли сь та ки е две б уквы, что б ы вся че тве р ка и х пр е дста вляла пр ямо уго льни к, а по сле до ва те льно сть б укв в ши ф р е б ыла зе р ка льно й и схо дно й па р е . Со о б щ е ни е П У СТ Ь КО Н СУ Л Ы БУ ДУ Т та б ли цыи з п. 15.1 сле дую щ и м о б р а зо м:
БДИТ Е Л ЬН Ы
ши ф р уе тся, на пр и ме р , для
П У СТ ЬК О Н СУ Л Ы БУ ДУ Т Б ДИ Т Е Л Ь Н Ы У Б РХ Ы И ДО П Б КЩ РБ Н Р Ш Р Ж Л ИЩ ЗЮ IIIи ф р о ва ни е б и гр а мма ми за ме тно уси ли ло сто йко сть ши ф р о в к вскр ыти ю .
Но в о е в р ем я (XIX в ек — … ) п р едъяв и ло к ш и ф р ам тр еб о в ани я: легко сть м ассо в о го и сп о льз о в ани я и уси лени е усто йчи в о сти к в з ло м у. 21. Дво йно й ква др а т б и гр а мм. В 1854 г. Ч . У и нсто н р а зр а б о та л дво йно й ква др а тдля ши ф р о ва ни я б и гр а мма ми . Э та но ва я кр и пто си сте ма для р учно го ши ф р о ва ни я о ка за ла сь та к на де ж на и удо б на , что пр и ме няла сь не мца ми да ж е в го ды 2-о й ми р о во й во йны. Ра ссмо тр и м пр и ме р для р усско го а лф а ви та б е з ё, й, но с пр о б е ло м и зна ка ми (то чка , за пята я, дво е то чи е ). Бе р е м два ква др а та 7х5 ка к о ди н 7х10 со случа йно р а спо ло ж е нными в ни х а лф а ви та ми : 10x7 Ч
В
Ы
П
Е
Л
Ц
:
П
О
К
:
Д
У
.
Х
Ъ
А
Н
Г
М
З
Э
Ф
Ш
Д
Э
К
С
Л
Ъ
Х
А
,
Ы
Б
Ф
У
Ю
Р
Ж
Щ Н
Я
Т
И
Ч
Г
Ц
Б
И
Т
Ь
М
О
,
Ж
Ь
.
С
Я
М
Е
В
Щ З
Ю
Р
7x5
7x5
Ра зб и ва е м со о б щ е ни е на б и гр а ммы. П е р вую б укву б и гр а ммы на хо ди м в ле во й та б ли це , а вто р ую в пр а во й. За те м мысле нно в та б ли ца х ср а зу в двух по ло ви нка х стр о и тся пр ямо уго льни к та к, что б ы б уквы б и гр а мм ле ж а ли в е го пр о ти во по ло ж ных ве р ши на х. Две др уги е ве р ши ныэ то го пр ямо уго льни ка да дутб уквыши ф р о вки . Е сли о б е б уквыб и гр а ммы со о б щ е ни я ле ж а тв о дно й стр о ке , то пе р ва я б уква б и гр а ммы ши ф р о вки б е р е тся и з пр а во й та б ли цыв то й ж е стр о ке , но в сто лб це с но ме р о м сто лб ца 1-о й б уквыб и гр а мм со о б щ е ни я. В то р а я б уква б и гр а ммыши ф р о вки б е р е тся и з ле во й та б ли цыв то й ж е стр о ке , но в сто лб це с но ме р о м сто лб ца 2-о й б уквыб и гр а ммысо о б щ е ни я. Со о б щ е ни е : П Р ИЕ ЗЖ А Ю _Ш Е С Т О ГО Ш и ф р о вка :
П Е М В КИ Ф М Е Ш РФ Ж Б ДЦ Щ Л
Е сть сво б о да до го во р ных мо ди ф и ка ци й выб о р а б укв ши ф р о вки . П о луча е тся ве сьма усто йчи вый к вскр ыти ю и пр о сто й ши ф р . В зло м дво йно го ква др а та б и гр а мм тр е б уе тб о льши х уси ли й и дли нысо о б щ е ни я б о ле е 30 стр о к. 22. Ш и ф р Ж . В е р на ма (1917 г.) пр е дло ж е н для дво и чных си мво ло в 5-ти р а зр ядно го ко да БО ДО . Ка ж дый б и тсо о б щ е ни я ши ф р уе тся но вым случа йным б и то м клю ча и клю ч и спо льзуе тся то лько о ди н р а з и е го дли на р а вна дли не со о б щ е ни я. Ка ж дый б и т ши ф р о вки по луча е тся и з о че р е дных б и та со о б щ е ни я и б и та клю ча о пе р а ци й сло ж е ни я по мо дулю два (XOR). В е р на м ве р и л в не р а скр ыва е мо сть сво е го ши ф р а (б е з до ка за те льства ). Н е во змо ж но сть р а скр ыти я ши ф р о в ти па В е р на ма до ка за л
(1949 г) Ш е нно н. О дна ко ши ф р В е р на ма не пр и го де н в б о льши нстве пр а кти че ски х случа е в, за и склю че ни е м не б о льши х о б ъе мо в те кста . 23. Ш и ф р -б ло кно т с о дно р а зо вым клю чо м по схе ме В е р на ма , ф о р ма льными ср е дства ми не р а скр ыва е мый, та к ка к дли на клю ча Z р а вна дли не те кста Х . со о б щ е ни е
и схо дный те кст ρ чи сле нный ко д б укв x чи сле нный клю ч
ρ Z
чи сле нный ши ф р
y = (x+z) mod 26 Ш и ф р о те кст
Т а ки ми ши ф р -б ло кно та ми на о ди н р а з по льзо ва ли сь р а зве дчи ки вто р о й ми р о во й во йны, а по сле и в не ко то р ых стр а на х. Ш и ф р -б ло кно те сть са м по се б е кр е по сть для по сто р о нни х: •
о ткр ыва ни е со спе ци а льно й пр е до сто р о ж но стью , и на че клю чи мо гут и сче знуть (да ж е вме сте с о ткр ывши м и х че ло ве ко м);
•
б ло кно т выпо лняе тся с пр о ши тыми на скво зь стр а ни ца ми , р а зде ле нными не пр о зр а чными для лю б о го по дсма тр и ва ни я ли ста ми . Ч то б ы пр о че сть о че р е дно й клю ч, на до выр ва ть о че р е дно й ли стр а зде ли те ля, что за ме ти тхо зяи н;
•
ка к то лько стр а ни ца о ткр ыта для чте ни я, те кст на чи на е т б ле дне ть и че р е з не ко то р о е вр е мя и сче за е тб е ссле дно ;
•
ча сто в б ло кно ты по ме щ а ю тне са ми клю чи , а и х ши ф р о вки , сде ла нные по клю чу, ко то р ый ши ф р о ва льщ и к хр а ни тли шь в па мяти .
У хи щ р е ни ям не тко нца . У р а зве дчи ка А б е ля б ыл о б на р уж е н кр и пто -б ло кно тр а зме р о м с по что вую ма р ку. 24. М е ха ни че ски е ши ф р о ва льные ма ши ныте кста пи сьма . 1) П е р во е ши ф р ую щ е е ко ле со и зо б р е те но Т . Дж е ф ф е р со но м в 1790 г., ста вши м по то м 3-и м пр е зи де нто м СШ А . П р и нци п р а б о ты ма ши н с ши ф р ую щ и ми ко ле са ми с ци ф р а ми по о б о ду за клю ча е тся в мно го а лф а ви тно й за ме не те кста со о б щ е ни я по дли нно му клю чу. Дли на пе р и о да клю ча р а вна на и ме ньше му о б щ е му кр а тно му пе р и о до в о б о р о та ши ф р ую щ и х ко ле с. Н а пр и ме р , для 4-х ко ле с с пе р и о да ми 13, 15, 17 и 19 по луча е м пе р и о д клю ча 13х15х17х19 = 62985. Т а ка я б о льша я дли на клю ча о че нь за тр удняе т р а сши ф р о вку ко р о тки х со о б щ е ни й. П о хо ж и е устр о йства пр и ме няли сь а р ми е й СШ А и по сле вто р о й ми р о во й во йны. 2) В 1891 г. по яви лся ци ли ндр Ба зе р и Э . и з 20 ди ско в со случа йными по о б о ду а лф а ви та ми . Ди ски по ме щ а ли сь на о б щ ую о сь в по р ядке о пр е де ле нно м клю чо м. Н а б р а в пе р вые 20 б укв те кста в р яд на ци ли ндр а х и х по во р а чи ва ли вме сте и счи тыва ли в др уго м р яду (стр о ке ) ши ф р о ва нно е со о б щ е ни е . П р о це сс по вто р яе тся по ка все со о б щ е ни е не б ыло за ши ф р о ва но . Э та ма ши на да е т б о ле е пр и ми ти вный ши ф р не ж е ли пр е дыдущ а я (21.1) 3) П р е дше стве нни ца со вр е ме нных кр и пто -ма ши н б ыла пр е дло ж е на Х е б е р но м Э . в 1917 г. и р е а ли зо ва на в пр о мышле нно й ве р си и ф и р мо й Siemens не ме цки м и нж е не р о м А .Ки р хо м. Э ту ма ши ну на зва ли Э ни гмо й (за га дка ). П е р ва я ве р си я со де р ж а ла 4 б а р а б а на на о дно й о си , на ка ж до й сто р о не б а р а б а на и ме ли сь по о кр уж но сти 25 ко нта кто в, по чи слу б укв в а лф а ви те . Ко нта кты с о б е и х сто р о н со е ди няли сь по па р но случа йным о б р а зо м 25 пр о во да ми . Ба р а б а ны скла дыва ли сь
вме сте и и х ко нта кты пр о во ди ли то к о тши ф р ую щ е й кла ви ши и з вне шне й сто р о ны пр а во го б а р а б а на до счи тыва ни я ши ф р а ла мпо чко й у вне шне сто р о ны ле во го б а р а б а на . П е р е д на ча ло м р а б о ты б а р а б а ны уста на вли ва ли сь та к, что б ы уста на вли ва ло сь за да нно е ко до во е сло во – клю ч. А по сле на ж а ти я о че р е дно й кла ви ши ши ф р о ва ни я пр а вый б а р а б а н по во р а чи ва ю т на о ди н ша г. П о сле то го ка к пр а вый б а р а б а н де ла л о ди н о б о р о т по во р а чи ва лся сле дую щ и й б а р а б а н на о ди н ша г(ка к в сче тчи ке о б о р о то в э ле ктр о э не р ги и , ма ши н и т.п.). Т а ки м о б р а зо м по луча лся клю ч за ве до мо го р а здо б о ле е дли нный, че м те кст со о б щ е ни я. Ра ссмо тр и м пр и ме р для ги по то ни че ско го а лф а ви та А БВ ГДЕ на 2-х б а р а б а на х.
Р исун о к 2.5 Р исун о к 2.6
Зде сь по ка за но и схо дно е по ло ж е ни е б а р а б а но в. У ста на вли ва е м клю ч БА ни ж е пр и ве де нно го пр и ме р а . Ба р а б а н N2 в по ло ж е ни и , что б ыв ве р хне й стр о ке б ыла б уква Б. Ба р а б а н N1 уж е (на р и сунке ) сто и тв не о б хо ди мо м по ло ж е ни и . Н а ж и ма е м кно пку “B” — ви ди м ла мпо чку А . Сдви га е м б а р а б а н N1 на о ди н ша г вве р х. Н а ж и ма е м “A”. В и ди м ла мпо чку “A” и т. д. У ста но ви м клю ч БА на б а р а б а на х и за ши ф р уе м со о б щ е ни е В А ГЕ А Д А ГА В Е ДА на ж и ма я кла ви ши вво да и схо дно го те кста и пр о чи тыва я по ла мпо чка м ка ж дый р а з по во р а чи ва я б а р а б а н сни зу вве р х по р и сунку. Исхо дный те кст:
ВАГЕ АД АГАВЕ ДА
Ш и ф р о вка :
ААЕБ ГВ ЕГБДД ЕГ (сдви га е м на ша ги б а р а б а н № 2)
В да льне йше м и чи сло б а р а б а но в до ве ли до Б и е щ е дви ж е ни е (по во р о т) б а р а б а но в сде ла ли ха о ти чным(по сво е му клю чу) и для за тр удне ни я р а сши ф р о ва ни я б а р а б а ны де нь о то и дня пе р е ста вляли сь ме ста ми . А нгли ча не до ста ли б а р а б а ны Э Н ИГМ Ы . Н о взло м ши ф р о в ше л тяж е ло до те х по р по ка в 1942 г. А . Т ью р и нг не со зда л спе ци а льно для взло ма Э Н ИГМ Ы б ыстр о де йствую щ ую Э В М “КО Л О СС”, те пе р ь и ме я до б ытые р а не е б а р а б а ны, а нгли йски е кр и пто ма ши ны взла мыва ли ме не е че м за де нь, пе р е б и р а я все во змо ж ные клю чи . О дна ко Э Н ИГМ А по сто янно усло ж няла сь, и б ыли пе р и о ды, ко гда а нгли ча не не смо гли с не й спр а ви ться. А пе р е д ши ф р о вка ми Э Н ИГМ Ы , ко то р ые и схо ди ли не о т во йск, а и з не ме цки х кр и пто це нтр о в “КО Л О СС” то ж е б ыл б е сси ле н.
Ш и ф р о в ани е п и сьм а в Ро сси и . 25. П е р вый и зве стный ши ф р в Ро сси и “та р а б а р ска я гр а мо та ”. Э то пр о ста я за ме на то лько со гла сных б укв. Гла сные не за ме няю тся. ↑Б В Г Д Ж З К Л М Н ↓Щ Ш Ч Ц Х Ф Т С Р П Т а кую та б ли цу за ме ны на зыва ю тпа р но й, та к ка к пр и ши ф р о ва ни и б уквы р а спо ло ж е нные на о дно й ве р ти ка ли пе р е хо дято дна в др угую . Со о б щ е ни е В Е ЗУ Ш А П КИ выгляди т та к: Ш Е Ф У В А Н Т И. 26. П е тр I упо тр е б лял ши ф р пр о сто й за ме ны ”ци ф и р на я а зб ука ”, в ко то р о й б уквы со о б щ е ни я за ме няли сь ши ф р о о б о зна че ни ями , являли сь б уквы, сло ги , сло ва , а та кж е и др уги е зна ки – «пустышки », не со о тве тствую щ и е ни ка ки м зна ка м о ткр ыто го те кста . 27. В о вто р о й по ло ви не 17 ве ка пр и дума ли ши ф р пр о сто й за ме ны“уго лки ”.
Р исун о к 2.7
Ш и ф р ы п о дп о лья Ро сси и 28. “Т ю р е мна я а зб ука ” для о б щ е ни я за клю че нных в со се дни е ка ме р ыпе р е стуки ва ни е м – а на ло гква др а та П о ли б и я 6х5. Буква пе р е да е тся па р о й но ме р о в стр о ки и сто лб ца ко ли че ство м стуко в с ко р о тко й па узо й ме ж ду но ме р а ми с б о ле е дли нно й па узо й ме ж ду б уква ми К Т О и т.д.
1 2
3 4
5
1 а
б
в г д
2 е
ж
з и
к
3 л м н о
п
4 р
ф
с
5 х ц
т у
А сна ча ла ли де р о м выстуки ва е тся а зб ука .
ч ш щ
6 ь ы э ю
я
29. П а р ный ши ф р . Клю ч – ф р а за , со де р ж а щ а я не ме не е 15 б укв (по ло ви на а лф а ви та б е з ё, й, ъ). Э ти б уквы клю че во й ф р а зы на зо ве м и нф о р ма ци о нными . П о д ни ми по дпи сыва е м о ста вши е ся б уквы а лф а ви та в по р ядке и х сле до ва ни я в не м.
П о луча е м та б ли цу пр о сто й за ме ны, ко то р ую ле гко со зда ст/во сста но ви т, по мня клю че вую ф р а зу. у к р
и
1 2 3
4 5
6
7
8 9
10 11
12 13
14 15
б
з м п
Ф
х ц
ч
щ
э я
г ж
в о
й Н
а
т а
л
ь
ив с
ш
е
л ю
ы
д
и ка на льи
Н уме р уе м по по р ядку 15 р а зных б укв и по дпи сыва е м о ста вши е ся б уквыа лф а ви та . П о луча е м па р ную та б ли цу за ме ны. Для удо б ства по льзо ва ни я э ту па р ную та б ли цу пе р е пи ше м ка к по лный а лф а ви т. ↑А Б В Г Д Е Ж З И К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ь Ы Э Ю Я ↓Х У М И Я Ы Р И З Г Ч В Ф П О Ж Щ Ц Б Н А Т Л Ь С Ш Е Ю Э Д Я вка пр о ва ле на — со о б щ е ни е ДМ ГХ О Ж П М Х Ч Ы Ф Х – ши ф р о вка ДМ ГХ О Ж П М Х Ч М Ф Х 30. А на ло г ши ф р а “по кни ге ” – ши ф р “по сти хо тво р е ни ю ”. Ко р р е спо нде нты за учи ва ю т на и зусть до ста то чно дли нные сти хо тво р е ни я, та ко е , что б ы в не м встр е ти ли сь все б уквыа лф а ви та . Ка ж да я б уква со о б щ е ни я ши ф р уе тся па р о й чи се л – но ме р о м стр о ки , где встр е ча е тся э та б уква и но ме р о м б уквы в не й. Для удо б ства р а б о ты сти хо тво р е ни е за пи сыва ю тна ли ств кле то чку в ви де та б ли цы и нуме р ую т стр о ки и сто лб цы за пи си . П о о ко нча ни и ши ф р о ва ни я/р а сши ф р о выва ни я за пи сь та б ли цыуни что ж а ю т. Ш и ф р о вка и ме е тви д по сле до ва те льно сти па р чи се л.
3. Мо дуляр ная ар и ф м ети ка (mod-ар и ф м ети ка) 3.1. Свойст ва ц елочисленных оп ер а ц ий с mod N Л ю б ые це лые чи сла ср а вни ва ю тся по мо дулю N о то б р а ж е ни е м и х на мно ж е ство мо дуля N р а вно е {0, 1, 2,… . N –1} (1) Для не о тр и ца те льных чи се л а ≥ 0 о то б р а ж е ни е и х на мно ж е ство мо дуля по луча е тся ци кли че ски м вычи та ни е м и з ‘a’ ве ли чи ны N до те х по р по ка не по лучи тся р е зульта т r, пр и на дле ж а щ и й мно ж е ству мо дуля. Э то т р е зульта т и е сть чи сло ‘a’ пр е дста вле нно е (взято е ) по мо дулю N r = a mod N
(2)
Е сли a < N, то r = a. П р о и зо шло о то б р а ж е ни е ‘a’ на са мо е се б я. Для о тр и ца те льных це лых чи се л a < 0 о то б р а ж е ни е р а спр о стр а няе тся путе м ци кли че ско го пр и б а вле ни я N к а .
на
мно ж е ство
мо дуля
О пе р а ци и ср а вне ни я по мо дулю N на глядно мо ж но пр е дста ви ть на о си це лых чи се л, см. р и суно к ни ж е , ка к сче тпа чка ми по N е ди ни ц на пр а вле нный о тза да нно го чи сла в сто р о ну мно ж е ства мо дуля N.
Р исун о к 3.1
Л е гко ви де ть, что для не о тр и ца те льных чи се л ве ли чи на r е сть о ста то к о тце ло чи сле нно го де ли те ля ‘a’ на N. В языке Pascal е сть о пе р а ци я mod – це лый о ста то к о тде ле ни я двух це лых по ло ж и те льных чи се л. П о няти я a mod (-N) не сущ е ствуе т, а взять о тр и ца те льно е це ло е по мо дулю N мо ж но та к: — 9 mod 4 =- (9 mod 4)= — 1 + 4 = 3
(3)
М о ж но и во спо льзо ва ться ф ункци е й Int(x) – це ло е чи сло Для а > 0 r = a mod N = a – N * Int(a/N)
(4)
Для a < 0 r = a mod N = a + N * (Int(-a/N)+1) Н а пр и ме р : r = 9 mod 4 = 9 – 4 * Int(9/4) = 9 – 4*2 = 9 –8 = 1 r = –9 mod 4 = –9 + 4 * (Int(+9/4) = — 9 + 4*(2+1) = 3 В те о р и и чи се л о пр е де ле но отноше ние (≡) ср а вни мо сти це лых чи се л: a ≡ b (mod N)
(5)
‘a’ ср а вни мо с ‘b‘ по мо дулю N, ‘a‘ и ‘b‘ – це лые , N ≠ 0, е сли то лько выпо лняе тся р а ве нство a = b + k*N Е щ е го во р ят: N де ли т(a –b): N| (a-b) и ‘b’ на зыва ю твы че том чи сла ‘a' по мо дулю N.
В ыр а ж е ни е (5) р а вно си льно утве р ж де ни ю , что о ста тки о тде ле ни й ‘a‘ и ‘b’ на N р а вны 17 ≡ 5 (mod 12) о зна ча е т, что 17 mod 12 = 5 5 mod 12 = 5 Для N = 12 по лный на б о р выче то в е сть {0, 1, 2, … 11} В ыр а ж е ни е a ≡ 1 (mod N) о пр е де ляе т все це лые по ло ж и те льные ‘a’, о ста тки о т де ле ни я ко то р ых на N р а вны1.
3.2. О сновные свойст ва 18. a mod a = 0
(6)
19. (a + b) mod N = (a mod N + b mod N) mod N
(7)
20. (a – b) mod N = (a mod N –b mod N) mod N
(8)
21. (a * b) mod N = (a mod N) * (b mod N) mod N
(9)
До ка за те льство — пр яма я по дста но вка . Н а пр и ме р : a = 60, b = 63, N = 32 (60 * 63) mod 32 =3780 mod 32 =3780 – 32 * 118 = 4 L mod N = L – N * INT(L/N) 60 mod 32 = 28, 63 mod 32 = 31 (28 * 31) mod 32 = 868 mod 32 = 4 Сле дстви е : Е сли m = a + b + c, то : 22. xm mod N = xa+b+c mod N = (xaxbxc) mod N = = [(xa mod N)*(xb mod N)*(xc mod N)] mod N 23. (a*(b+c)) mod N = ((a*b) mod N + (a*c) mod N) mod N a⋅i
a
i
24. x mod N = (x mod N) mod N) Де йстви те льно , на пр и ме р 5
2⋅3
(10) (11) (12)
6
mod 11 = 5 mod 11 = 5
2
5 mod 11 = 3 (52 mod 11)3 mod 11 = 33 mod 11 = 27 mod 11 = 5 Ф о р мулы (9), (10), (12) удо б но и спо льзо ва ть для р а сче та по mod N б о льши х чи се л пр е во схо дящ и х р а зр ядно сть Э В М . Н а пр и ме р : x53 mod N Ра зло ж и м 53 на дво и чные со мно ж и те ли 1, 2, 4, 8, 32, 64, … . x53 = x(32+16+4+1) Н а до са ча ла на йти x2, x4 = (x2)2, x8 = (x4)2, x16 = (x8)2, x32 = (x16)2. Э то 5 о пе р а ци й умно ж е ни я. Т е пе р ь на до по сле до ва те льно умно ж и ть x 32 ⋅ x 16 ⋅ x 4 ⋅ x е щ е тр и о пе р а ци и умно ж е ни я. В се о пе р а ци и на до де ла ть по мо дулю N. П о лучи м р е зульта тза 8 о пе р а ци й
Пр име р 1: 319 mod 15 = 319 — 15⋅Int(319/15) = 1162261467 – 15⋅77484097= 12 19 = 16 + 2 + 1 1 2
3
3
2
3 =9
9
3⋅9 = 27 mod 15 = 12
6
12⋅6 = 72 mod 15 = 12
2
4
9 = 81 mod 15 = 6
8
62 = 36 mod 15 = 6
16 62 = 36 mod 15 = 6
Сле дстви е : е сли xa mod N = 1, то и xa⋅i mod N = 1 Пр име р 2: О б щ и е ф о р мулывычи сле ни я б о льши х сте пе не й. ab mod N = (a⋅a⋅а ⋅… ⋅a (b р а з) mod N) за те м пр и ме няе м ф о р мулу (9) 25. F(φ(x)) mod N = F(φ(x) mod N) mod N
(13)
П р о ве р ка : N = 11, x = 5 φ(x) = x2
φ(x) mod N = 52 mod 11 = 3
F(y) = 10y
F(y) mod N = 10*3 mod 11 = 8 = 250 mod 11 = 8
F(φ(x)) mod N = (10*25) mod 11 =
26. Сво йство ко ммута ти вно сти . О б о зна чи м xa mod N = Fa(x), xb mod N = Fb(x) Буде тве р но то ж де ство Fa(Fb(x)) mod N = Fb(Fa(x)) mod N для все х x.
(14)
Де йстви те льно : Fa(Fb(x)) = (Fb(x))a mod N = (xb mod N)a mod N = (см. ф о р мулу 13) = (xb)a mod N = xba mod N Fb(Fa(x)) = (Fa(x))b mod N = (xa mod N)b mod N = (см. ф о р мулу 13) = (xa)b mod N = xab mod N но xba = xab сле до ва те льно и Fa(Fb(x)) = Fb(Fa(x)) 27. Т е о р е ма Э вкли да (300 г. до н.э .) Е сли Е и М удо вле тво р яю тусло ви ю 0 < EM и Н О Д(М ,Е ) = 1, то сущ е ствуе те ди нстве нно е чи сло D, та ко е что 0 < D < M и E*D ≡ 1 (mod M)
((E*D) mod M = 1)
(15)
и кр о ме то го D мо ж е т б ыть вычи сле но с по мо щ ью р а сши р е ни я а лго р и тма Е вкли да пр и на хо ж де ни и HOD(M, Е ). (Ср а вни Кнут Д. ”Искусство пр о гр а мми р о ва ни я, ” т. 1 стр . 26, 1976г. А лго р и тм Е вкли да пр и на хо ж де ни и HOD (M,Е ).
Р исун о к 3.2
28. Ф ункци я Э йле р а Φ (N) — ф ункци я Э йле р а о пр е де ляе т для ка ж до го по ло ж и те льно го це ло го чи сла N ко ли че ство по ло ж и те льных це лых чи се л i не пр е выша ю щ и х N и та ки х, что HOD(i,N) = 1, П р и N = 1 по о пр е де ле ни ю Φ (1) = 1 1≤i
1 2 3 4 5 6 7
Н О Д (i,8) 1 2 1 4 1 2 1 Име е м до 4-х i = 1, 3, 5, 7 Н О Д (i,8) = 1 сле до ва те льно Φ (8) = 4. О че ви дно , что для пр о сто го чи сла Р и ме е м Φ (Р) = Р – 1, та к ка к пр о сто е чи сло не де ли тся на це ло на ме ньше е чи сло . Н а пр и ме р , Φ (7) = 7 –1 = 6, и б о для все х i=1,2,3,4,5,6 Н О Д(i,7) = 1. Н е тр удно ви де ть, что для двух не р а вных пр о стых чи се лP и Q Φ (P*Q) = (P- 1)*(Q – 1)
(16)
Н а пр и ме р , Φ (6) = Φ (2*3) = 1*2 = 2. 29. Т е о р е ма Э йле р а Для лю б ых це лых чи се лx и N (x < N) xΦ (N) ≡ 1 (mod N), xΦ (N) mod N = 1
(17)
пр и усло ви и , что Н О Д (x, N) = 1. Н а пр и ме р , для Φ (8) = 4 ср а вне ни е (17), б уде т выпо лне но то лько для x = 1,3,5,7 для ко то р ых Н О Д (х, N) = 1. Де йстви те льно , на пр и ме р : для х = 2
:
2Φ (8) mod 8 = 24 mod Φ = 16 mod 8 = 0
а для х = 3 : 34 mod 8 = 81 mod Φ по сле до ва те льно сте й (П СП ) чи се л и б и т
= 1.Ге не р а ци я псе вдо случа йных
3.3. Виды да т чик ов ПСП 1) Спе ци а льно со ста вле нна я и о тко р р е кти р о ва нна я на «случа йно сть» та б ли ца . Н е до ста то к: ма л о б ъём та б ли цыи б о льшо й р а схо д па мяти П К на та б ли цу. 2) Ф и зи че ски й да тчи к. Ф о р ми р о ва ни е П СП и з си гна ла э ле ктр о нно го шума р а ди о ла мп, по лупр о во дни ко в, р е зи сто р о в. Н е до ста тки : на ли чи е схе мно й не ста б и льно сти ге не р а то р а , не о б хо ди мо сть ча сто й гр а дуи р о вки и ко нтр о ля. Ф о р ми р о ва ни е П СП с по мо щ ью и спо льзо ва ни я устр о йств яде р но го р а спа да р а ди о а кти вных э ле ме нто в. До р о го и сло ж но . 3) Ф о р ми р о ва ни е П СП пр о гр а ммо й П К. 4) П р о гр а ммно -а ппа р а тный да тчи к П СП на р е ги стр а х сдви га .
3.4. Пр огр а м м ные да т чик и. О бща я м одель α i = ϕ (α i −l ,...,α i − p ), l < p
Исхо дные ве ли чи ны α 0 , α −1 , α −2 ,...,α −( p −1) ста р то выми ве ли чи на ми .
ф и кси р ую тся за р а не е
и
на зыва ю тся
Л и не йные р е кур р е нтные ф о р мулы 1. М ульти пли ка ти вный ко нгр уе нтный ме то д (ме то д выче то в) α i = (β ⋅ α i −1 ) mod M , i = 1,2,... β , M , α 0 – на тур а льные чи сла – па р а ме тр ыпр о гр а ммно го да тчи ка . α 0 , α 1 ,... ∈ {0,1,..., ( M − 1)} Э та П СП за ци кли ва е тся, на чи на я с не ко то р о го но ме р а i = T. Е ё пе р и о д, р а вный Т , не пр е во схо ди тМ -1. П усть М = 2q, q – ко ли че ство б и тце ло й ко нста нтыП К. Т о гда : Tmax = 2q-2 = M/4 до сти га е тся, е сли : 1) α 0 – не чётно е чи сло , пр и чём 1 ≤ α 0 ≤ M − 1 ; 2) β mod 8 = 3 mod 8 и ли β mod 8 = 5 mod 8. Э то усло ви е выпо лняе тся, на пр и ме р , пр и β = 52p+1, p = 0,1,2,… , и ли ко гда β = 2m + 3, m = 3,4,5,… 2. М е то д, и спо льзую щ и й ли не йные сме ша нные ф о р мулы, в ча стно сти , сме ша нный ко нгр уе нтный ме то д. α i = (β ⋅ α i −1 + C ) mod M , i = 1,2,... Для по луче ни я ма кси ма льно го пе р и о да сле дуе тб р а ть М = 2n и и спо льзо ва ть β = 2q + 1, q ≥ 2, C – не чётно е и α 0 – пр о и зво льно е . Х о ф ф ма н р е ко ме ндуе т выб и р а ть β и з усло ви я β mod 4 = 1. М е то ды, и спо льзую щ и е не ли не йные р е кур р е нтные ф о р мулы 3. М е то д се р е ди ныква др а та .
((
)
(
)
)
α i = (α i −1 ) mod 2 3k − (α i −1 ) mod 2 2 k / 2 k , i = 1,2,... 2
2
П а р а ме тр ы да тчи ка : k и α 0 . За ме ти м, что α 0 – чи сло , о б р а зо ва нно е ср е дни ми 2k
б и та ми 4k-р а зр ядно го дво и чно го чи сла (α i −1 ) . 2
4. М о ди ф и ка ци я ме то да – ме то д се р е ди ныпр о и зве де ни я.
(
)
α i = (α i −1 ⋅ α i − 2 ) mod 2 3 k − (α i −1 ⋅ α i − 2 ) / 2 k , i = 1,2,...
5. Ква др а ти чный ко нгр уе нтный ме то д (о б о б щ е ни е ли не йно го ).
(
)
α i = γ ⋅ (α i −1 ) + β ⋅ α i −1 + C mod M , i = 1,2,... 2
П а р а ме тр ыда тчи ка : α 0 , M , β , γ , C . Е сли М = 2q и q ≥ 2, то на и б о льши й пе р и о д Т max = M = 2q до сти га е тся, е сли β, С – не чётные , γ – чётно е , пр и чём β mod 4 = (γ + 1) mod 4 6. М е то д М а кло р е на -М а р са льи . М е то д о сно ва н на ко мб и на ци и двух пр о сте йши х да тчи ко в. П усть {bi} и {ci}, i = 0,1,2,… е сть П СП , по р о ж де нные двумя не за ви си мо р а б о та ю щ и ми да тчи ка ми D1 и D2 со о тве тсве нно . А V = {V(0), V(1), … , V(k-1)} – вспо мо га те льна я та б ли ца и з k це лых чи се л. Сна ча ла та б ли ца V за по лне на k чле на ми П СП {bi}, т.е . V(j) = bj , j = 0,1,2,… ,k-1. Ре зульти р ую щ а я П СП де йстви й:
по луча е тся в р е зульта те сле дую щ е й по сле до ва те льно сти
s := Int(cj⋅k) di := V(s)
i = 1,2,…
V(s) := bi+k Т .е . да тчи к D2 де ла е тслуча йный выб о р и з та б ли цы V, а та кж е случа йно за по лняе те ё чи сла ми , по р о ж дёнными да тчи ко м D1. М о ж но по лучи ть о че нь б о льшо й пе р и о д П СП , е сли пе р и о дыда тчи ко в D1 и D2 – вза и мно пр о стые чи сла .
3.5. Генер а ц ия диск р ет ных случа йных величин (событ ий) с п ом ощью да т чик а ПСП. П усть тр е б уе тся сге не р и р о ва ть ди скр е тные случа йные ве ли чи ны А 1, А 2, … , А по являю щ и е ся с ве р о ятно стями Р 1, Р 2, … , Р k со о тве тстве нно . •
Бе р ём ге не р а то р П СП , ге не р и р ую щ и й «случа йные »ве ли чи ныв ди а па зо не [0; 1].
•
Н а шка ле [0; 1] о ткла дыва е м ме тки Р 1, Р 1 + Р 2, Р 1 + Р 2 + Р 3, … А
А
1
Р1
2
А Р 1+Р 2
Ak
3
Р 1+Р 2+Р 3 … .. Р 1+… +Р k
о б ла сть о пр е де ле ни я со б ыти я А
3
1
k
,
•
О б р а щ а е мся к ге не р а то р у П СП . П усть по лучи ли ве ли чи ну α, по ка за нную на р и сунке . Н а пр и ме р , α по па ла в о б ла сть
P1 + P2 < α ≤ P1 + P2 + P3 пр и на дле ж а щ ую со б ыти ю А 3. Ре ша е м, что пр о и зо шло со б ыти е А 3.
3.6. Пр облем ы генер ир ова ния к р ип т огр а ф ическ и ст ойк ой п севдослуча йной п оследова т ельност и (ПСП) чисел. К ге не р а то р у та ко й П СП пр е дъявляю тся сле дую щ и е тр е б о ва ни я: 1) П е р и о д П СП до лж е н б ыть до ста то чно б о льши м. 2) П СП до лж на б ыть тр удно пр е дска зуе мо й по о тде льно му «куску». 3) Ге не р и р о ва ни е до лж но б ыть те хни че ски не о че нь сло ж ным. Изве стно до во льно мно го пр о стых а лго р и тмо в ге не р а ци и , о б е спе чи ва ю щ и х дли ну пе р и о да по р ядка 107… 109 не по вто р яю щ и хся де сяти чных чи се л с до во льно хо р о ши ми ста ти сти че ски ми сво йства ми . Н а пр и ме р , по Х о ф ф ма ну хо р о ш ли не йный ко нгр уе нтный ге не р а то р . псе вдо случа йно е чи сло qi вычи сляе тся и з пр е дыдущ е го qi-1 по ф о р муле : qi = (a⋅qi-1 + b) mod m ,
i-е
(1)
где m – ма кси ма льно е зна че ни е це ло го псе вдо случа йно го чи сла . П СП q и ме е тма кси ма льную дли ну не по вто р яю щ и хся р а вную m, е сли взять m = 2k, k – це ло е б о льше е 2 (k>2), b – не че тно е и а mod 4 = 1. Ра зр а б о та ныме то ди ки ко нгр уе нтных ге не р а то р о в, на пр и ме р , m – пр о сто е 231–1, b – вза и мно пр о сто е с m и а – не че тно е , а та кж е др уги е мо ди ф и ка ци и па р а ме тр о в в ф о р муле (1). А лго р и тм ко нгр уе нтно го ге не р а то р а ге не р а то р а на ци о на льно го б ю р о ста нда р то в СШ А и ме е т дли ну пе р и о да 264 и о б ла да е т ср а вни те льно хо р о ши ми ста ти сти че ски ми сво йства ми . В сяки й ге не р а то р П СП чи се л сле дуе т сна ча ла те сти р о ва ть на ста ти сти че ски е ка че ства (см. о пи са ни е ла б о р а то р но й р а б о ты http://www.main.vsu.ru/library/met/ на са йте ф и зи че ско го ф -та В ГУ ), а за те м и ссле до ва ть на кр и пто сто йко сть. Т е стыста ти сти че ски х сво йств П СП чи се л: 1) о пр е де ле ни е дли ныпе р и о да l и а пе р и о да L; 2) о пр е де ле ни е о дно ме р но й, двух-, 3-х и 4-ме р но й р а вно ме р но сти р а зб и е ни е м чи се л П СП на чи сла с со о тве тствую щ и м ко ли че ство м р а зр ядо в; 3) вычи сле ни е ко э ф ф и ци е нто в не р а вно ме р но сти ; 4) о пр е де ле ни е ко р р е ляци о нных сво йств П СП чи се л; 5) вычи сле ни е по и зве стно й ста ти сти че ско й за да че , на пр и ме р , зна че ни я чи сла π.
3.7. Ка к п олучит ь большую длину ПСП чисел Иде я Х о ф ф ма на по луче ни я «б е ско не чно й дли ны» П СП па р а ме тр о в «А »и «С»ге не р а то р а S i +1 = (a ⋅ S i + C ) mod m
чи се л —
пе р е на стр о йка
по сле ка ж до й ге не р а ци и N чле но в П СП (N<2m–1) с по мо щ ью , в сво ю о че р е дь, П СП по р о ж да ю щ и х чи се лS0. Бе р ём m = const, m = 2 k и ли 2k-1. k – це ло е , С – не че тно е , а = 1(mod 4). За да ём S0. Ге не р и р уе м пе р вые N чле но в
S0, S1, S2, … , SN, SN+1, SN+2, … , S2N, S2N+1, S2N+2, … , S3N, S3N+1, …
C=3
C=5
C=7
C=9
a=5
a=9
a = 13
a = 17
4. ПСПнулей и еди ни ц (гам м а). Счи та е тся, что «га р а нти р о ва нно » хо р о ши м для кр и пто гр а ф и и спо со б о м ге не р а ци и являе тся по стр о е ни е га ммыр е кур р е нтным со о тно ше ни е м C 0 ⋅ q i + C1 ⋅ qi −1 + ... + C m ⋅ q i − m = 0
(2)
Зде сь и ни ж е о б о зна че но : С и q – дво и чные чи сла {0, 1}, а си мво ло м «+»о б о зна че но сло ж е ни е по мо дулю два (ло ги че ска я о пе р а ци я XOR). М но ж е ство по ли но мо в (2) со ста вляе то дно и з по ле й Га луа , т.е . по ле , на д ко то р ым о пр е де ле но : сло ж е ни е – о пе р а ци я XOR, вычи та ни е – о пе р а ци я XOR, умно ж е ни е – о пе р а ци я AND. Ко э ф ф и ци е нтыС0 и Сm о б яза ныб ыть р а вны1. сле до ва те льно , о че р е дно е псе вдо случа йно е чи сло вычи сляе тся по ф -ле : q i = C i ⋅ q i −1 + ... + C m −1 ⋅ q i −( m −1) + qi − m
(3)
П о сле до ва те льно сть б и т, на пр и ме р , б а йти ли сло во (два б и та ) удо б но р а ссма тр и ва ть ка к мно го чле ны. Н а пр и ме р , б а йт пр е дста вляе тся по ли но мо м 7-й сте пе ни , ка ж дый чле н ко то р о го со о тве тствуе тне нуле во му б и ту в б а йте : (10010101) = 1 ⋅ q 7 + 0 ⋅ q 6 + 0 ⋅ q 5 + 1 ⋅ q 4 + 0 ⋅ q 3 + 1 ⋅ q 2 + 0 ⋅ q 1 + 1 ⋅ q 0 = q 7 + q 4 + q 2 + 1 = f (q ) П р и ме не ни е по ли но мо в упр о щ а е тр а ссмо тр е ни е о пе р а ци й с П СП б и т. П о ли но м f(q) на зыва ю тн еп р иво дим ы м , е сли : f(0) = 1 и f(1) = 1
(4)
Др уги ми сло ва ми , по ли но м m-о й сте пе ни не пр и во ди м, е сли о н не р а скла дыва е тся на мно ж и те ли (по ли но мы) сте пе ни ни ж е m. П СП б и т, вычи сляе ма я по ф о р муле (3), б уде т и ме ть ма кси ма льную дли ну пе р и о да , р а вную 2m–1, е сли по ли но м (2) не пр и во ди м. П р им ер ы н еп р иво дим ы х п о лин о м о в и со о тве тстве нно р е кур р е нтных со о тно ше ни й (3). 3-го по р ядка :
1 + q + q3 = 0 2
3
1+q +q =0 4-го по р ядка :
qi = qi-1 + qi-3 qi = qi-2 + qi-3
1 + q + q4 = 0 1 + q + q2 + q3 + q4 = 0
5-го по р ядка :
1 + q2 + q3 + q4 + q5 = 0
11-го по р ядка :
1 + q9 + q11 = 0
qi = qi-9 + qi-11
За ме ти м, что все не пр и во ди мые по ли но мыи ме ю тне че тно е ко ли че ство чле но в.
4.1. Реа лиз а ц ия генер а т ор а га м м ы на р егист р а х сдвига О б щ а я и де я: Л о ги че ски й пр е о б р а зо ва те ль C1
Cm-1
Сm=1 m
2
C0 = 1
Ci = {0, 1}
1
Ри с. 1
э ле ме нт(зве но ) за де р ж ки и нф о р ма ци и в р е ги стр е сдви га на о ди н та кт(та кто вый ге не р а то р не по ка за н)
q
C выхо д = q⋅C – э ле ме нтумно ж е ни я
Л и не йный ге не р а то р по луча е тся, е сли в ка че стве ло ги че ско го пр е о б р а зо ва те ля (Л П ) взять це по чку э ле ме нто в сло ж е ни я по мо дулю два . +
+
+
qi Xi
Yi
+
ко д и схо дно го те кста
ши ф р о гр а мма
Н а пр и ме р , для по ли но ма 3-го по р ядка qi = qi-1 + qi-3 +
3
2
1
qi
Ри с. 3
Бо ле е кр и пто сто йка не ли не йна я схе ма с до по лни те льным Л П .
+
Ри с. 4 Л о ги че ски й пр е о б р а зо ва те ль
+
Y
X Ко мб и ни р о ва нные ге не р а то р ыП СП б и тна р е ги стр а х сдви га с о б р а тно й связью . 1) Схе ма Дж е ф ф а AND Ре г. сдви га с ли н. о б р . связью
1
Х
2
+
XOR 3
Х
Ри с. 5
AND 2) Схе ма Бр ю са Ре г. сдви га с ли н. о б р . связью
1 Σ
по р о г Ри с. 6
N
а р и ф ме ти че ски й сумма то р Ге не р а то р П СП б и тс внутр е нне й не ли не йно й ло ги ко й f
n
П СП
n–1
Ге не р а то р П СП б и тс вне шне й не ли не йно й ло ги ко й
Ри с. 7
1, Σ≥по р о г 0, Σ<по р о г
f
П СП Ри с. 8
ли н. о б р . связь на XOR П СП ма кси ма льно й дли ныдля р е ги стр о в сдви га с m зве ньями дли на р е ги стр а m
но ме р а о тво до в для о дно го ло ги че ско го э ле ме нта XOR
дли на П СП
3
3,2
7
4
4,3
15
5
5,3
31
6
6,5
63
7
7,6
127
9
9,5
511
10
10,7
1023
11
11,9
2047
20
20,17
1 048 575
24
23,22,17
16 771 215
39
39,35
2m –1
549 755 813 887
П р и m = 100 ма кси ма льна я дли на га мм р а вна 2100 – 1. Для пе р е да чи е ё со ско р о стью 1 М б а йт/с пе р и о д по вто р и тся ли шь че р е з ~ 1016 ле т. О дна ко е сли 2m б и ти схо дно го те кста и зве стныха ке р у, то 2m б и тга ммывычи сляю тся пр о сто , и мо ж но о пр е де ли ть р а спо ло ж е ни е о тво до в Сi р е ги стр а и е го на ча льно е со сто яни е , е сли и зве стно m. [Ди ф ф и У ., Х е ллма н М . За щ и щ ённо сть и и ми то сто йко сть. кр и пто гр а ф и ю //Т ИН Э Р – 1979, т. 67, № 3, стр . 71-104]
В ве де ни е
в
Ра спр е де ле ни е о тво до в мо ж но о пр е де ли ть, та к ка к: S i +1 = ( A ⋅ S i ) mod 2 ,
(6)
где Si – ве кто р -сто лб е ц и з m си мво ло в со сто яни я р е ги стр а в i-й мо ме нт; А – ма тр и ца m*m по ло ж е ни й о тво до в, 1-а я стр о ка – по сле до ва те льно сть о тво до в, не по ср е дстве нно по д гла вно й ди а го на лью р а спо ла га ю тся е ди ни цы, а в о ста льных по зи ци ях нули . Н а пр и ме р , для тр е хр а зр ядно го р е ги стр а (Ри с. 3)
C1 A= 1 0
C2 0 1
1 0 1 C3 0 = 1 0 0 0 1 0 0
Зна я 2m б и тга ммы, мо ж но за m3 и те р а ци й о б р а ти ть ф о р мулу (6) и на йти о тво ды.
4.2. Т ест ир ова ние га м м ы Т е сти р о ва ни е га ммыпр о во ди тся по сле дую щ и м кр и те р и ям случа йно сти : 1) Сво йство ур а вно ве ше нно сти . В ка ж до м пе р и о де П СП о тли ча е тся о тко ли че ства нуле й не б о ле е , че м на е ди ни цу.
ко ли че ство
е ди ни ц
2) Сво йство се р и й (по сле до ва те льно сте й о ди на ко вых б и т). П усть в пе р и о де П СП и ме е тся М се р и й. Т о гда ко ли че ство се р и й, и ме ю щ и х дли ну 1, р а вно то чно М /2, ко ли че ство се р и й дли но й 2 р а вно М /4, дли но й 3 – М /8 и т.д. О б о зна чи в дли ну се р и и L, а ко ли че ство се р и й э то й дли ны К(L), по лучи м о б щ ую ф о р мулу: K ( L) = M / 2 L
(7)
П р и ме р . П СП = {1001110}. Зде сь М = 4, К(1) = 2, К(2) = 1, К(3) = 1. о дна ко по сле дне е К(3) = 1 не и ме е тсмысла для ф о р мулы (7), т.к. дли на пе р и о да П СП в пр и ме р е р = 7 сли шко м ма ла для и спо льзо ва ни я по ф о р муле (7) вычи сле ни я К(3). Сле дуе т по дста влять L
СД2 XOR СД0 = 0011101
1101001 СД3 XOR СД2 = 0111010 СД3 XOR СД1 = 1001110 СД3 XOR СД0 = 0100111 и ме е м: ко ли че ство со впа де ни й р а вно ко ли че ству нуле й ф ункци и XOR – в на ше м пр и ме р е 3; ко ли че ство не со впа де ни й р а вно ко ли че ству е ди ни ц ф ункци и XOR – в на ше м пр и ме р е 4.
5. Класси ческая кр и п то гр аф и я
X
f ( x, z ) ши ф р о ва ни е Z Исто чни к клю ча
Y
f −1 ( f ( x, z )) р а сши ф р о ва ни е
П р и ёмни к со о б щ е ни я
X
де ко д.
Исто чни к и схо дно го те кста
ко д.
5.1. Кр ип т огр а ф ическ а я сист ем а с одним к лючом (общим для шиф р ова ния и р а сшиф р ова ния)
Z Се кр е тна я пе р е да ча клю ча
X — чи сло во е пр е дста вле ни е (ко д) и схо дно го те кста Y — ши ф р о гр а мма
Ри с. 1
5.2. Ш иф р ова ние з а м еной (п одст а новк а м и) М оно(одно)а лфа витна я за ме на — са мый пр о сто й спо со б пр ямо й за ме ны. Со ста вляе тся та б ли ца пр ямо й за ме ны б укв ши ф р уе мо го те кста др уги ми б уква ми да нно го а лф а ви та .
Т аб ли ца з ам ены Зна ки в та б ли це ши ф р о ва ни я не до лж ны по вто р яться, т.е . та б ли ца за ме ны до лж на пр е дста влять по лную пе р е ста но вку а лф а ви та (ко гда все б уквыпо две р гли сь пе р е ста но вке ). П о сле за ме ны ши ф р о те кст для удо б ства р а б о ты с ни м р а зб и ва е тся на р а вно ве ли ки е гр уппы. В ши ф р е Ц е за р я та б ли ца за ме ные сть а лф а ви тсдви нутый в ко льцо на 3 по зи ци и . О дно а лф а ви тный ши ф р и ме е т ни зкую сто йко сть. Ср а вни те льно ле гко взла мыва е тся, т.к. и ме е т те ж е ста ти сти че ски е ха р а кте р и сти ки ча сто сти б укв в ши ф р о гр а мме , что и в и схо дно м (о ткр ыто м) те ксте . П р и до ста то чно й дли не ши ф р о те кста о н р а скр ыва е тся ста ти сти че ски м кр и пто а на ли зо м.
Мно го таб ли чная з ам ена. Б укв енная клю чев ая п о следо в ательно сть. М но го а лф а ви тный ши ф р б о ле е сто йки й. Н а пр и ме р , та б ли ца В и ж и не р а . Э то ква др а тна я ма тр и ца N*N, где N — ко ли че ство си мво ло в а лф а ви та . П е р ва я стр о ка ма тр и цы — и схо дный а лф а ви т. Сле дую щ и е — ко льце во й сдви г а лф а ви та на о дну б укву. Для ши ф р о ва ни я за да ётся сло во и з K б укв (б укве нный клю ч). Из та б ли цы В и ж и не р а выпи сыва е тся р а б о ча я по дта б ли ца (K+1)*N. П е р ва я стр о ка — и схо дный а лф а ви т. Сле дую щ и е стр о ки — а лф а ви ты, на чи на ю щ и е ся с о че р е дных б укв клю ча . П р о це дур а ши ф р о ва ни я:
•
по д ка ж до й б укво й ши ф р уе мо го те кста за пи сыва ю тся б уквы клю ча , по вто р яя е го не о б хо ди мо е чи сло р а з;
•
За ме на б укв пр о и зво ди тся по по дма тр и це и за те м ши ф р о те кст р а зб и ва е тся на гр уппы, на пр и ме р по 5 зна ко в.
Ра сши ф р о ва ни е ши ф р о те кста пр о и схо ди т в о б р а тно й по сле до ва те льно сти . Клю ч сле дуе тпе р и о ди че ски и ли для ка ж до го ф а йла ме нять. За ме ни в б уквы чи сла ми , по лучи м ци ф р о вую ши ф р о гр а мму. Ста ти сти че ски е ха р а кте р и сти ки б укв ши ф р о те кста уж е и ные , че м у и схо дно го те кста , т.к. в р а зных ме ста х те кста да нна я б уква б уде тши ф р о ва ться р а зными б уква ми . Пр обле мы ключа . П р и ко р о тко м клю че ши ф р о ва ни е не на дёж но (зло умышле нни ку для р а скр ыти я по кр а йне й ме р е на до пе р е хва ти ть ко ли че ство зна ко в в ши ф р о вке р а вно е 20 дли на м клю ча ). Дли нный ж е клю ч за по мни ть тр удно (е сли о н е щ ё и не и ме е тли нгво смысла ), а за пи сь е го на б ума ге мо ж е тб ыть по хи щ е на . Клю ч мо ж е твво ди ться по льзо ва те ле м с те р ми на ла и ли хр а ни ться в ЗУ в за ши ф р о ва нно м ви де . О дно а лф а ви тные и мно го а лф а ви тные по дста но вки мо ж но пр е дста ви ть о б щ е й ф о р муло й, р а ссма тр и ва я е ё ка к за да чу со вр е ме нно й а лге б р ы, т.к. ме ж ду N зна ка ми а лф а ви та и на б о р о м по ло ж и те льных це лых чи се л 0, 1, 2, … , ( N − 1) уста на вли ва е тся пр о и зво льно е о дно зна чно е со о тве тстви е , то пр и сло ж е ни и и вычи та ни и по мо дулю N э ти по ло ж и те льные чи сла ф о р ми р ую т а лге б р а и че ско е ко льцо и о дно зна чно е о б р а тно е пр е о б р а зо ва ни е . ши ф р о ва ни е :
y i = ( xi + z i ) mod N
р а сши ф р о ва ни е :
xi = ( y i − z i ) mod N
(1)
Е сли z i = const , то и ме е м о дно а лф а ви тную по дста но вку. Для не ё о б щ ую ф о р мулу мо ж но р а сши р и ть: y i = (a ⋅ x i + z ) mod N , пр и z i = const где :
yi
—
(2)
чи сло во й
xi — чи сло во й N — a — z — ко э ф ф и ци е нтсдви га
ко д
б укв
ко д
б укв р а зме р де сяти чный
ши ф р а
и схо дно го
те кста а лф а ви та ко э ф ф и ци е нт
П р и a = 1 , z = 3(4) , N = 27 по луча е м ко д Ц е за р я с а лф а ви то м, на пр и ме р : 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
в(пробел)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 0 1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
О тме ти м, что две о дно а лф а ви тные за ме ны по др яд не уве ли чи ва ю т сто йко сти ши ф р а , т.к. э кви ва ле нтныо дно й (сумма р но й) за ме не . Н а пр и ме р е сли пе р ва я за ме на б ыла с z = 3 (ф о р мула 2), а вто р а я с z = 5 , то по лучи м р е зульти р ую щ ую о дну за ме ну с z = 8 .
Ч и сло в ая клю чев ая п о следо в ательно сть Е сли z выб и р а е тся и з по сле до ва те льно сти z1 , z 2 , Κ , z n , то мно го а лф а ви тную по дста но вку с пе р и о до м клю ча z = {z1 , z 2 , Κ , z K } р а вным K .
и ме е м
Е сли в мно го а лф а ви тно й по дста но вке : 1. Ч и сло зна ко в в клю че б о льше (и ли р а вно ) чи слу ши ф р уе мых (и схо дных) зна ко в те кста и зна ки в клю че р а спр е де ле ныслуча йно 2. Клю ч и спо льзуе тся то лько о ди н р а з 3. Исхо дный те кст(и ли е го ча сть) не и зве сте н зло умышле нни ку (кр и пто а на ли ти ку), то за ши ф р о ва нный те кстб уде тне р а скр ыва е м и на зыва е тся систе мой (сх е мой) Ве р на ма . Име нно для э ти х усло ви й Ш е нно н Э . и до ка за л не р а скр ыва е мо сть ши ф р а . Е сли кр и пто а на ли ти ку и зве сте н (и ли пр е дпо ла га е тся и зве стным) о тр е зо к и схо дно го те кста за ве до мо в не ско лько р а з дли нне е клю ча , то клю ч б уде т р а скр ыт вычи та ни е м и з ши ф р о гр а ммыи зве стно го о тр е зка те кста
z = ( y − x) mod N пе р е б о р о м зна ко ме ста ши ф р о гр а ммы для на ча ла се р и и вычи та ни й. П о явле ни е пе р и о ди че ско й стр уктур ыр е зульта та и е сть пр и зна к вскр ыти я клю ча . Сэ то й по зи ци и р а ссмо тр и м и зве стно е усо ве р ше нство ва ни е та б ли цы В и ж и не р а . В о все х стр о ка х, кр о ме пе р во й б уквы а лф а ви та р а спо ла га ю тся в пр о и зво льно м по р ядке (а не сдви га ю тся), т.е . и спо льзуе тся мно ж е ство пе р е ста но во к б укв а лф а ви та . Ч и сло то го мно ж е ства не та к мно го пе р е ста но во к P( N ) = N ! , P(27) = 1.088 ⋅ 10 28 . О дна ко , и з э по дхо дящ и х, нуж ны то лько «по лные » пе р е ста но вки , т.е . та ки е ко то р ые за тр о нули все б уквы а лф а ви та . В о ти з э то го мно ж е ства и выб и р а е м 10 (не счи та я пе р во й) пе р е ста но во к. Н уме р уе м и х на тур а льными чи сла ми 0, 1, … , 9. В ка че стве клю ча б е р ём случа йный (пр а кти че ски псе вдо случа йный) р яд чи се л б е ско не чно й дли ны и ли дли ны не ме ньше й, че м ко ли че ство б укв и схо дно м те ксте . Н а пр и ме р : π = 3.14159265 3589793238 46... , e = 2.71828182 8459045235 36... П р и дли не клю ча р а вно й дли не те кста ста ти сти че ска я за ко но ме р но сть б укв и схо дно го а лф а ви та , по -ви ди мо му, по лно стью ма ски р уе тся. О дна ко э то всё та ки все го 10-а лф а ви тный клю ч, пр а вда а лф а ви ты че р е дую тся на всём пр о тяж е ни и те кста в «случа йно м» по р ядке , а не по вто р яю тся гр уппа ми по сло ву те ксто во го клю ча . Сто йко сть ши ф р а не ско лько уси ли ва е тся. Ф о р мула (1) да сте щ ё лучшую сто йко сть, е сли в не й в ка че стве по сле до ва те льно сти клю ча взять «случа йные » (на пр и ме р , по та б ли це случа йных чи се л 2-хр а зр ядных де сяти чных) и з мно ж е ства 0, 1, 2, … , ( N − 1) . В э то м случа е по лучи м 27-а лф а ви тную по дста но вку со «случа йным»че р е до ва ни е м а лф а ви то в на всём пр о тяж е ни и и схо дно го те кста .
5.3. Ш иф р ова ние с исп ольз ова нием а лгебр ы м а т р иц (ча ст ный случа й п ер ест а новок ). Счи та е тся, что э ти м ме то до м мо ж но по лучи ть на дёж но е за кр ыти е и нф о р ма ци и . Н а пр и ме р , пр и ме ни м пр а ви ло умно ж е ни я ма тр и цына ве кто р . a11 a 21 a31
a12 a 22 a32
a13 b1 a11 ⋅ b1 + a12 ⋅ b2 + a13 ⋅ b3 c1 a 23 ⋅ b2 = a 21 ⋅ b1 + a 22 ⋅ b2 + a 23 ⋅ b3 ≡ c 2 a 33 b3 a31 ⋅ b1 + a32 ⋅ b2 + a33 ⋅ b3 c3
Зде сь ма тр и цу [ a ij ] б уде м б р а ть за о сно ву (клю ч) ши ф р о ва ни я. М а тр и цу [bi ] — ка к си мво лы и схо дно го те кста . М а тр и цу сто лб е ц [ci ] — те кста .
ка к си мво лы ши ф р о ва нно го
П р и ме р . П р е дста вляе м клю ч ма тр и цы, на пр и ме р , 3-го по р ядка 14 8 3 8 5 2 3 2 1 Зна ки а лф а ви та ко ди р уе м чи сла ми по по р ядку. 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
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Т е кст“Data management system” за ши ф р уе м ка к: 14 8 3 3 D 14 ⋅ 3 + 8 ⋅ 0 + 3 ⋅19 99 8 5 2 ⋅ 0 A = 8 ⋅ 3 + 5 ⋅ 0 + 2 ⋅19 = 62 3 2 1 19 T 3 ⋅ 3 + 2 ⋅ 0 + 1 ⋅19 28 14 8 3 0 A 96 8 5 2 ⋅ 12 M = 60 и т.д. 3 2 1 0 A 24 П о лучи м ши ф р о ва нный те кст: 99, 62, 28, 96, 60, 24, и т.д. Де ши ф р о ва ни е пр о и зво ди тся по то му ж е пр а ви лу умно ж е ни я, но в ка че стве клю ча б е р ём о б р а тную ма тр и цу [aij ]−1 и умно ж а е м е ё на ве кто р сто лб е ц и з со о тве тствую щ е го ко ли че ства чи се л ши ф р о гр а ммы. Ч и сла ве кто р а р е зульта та да дут э кви ва ле нты зна ко в и схо дно го те кста . [aij ] −1 =
[ Pij ] D
, Pij = (−1) i + j ⋅ Dij , где [ Pij ] — на зыва е тся пр и со е ди нённа я ма тр и ца
Dij — о пр е де ли те ль ма тр и цы пр и со е ди нённо й по луча е м и з о пр е де ли те ля D вычёр ки ва ни е м i-стр о ки и j-сто лб ца
D — о пр е де ли те ль ма тр и цы-клю ча . D - n-го по р ядка е сть а лге б р а и че ска я сумма n! чле но в и з все во змо ж ных пр о и зве де ни й n - э ле ме нто в ма тр и цы, взятых по о дно му в ка ж до й стр о ке и в ка ж до м сто лб це , со зна ко м (+), е сли е го и нде ксы со ста вляю тчётную по дста но вку, и со зна ко м (-) в пр о ти во по ло ж но м случа е . Для тр е тье го по р ядка : D = a11 a22 a33 + a12 a23 a31 + a13 a21 a32 − a11 a22 a32 − a12 a21 a33 − a13 a 22 a31 П о луча е м о б р а тную ма тр и цу:
1 −2 1 − 2 5 − 4 1 − 4 6 Т е пе р ь р а сши ф р о ва ни е : 1 − 2 1 99 1 * 99 − 2 * 62 + 1 * 28 3 D − 2 5 − 4 ⋅ 62 = − 2 * 99 + 5 * 62 − 4 * 28 = 0 A 1 − 4 6 28 1 * 99 − 4 * 62 + 6 * 28 19 T 1 − 2 1 96 0 A − 2 5 − 4 ⋅ 60 = 12 M и т.д. 1 − 4 6 24 0 A Т .к. пр о це дур ы ши ф р о ва ни я и де ши ф р о ва ни я стр о го ф о р ма ли зо ва ны, то о ни ср а вни те льно ле гко пр о гр а мми р ую тся. Н е до ста то к — мно го а р и ф ме ти че ски х де йстви й для ма тр и цывыше 3-го по р ядка . До сто и нство — ф а кти че ски дли на клю ча (зде сь 9 чи се л) дли нне е гр упп (зде сь 3 чи сла ) ци кли че ско го ши ф р о ва ни я/де ши ф р о ва ни я си мво ло в те кста , что , по -ви ди мо му, и уве ли чи ва е тсто йко сть ши ф р а .
5.4. Блочна я п одст а новк а (з а м ена ) — блочный шиф р . В о зьмём и схо дный («че ло ве че ски й») те кст и нф о р ма ци и , пр е дста вле нный языко м, со де р ж а щ и м k си мво ло в. За ко ди р уе м ка ж дый си мво л языка ка ки м-ли б о и схо дным ко до м ( m б и т/си мво л), на пр и ме р но р ми р о ва нным по дли не ко до м М о р зе (то чка –0, ти р е –1) и ли ста нда р тным те ле гр а ф ным ко до м, и ли б а йта ми ко да ASCII, и т.п. П р и пр о сте йше м ко ди р о ва ни и то лько 32 б укв р усско го а лф а ви та 5-ю б и та ми по лучи м уж е и зве стные ви ды б укве нных за ме н. Н о те пе р ь р а ссма тр и ва е м всё со о б щ е ни е ка к сп лошной п оток б и т. Ра зб и ва е м е го на б ло ки и з n р а зр ядо в: n > m За ме ну (ши ф р о ва ни е ) пр о и зво ди м по б ло чно , р а ссма тр и ва я ка ж дый б ло к ка к е ди но е це ло е , за ме няю щ и й е го б ло к ши ф р о гр а ммы до лж е н со де р ж а ть не ме ньше е ко ли че ство б и т. Ч и сло р а зли чных n - р а зр ядных б ло ко в р а вно 2 n . В се та ки е р а зли чные по дста но вки мо ж но р а ссма тр и ва ть ка к о то б р а ж е ни е внутр и э то го мно ж е ства б ло ко в. Е сли о то б р а ж е ни е для 2 n р а зли чных б ло ко в о б р а ти мо , то го во р ят, что о но не си нгуляр но , т.е . сущ е ствуе т вза и мно о дно зна чно е со о тве тстви е ме ж ду ка ж дым б ло ко м и схо дно го те кста и не ко то р ым б ло ко м э то го ж е мно ж е ства , р а ссма тр и ва е мо го ка к ши ф р о те кст(Т а б ли ца 1). Т а блица 1
Х
Y
D
X 1 X0
Y1 Y0
0
0
0
2
1
0
1
0
1
3
1
1
2
1
0
1
0
1
3
1
1
0
0
0
2 р а зр яда (вхо д) 2-х р а зр ядный «де ши ф р а то р » 0 1 2 3
0 1 2 3 2-х р а зр ядный «ши ф р а то р » 2 р а зр яда (выхо д) Ри с 3. Р ис. 1
Н а Ри с. 1 по ка за н пр и ме р устр о йства о б р а ти мо го (не си нгуляр но го ) пр е о б р а зо ва ни я. Зде сь «ши ф р а то р » и «де ши ф р а то р » — э то те р ми ны схе мо те хни ки , а не кр и пто гр а ф и и . П р е о б р а зо ва ни е n вхо дных р а зр ядо в в n выхо дных пр е дста вляе т со б о й по дсо е ди не ни е (пе р е ста но вку) 2n выхо до в n «де ши ф р а то р а »в 2 вхо до в «ши ф р а то р а ». Н а р и с. 4 по ка за на р е а ли за ци я та б ли цы 1 на ми кр о схе ме КП 12.Ко ли че ство та ки х о б р а ти мых (не си нгуляр ных) пр е о б р а зо ва ни й (пе р е ста но во к) n р а вно (2 )! .Л ю б о е из э ти х пр е о б р а зо ва ни й р е а ли зуе тся со о тве тствую щ и ми со е ди не ни ями . Э ти со е ди не ни я на зыва ю т клю чо м ши ф р а , а пр е о б р а зо ва ни я n р а зр ядо в в n р а зр ядо в на зыва ю тS-
пр е о б р а зо ва ни ями . +
D0 D1
в х о д
D0 D1 D2 D3 ED D0 D1 D2 D3 ED X1
Y1
Y1
D2
в ы х о д
D3
D0
Y0 D1 Y0 D2 D3
X0
Ри с.4 Ре а ли за ци я р и с.3 с по мо щ ью М С ххКП 12 (2-х р а зр ядный се ле кто р мульти пле ксо р ). Для 4-х р а зр ядно го вхо да на до взять две М С и т.д.
X1 X0 Ри с.5 Схе ма ф ункци о ни р о ва ни я М С КП 12
5.5. Свойст ва S-п р еобр а з ова ний. Име е тся мно ж е ство n-р а зр ядных дво и чных сло в. S-пр е о б р а зо ва ни е е сть о то б р а ж е ни е э то го мно ж е ства на са мо е се б я. О то б р а ж е ни е (S-пр е о б р а зо ва ни е ) мо ж но за да ва ть ли б о пр а ви ла ми , ли б о та б ли чно . Н а пр и ме р , для 2-х р а зр ядных сло в: О б р а ти мо е о то б р а ж е ни е
Н е о б р а ти мо е о то б р а ж е ни е
Сло ва и схо дно го те кста
Сло ва ши ф р о те кста
Сло ва и схо дно го те кста
Сло ва ши ф р о те кста
A
S(A)
A
S(A)
00
11
00
11
01
10
01
10
10
00
10
01
си нгуляр ный
11
01
11
01
б ло к
В се го во мно ж е стве и ме е тся 2 n n -р а зр ядных сло в, а р а зли чных о то б р а ж е ни й в n э то м мно ж е стве (2 n ) ( 2 ) . О дна ко , все о то б р а ж е ни я, со де р ж а щ и е си нгуляр ные мно ж е ства , не ж е ла те льны, т.к. пр и во дят к не о дно зна чно сти де ши ф р о ва ни я ши ф р о те кста . П о э то му пр и ме няю т то лько о б р а ти мые (не си нгуляр ные ) S-пр е о б р а зо ва ни я. Ко ли че ство та ки х S-пр е о б р а зо ва ни й р а вно (2 n )! . Ф а кти че ски — э то пе р е ста но вки сло в в та б ли це о б р а ти мо го S-пр е о б р а зо ва ни я, ко то р о е на зыва ю та ф ф и нным пр е о б р а зо ва ни е м. А ф ф и нным на зыва ю т пр е о б р а зо ва ни е S, о б ла да ю щ е е сво йство м: е сли A и B два дво и чных ве кто р а , о ди на ко во й р а зме р но сти ; е сли S е сть пр е о б р а зо ва ни е пр о стр а нства э ти х ве кто р о в в се б я, и е сли Z, вычи сляе мо е ка к: Z = S ( A ⊕ B) ⊕ S ( A) ⊕ S ( B) о ка зыва е тся по сто янным для все х A и все х B, то S являе тся а ф ф и нным пр е о б р а зо ва ни е м. П р о ве р и м пр е о б р а зо ва ни я.
а ф ф и нно сть
для
пр и ве дённо й
выше
A=00
A=00
A=01 …
B=00
B=01
B=11 …
A⊕ B
00
01
10 …
S ( A ⊕ B)
S(00)=11
S(01)=10
S(10)=00
по
S(A)=11
S(А )=11
S(A)=10
та б ли це
S(B)=11
S(B)=10
S(B)=01
Z=11
Z=11
и т.д
та б ли цы
о б р а ти мо го
и т.д. для все х па р
Z=11 и т.д. Z=const
5.6. М ет од п ер ест а новок (шиф р ова ние п ер ест а новк а м и) Исхо дный те кстр а зб и ва е тся на клю че вые гр уппы с р а вными ко ли че ства ми б укв в гр уппа х. В ка ж до й гр уппе по за да нно му пр а ви лу пр о и зво ди тся пе р е ста но вка б укв.
Т аб ли чны й в ар и ант За пи сыва е м и схо дный те кстпо стр о ка м в ма тр и цу и з N сто лб цо в. За те м ши ф р уе м те кст пе р е ста вляя сто лб цы ма тр и цы в за да нно м по р ядке пе р е ста но во к. Э то т по р ядо к пе р е ста но во к е сть клю ч (и о пе р а ци я) пе р е ста но во к. За да нный по р ядо к пе р е ста но во к мо ж но выр а зи ть о смысле нным сло во м (клю чо м) с не по вто р яю щ и ми ся б уква ми и
пр о и зво ди ть ши ф р о ва ни е , т.е . пе р е ста но вку ко ло но к та б ли цыв то й по сле до ва те льно сти , в ко то р о й р а спо ла га ю тся в а лф а ви те б уквыклю че во го сло ва . П р и ме р . За ши ф р уе м те кст«Ш ИФ РУ Й Т Е П Е РЕ СТ А Н О В КА М И»с по мо щ ью ма тр и цы и з 6 ко ло но к и клю че во го сло ва «ДЕ ЗА В И». Клю ч
Д
Е
З
А
В
И
5
6
8
1
3
9
— по р ядо к б укв клю ча в а лф а ви те
И Ф
Р
У
Й
Т
Е
Ё
П
Е
Р
Е
С Т
А
Н
О
П р о б е лыме ж ду сло ва ми и схо дно го те кста и ко не ц те кста за по лняе м для по лно тыма тр и цы пр о и зво льными б уква ми .
В
К А
М
И Ь
Т е кст Ш
П о луча е м, чи та я по сто лб ца м в по р ядке пе р е ста но во к сле дую щ ую ши ф р о вку: РП А М У Е Н ИШ Т Е В ИЕ СКФ Ё Т А Й РО Ь и ли гр уппа ми по 6 б укв: РП А М У Е
Н ИШ Т Е В
ИЕ СКФ Ё
Т А Й РО Ь
Расши ф р о в ка — О пр е де ляе м чи сло ко ло но к, де ля ко ли че ство зна ко в в ши ф р о гр а мме на чи сло б укв в клю че 30 / 6 = 5 . — В ыпи сыва е м клю че во е сло во с о б о зна че ни е м по сле до ва те льно сти б укв клю ча в а лф а ви те и по д ни ми в колонки с ука за нно й по сле до ва те льно стью выпи сыва е м те кст ши ф р о вки . О ткр ытый те кстчи та е м по стр о ка м.
Усло жнени е таб ли чно го в ар и анта. Ш и ф р уе мый те кст впи сыва е м в та б ли цу выб р а нно й р а зме р но сти по не ко то р о му ма р шр уту, на пр и ме р по спи р а ли . За те м ко ло нки выпи сыва е м ли б о по др яд, ли б о пе р е ста вляя по клю чу. Ра сши ф р о выва е м в о б р а тно й по сле до ва те льно сти .
Пер естано в ка п о м ар ш р утам Г ам и льто на. Т а ка я ср а вни те льно пр о ста я пе р е ста но вка являе тся по о це нка м а ме р и ка нски х спе ци а ли сто в до ста то чно сто йки м ши ф р о м. Исхо дный те кст р а зб и ва е тся на гр уппы по 8 б укв. 1-а я о пе р а ци я — впи сыва ни е и схо дно го те кста в ша б ло н с 8-ю зна ко ме ста ми с ука за нным на ни х по р ядко м впи сыва ни я. Н а пр и ме р те кст «Ш ИФ РУ Й Т Е П Е РЕ СТ А Н О В КА М И» впи сыва е м б е з пр о б е ло в, а ко не ц те кстдо по лни м до по лно тыша б ло на б уква ми «А ».
Р исун о к 5.1
2-а я о пе р а ци я — по сле до ва те льно е по вто р е ни е 5-ти р а зных ма р шр уто в Га ми льто на . Н а р и сунка х на м хва ти ло 3-х ма р шр уто в. В ыпи сыва е м по э ти м ма р шр ута м ши ф р о гр а мму: У Й ИШ Ф РЕ Т
СП РЕ Е Т Н А
1-я пе р е ста но вка
М А КО В ИА А
2-я пе р е ста но вка
3-я пе р е ста но вка
Для пе р е ста но вки б укв в гр уппа х по 8 ко ли че ство р а зных пе р е ста но во к (ма р шр уто в) M = P (8) = 8!= 40320 . Ко ли че ство во змо ж ных пе р е ста но во к б ыстр о уве ли чи ва е тся с р о сто м дли ныгр уппыпе р е ста но во к. Е сли зло умышле нни к уга да е т дли ну гр уппы, то о н мо ж е т пе р е б р а ть по сле до ва те льно все во змо ж ные пе р е ста но вки по ка не на йдёт о смысле нную . Для ма ло й дли ны гр уппы э то ле гко о со б е нно с по мо щ ью Э В М . П о смо тр и м ка к усло ж няе тся э то т пр и ме р с р о сто м дли ныгр уппы. Дли на Ко ли че ство В р е мя пр о смо тр а и х на Э В М со гр уппы пе р е ста но во к ско р о стью 1 пе р е ста но вка /се к. 8
40320
11.2 ча са
10
3628800
42 суто к
12
≈ 479 ⋅ 10 6
5544 суто к ≈ 15 ле т
Ко ли че ство M пе р е ста но во к для гр уппыи з N б укв р а вно : M = P( N ) = N ! П е р е ста но вки удо б но за да ва ть чи сло выми клю ча ми (га мма ми ) Т а к пе р е ста но вки Га ми льто на б удути ме ть ви д: 0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
исх. текст
Ш
И
Ф
Р
У
Й
Т
Е
П
Е
Р
Е
С
Т
А
Н
О
В
К
А
М
И
А
А
ключи шифрования
3
2
4
5
0
1
7
6
1
4
2
3
0
5
7
6
3
4
2
7
0
5
1
6
У
Й
И
Ш
Ф
Р
Е
Т
С
П
Р
Е
Е
Т
Н
А
М
А
К
О
В
И
А
А
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
шифротекст
Ра сши ф р о ва ни е пр о и зво ди тся в о б р а тно м по р ядке (дви га ться в на пр а вле ни и о б р а тно м стр е лке пе р е ста но вки ), т.е . клю чи пе р е ста но вки для р а сши ф р о ва ни я б удут: П е р е пи ше м клю чи ши ф р о ва ни я в ви де
Ключ шифрования:
03
12
24
35
40
51
67
76
03 — 0-е место исх.
Ключ расшифр.:
30
21
42
53
04
15
76
67
текста переставляется на 3-е место шифрограммы
Ключ шифрования:
04
15
23
30
42
53
67
76
- ключ шифрования, упорядоченный по 1-му знаку
Ключ расшифр.:
4
5
3
0
2
3
7
6
и ли та к: 3
2
4
5
0
1
7
6
0
1
2
3
4
5
6
7
— ма р шр утши ф р о ва ни я
Н о ме р а по по р ядку зна ко ме стгр уппы 0
1
2
3
4
5
6
7
4
5
1
0
2
3
7
6
— ма р шр ут4 5 1 0 2 3 7 6 р а сши ф р о ва ни я
О че ви дно , что две (р а зные ) пе р е ста но вки по др яд не уве ли чи ва ю тсто йко сть ши ф р а , т.к. э кви ва ле нтныне ко то р о й о дно й. Ста ти сти ка б укв ши ф р о те кста пе р е ста но вки та ка я ж е ка к и у и схо дно го те кста . Н о зна ни е е ё не по мо га е т взло ма ть ши ф р , т.к. б уквы по ме няли сь ме ста ми , о дна ко в р а ссмо тр е нных ва р и а нта х о ка зыва е тся пр о являю тся ста ти сти че ски е за ко но ме р но сти букв ключа , что мо ж е тпо зво ли ть р а скр ыть е го .
5.7. Ш иф р ы п ер ест а новк и Ш и ф р за ме ны в чи сто м е го ви де ни ко гда не пр и ме няе тся, а упо тр е б ляе тся вме сте с пе р е ста но вка ми , на пр и ме р , б и твнутр и б а йта . Е сли по сле за ме ны си мво лы со о б щ е ни я пр е вр а щ а ли сь во что угодно, но со хр а няли в ши ф р о вке сво е и схо дно е ме сто по ло ж е ни е , то по сле пе р е ста но вки си мво лы уж е и р а спо ла га ю тся в те ксте где угодно. Э то на де ж но за щ и щ а е т ши ф р о вку о т а та к кр и пто а на ли ти ко в, та к ка к пе р е ста но вку мо ж но р а ссма тр и ва ть ка к умно ж е ни я ве кто р а со о б щ е ни я x на ма тр и цу P пе р е ста но вки б и т с э ле ме нта ми 0, 1 и р а зме р о м в дли ну со о б щ е ни я в б и та х. - Е сли пе р е ста но вка де ла е тся по сле га мми р о ва ни я Y ' ' = [ P]( x ⊕ y ) , то пр и x = 0 и ме е м Y ' ' = [ P] ⋅ γ и в ка на л по па да е т уж е клю ч, шифр ова нны й пе р е ста но вко й. А та ка на клю ч ста но ви тся не э ф ф е кти вно й. Н а пр и ме р , е сли пе р е да ча и де тпо б а йтно , то до ста то чно ли шь пе р е ста ви ть б и ты внутр и б а йта , что б ы с ве р о ятно стью 0,97 и ска зи ть е го и сде ла ть пе р е хва тклю ча в па уза х пе р е да чи не во змо ж ным. П е р е ста но вка гр уппа ми б и т (на пр и ме р , ка к б а йты) пр о гр а ммно удо б не е , че м по б и то ва я пе р е ста но вка , но не пе р е ме ши ва е тб и тыпо лно стью . П о б и то ва я пе р е ста но вка на де ж не е , но сло ж не е во вр е ме ни пр о по р ци о на льно ква др а ту чи сла пе р е ста вляе мых э ле ме нто в, на пр и ме р , пе р е ста но вка б и тв 64 р а за до р о ж е пе р е ста но вки б а йт. П р и дума но мно го вычи сли те льных спо со б о в пе р е ста но во к. Н а пр и ме р , ши р о ко пр и ме няе тся пе р е ста но вка пр о гр а ммно по но ме р а м N о т 0 до L–1 р е кур р е нтным выр а ж е ни е м N i +1 = ( K ⋅ N i + M ) mod L
П р и выпо лне ни и сле дую щ и х 4 усло ви й 1) K и M б е р утся и з и нте р ва ла [1, L–1] 2) M вза и мно пр о сто с L 3) K–1 де ли тся на лю б о й пр о сто й де ли те ль L 4) K–1 де ли тся на 4, е сли L де ли тся на 4 В э то м случа е для хо р о ше го за путыва ни я пр и хо ди тся де ла ть пе р е ста но вку не ско лько р а з ме няя случа йно K и M. Быстр ую и ка че стве нную пе р е ста но вку мо ж но по лучи ть пе р е ста но вко й па р по случа йно му клю чу. Н а пр и ме р , для б ло ка и з N б и тза ве де м ма сси в arr пе р е ме нных це ло го ти па (0, 1) и за гр узи м в не го б ло к и схо дно го дво и чно го те кста . П р о гр а мма пе р е ста но вки на языке QBasic б уде ти ме ть ви д: RANDOMIZE 1379 FOR i = 1 TO N SWAP arr(i), arr(N*RND) 'обменять переменные arr(i) ↔ arr(j) NEXT i Э та пе р е ста но вка пр а кти че ски не о ста вляе тни о дно го си мво ла на сво е м ме сте . За ме ти м, что э та ж е пр о гр а мма пр и ме ни ма и для пе р е ста но вки б укв, за ко ди р о ва нных б а йта ми ASCII. М о ж но пр о и зво ди ть пе р е ста но вку по а на ло ги и с та со ва ни е м ко ло ды ка р т: та со ва ть б и ты и ли б а йты б ло ка те кста . О б о зна чи м пр и со е ди не ни е (ко нка те на ци ю ) зна ко м «+». П усть б ло к те кста р а зб и т на ф р а гме нты Y=A+B+C и р а зб и е ни е на ф р а гме нты и з б и т и ли б а йт пр о и зво ди тся случа йным о б р а зо м. Т о гда р е зульта т пе р е ста но вки , на пр и ме р , б уде т Y'=C+B+A. О дна ко , что б ы те кст о сно ва те льно пе р е пута ть нуж но о че нь мно го кр а тно по вто р и ть та со ва ни е . В скр ыти е случа йно й пе р е ста но вки б е з зна ни я клю ча не о дно зна чно и , сле до ва те льно , не по зво ляе тско лько -ни б удь уве р е нно р а сши ф р о ва ть со о б щ е ни е . Ш и ф р о ва ни е за ме но й в со че та ни и с пе р е ста но вко й ли кви ди р о ва ло на де ж ду на взло м р а зными хи тр о умными ме то да ми о тга дыва ни я те кста . В зло мщ и ка м о ста лся ли шь ме то д пр ямо го по дб о р а клю ча . О дна ко по со хр а ни вше йся ста ти сти ке и спо льзо ва нных в те ксте си мво ло в мо ж но сде ла ть пр о гно зыо б о б щ е м со де р ж а ни и те кста , хо тя и ма ло уве р е нные .
5.8. Ш иф р ы вз бива ния Сто йко сть ши ф р а мо ж но зна чи те льно уве ли чи ть, е сли и спо льзо ва ть ли не йно е пр е о б р а зо ва ни е — ши ф р о ва ни е с по мо щ ью а лге б р ыма тр и ц (р а зде л5.3) ρ ρ Y = [ L] ⋅ X где те пе р ь э ле ме нта ми случа йно й ма тр и цы [L] являю тся 0 и 1, а , сле до ва те льно , 0 det[L] = . П о э то му мо ж но и спо льзо ва ть то лько та ки е случа йные ма тр и цы [L], 1 де те р ми на нтко то р ых р а ве н 1 (т.е . не вы р ож де нны е ма тр и цы). Ш и ф р ы на о сно ве э то го пр е о б р а зо ва ни я на зыва ю т скр е мб ле р а ми и ли взб и ва лка ми (ка к по ва р а о мле т). О дна ко до ля не выр о ж де нных ма тр и ц ср е ди случа йных о че нь б ыстр о уве ли че ни е м и х р а зме р а .
уб ыва е т с
Для то го что б ы ма тр и ца [L] б ыла и случа йно й, и не выр о ж де нно й, и пр и р а сши ф р о вке не на до б ыло б ы пр о и зво ди ть мно го вычи сле ни й, а ме р и ка нски ми кр и пто гр а ф а ми б ыл пр е дло ж е н а лго р и тм, суть одного ша га ко то р о го мо ж но L' R' пр е дста ви ть сле дую щ е й схе мо й. XOR L''
R''
В хо дно й б ло к те кста б и то во го по то ка де ли тся по по ла м на ле вую L' и пр а вую R' ча сти . В ыхо дно й ма сси в ф о р ми р уе тся та к, что е го ле ва я ча сть L'' ка к сумма L' и R' о пе р а ци й XOR, а пр а ва я R'' пр е дста вле на ле во й ча стью L'. Да ле е и де т пе р е ста но вка с за ме но й.
П е р е ста но вка
В се о пе р а ци и мо гут б ыть о б р а щ е ны, и р а сши ф р о выва ни е о сущ е ствляе тся за чи сло о пе р а ци й ли не йно за ви сящ е го о т р а зме р а б ло ка .
S-пр е о б р а зо ва ни е
П о сле не ско льки х взб и ва ни й мо ж но счи та ть, что ка ж дый б и т ши ф р о вки мо ж е тза ви се ть о тка ж до го б и та и схо дно го те кста .
Э та схе ма ле гла в о сно ву на ци о на льно го ста нда р та ши ф р о ва ни я СШ А — DES.
5.9. И деи к ом бина ц ионного шиф р ова ния. Иде я по луче ни я пр а кти че ски сто йко го ши ф р а б а зи р уе тся на двух о б щ и х пр и нци па х ши ф р ую щ е го пр е о б р а зо ва ни я, выде ле нных К. Ш е нно но м. Ра ссе ива ние — р а спр о стр а не ни е вли яни я о дно го зна ка о ткр ыто го те кста на мно го зна ко в ши ф р о те кста с це лью со кр ыти я ста ти сти че ски х сво йств и схо дно го те кста . Ра зви ти е м э то го пр и нци па являе тся р а спр о стр а не ни е вли яни я о дно го зна ка ключа на мно го зна ко в ши ф р о те кста , что пр е до твр а щ а е тр а скр ыти е клю ча по ча стям. Пе р е ме шива ние — та ки е ши ф р о пр е о б р а зо ва ни я, ко то р ые усло ж няю т во сста но вле ни е вза и мо связи ста ти сти че ски х сво йств о ткр ыто го и ши ф р о ва нно го те ксто в. О дна ко ши ф р до лж е н пр и э то м сох р а ня ть ле гко сть ши ф р о ва ни я и р а сши ф р о ва ни я пр и и зве стно м клю че . Ра спр о стр а не н пр о сто й спо со б до сти ж е ни я р а ссе и ва ни я и пе р е ме ши ва ни я и спо льзо ва ни е м со ста вно го ши ф р а (пр о и зве де ни е м ши ф р о в) и з не ско льки х пр о стых ши ф р о в пе р е ста но во к и за ме н (S-пр е о б р а зо ва ни й). П р и пе р е ста но вке пе р е ме ши ва ю т си мво лы и схо дно го те кста по клю чу. Ра спр е де ле ни е ча сто то тде льных си мво ло м в ши ф р о те ксте о ста е тся та ки м ж е , что и в и схо дно м те ксте , хо тя р а спр е де ле ни я б о ле е высо ки х по р ядко в о ка зыва ю тся пе р е ме ша нными . П р и о дно а лф а ви тно й за ме не (по дста но вке ), на пр и ме р , в ши ф р е Ц е за р я, р а спр е де ле ни е ча сто тси мво ло в в ши ф р о те ксте со хр а няте ся та ки м ж е , ка к и в о ткр ыто м те ксте . О дна ко , мно го а лф а ви тна я за ме на и по дста но вка по па р а м си мво ло в уж е пе р е ме ши ва ю т ча сто ты о тде льных си мво ло в в ши ф р о те ксте . П р и мно го кр а тно м че р е до ва ни и пр о стых пе р е ста но во к и по дста но во к мо ж но по лучи ть о че нь сто йки й пр а кти че ски ши ф р (кр и пто а лго р и тм) с хо р о ши м р а ссе и ва ни е м и пе р е ме ши ва ни е м. Н а пр а кти ке и спо льзую т б ло ки пе р е ста но во к P и S-пр е о б р а зо ва ни й (за ме н) с пе р е клю че ни е м на пр ямо е и о б р а тно е пр е о б р а зо ва ни я P-1, S-1 (ши ф р а ци ю и де ши ф р а ци ю ). Н а пр и ме р , S-пр е о б р а зо ва ни е двухб и то во го б ло ка :
вхо д 0 1 2 3 Клю ч 1 –ши ф р
0
1
0 –де ши ф р
Т а б ли ца ши ф р о ва ни я клю ч = 1
Т а б ли ца де ши ф р о ва ни я клю ч = 0
0 1 2 3
0 1 2 3
2, 0, 3, 1
1, 3, 0, 2
Ч и сло на вхо де о пуска е тся чи сло на выхо де
0 1 2 3 выхо д
5.10. Га м м ир ова ние двоичного т ек ст а . Л ю б а я и нф о р ма ци я (б укве нный те ст. Ц и ф р о вые да нные , и зо б р а ж е ни е , р е чь и т.п.) ко ди р уе тся дво и чным ко до м, ко то р ый и б уде м да ле е та кж е ка к р а не е на зыва ть и схо дным те ксто м. Ф о р ми р уе тся псе вдо случа йна я чи сло ва я по сле до ва те льно сть (клю ч) та кж е в ф о р ме ка ко го -ли б о дво и чно го ко да . П о луче нные дво и чные по сле до ва те льно сти (и схо дно го те кста и клю ча ) по зна чно р а спо ла га ю тся о ди н по д др уги м. О дни м и з р а спр о стр а не нных пр и е мо в по луче ни я ши ф р о гр а ммы являе тся сло ж е ни я по мо дулю два (XOR) ка ж до й па р ы дво и чных си мво ло в и схо дно го клю ча . Де ши ф р и р о ва ни е о сущ е ствляе тся пр о сто ге не р и р о ва ни е м и де нти чно го выпо лне ни е м на д ши ф р о те ксто м и клю чо м о пять ж е о пе р а ци и XOR, т.к. э та являе тся и о б р а тно й для са мо й се б я. yi = xi XOR γi,
xi = yi XOR γi
yi = xi ⊕ γi,
xi = yi ⊕ γi
о пе р а ци я те кста и клю ча и о пе р а ци я
П р и ме р га мми р о ва ни я б укве нно го те кста : Исхо дный те кст
ш
И
ф
р
010010
100000
110010
101001
Де сяти чные чи сла клю ча (га ммы)
7
1
8
2
Дво и чный ко д га ммы
000111
000001
001000
000010
Ш и ф р о гр а мма
010101
100001
111010
101011
Е го дво и чный (те ле гр а ф ный)
ко д
П е р и о д га ммы - Дво и чный ко д га ммыи ме е тто ж е ко ли че ство б и т, что и ко д б укв - В ка че стве га ммывзята по сле до ва те льно сть и з е =2,718… Га мму мо ж но за р а не е за пи са ть в ЗУ и ли ге не р и р о ва ть е е да тчи ка ми П СП чи се л а ппа р а тно и ли пр о гр а ммно . Для уве ли че ни я на де ж но сти ши ф р о ва ни я мо ж но , р а зб и в ши ф р уе мый те кст на гр уппы, пр и ме нять к ка ж до й гр уппе др уги е уча стки П СП га ммы. Га мми р о ва нную ши ф р о гр а мму мо но вскр ыть, е сли пе р и о д га ммы ко р о че и зве стно го кр и пто а на ли ти ку и схо дно го те кста .
дли ны
5.11. Сла бые м ест а шиф р а з а м ены с п ом ощь оп ер а ц ии XOR. У ко мпью те р но го мно го а лф а ви тно го ши ф р а за ме ны с по мо щ ью о пе р а ци и XOR е сть два сла б ых ме ста . П е р во е — э то о б р а ти мо сть ши ф р а , т.к. для ши ф р о ва ни я и р а сши ф р о ва ни я пр и ме няе тся о дна и та ж е о пе р а ци я. Е сли о дно со о б щ е ни е по сыла е тся на ско льки м а др е са та м, ши ф р уе тся о дни м и те м ж е клю чо м и пр о и зо ше л сб о й и ли о ши б ка , та к ха ке р мо ж е т по лучи ть два со о б щ е ни я р а зно й дли ны. Н а пр и ме р , по лучи ли сь две ши ф р о вки . Ко то р ые о тли ча ю тся те м, что и схо дный те кстсо о б щ е ни я о ка за лся сдви нутым на о ди н си мво л пр и ши ф р о вке . Кр и пто а на ли ти к мо ж е тпо лучи ть две ши ф р о вки Y' и Y''. i
yi' = xi ⊕ γi,
y''i+1 = xi+1 ⊕ γi,
0
y0' = x0 ⊕ γ0,
y''1 = x1 ⊕ γ0,
1
y1' = x1 ⊕ γ1,
y''2 = x2 ⊕ γ1,
y 22 = x1 ⊕ x 2
2
y2' = x2 ⊕ γ2,
y''3 = x3 ⊕ γ2,
y 32 = x 2 ⊕ x 3
3
y3' = x3 ⊕ γ3,
y''4 = x4 ⊕ γ3,
Μ — "—
y12 = x 0 ⊕ γ 0 ⊕ x1 ⊕ γ 0 = x 0 ⊕ x1
— "—
Т о гда , взяв и х сумму γ∑, кр и пто а на ли ти к по лучи т сумму и схо дно го те кста со сдви го м y iΣ+1 = y i′ ⊕ y i′′+1 = xi ⊕ γ i ⊕ xi +1 ⊕ γ i = xi ⊕ xi +1 . Т е пе р ь и схо дный те кст мо ж но по лучи ть, по до б р а в (по пр о явле ни ю о смысле нно го те кста ) ве ли чи ну y 0Σ по ф о р муле
xn = y 0Σ ⊕ y1Σ ⊕ y 2Σ ⊕ Λ ⊕ y nΣ , y0Σ е сть ни что и но е ка к ко д пе р во й б уквы ши ф р о гр а ммы. Де йстви те льно , взяв
где
y 0Σ = x 0 , по лучи м, на пр и ме р
x 2 = y 0Σ ⊕ y1Σ ⊕ y 2Σ = x 0 ⊕ x 0 ⊕ x1 ⊕ x1 ⊕ x 2 14 2 43 14 2 43 y 2Σ
y1Σ
П р и ме р : i
γ
0
y0Σ = x0 = 11000 (Ш )
00111
11000 Ш (уга да ли пе р е б о р о м)
21
01111 П
10000
01000 И
10100 00001 Б
11001 Щ
11100
10100 Ф
00101 Е
00100
10000 Р
00101 К
01010
11010 Ъ
10101 Р
31 4
01000 00101 Е 01101
Ф
3
xn = y0Σ ⊕ y1Σ ⊕ y2Σ ⊕ Λ ⊕ ynΣ
11000 11111 Я
13 2
yiΣ+1 = yi′ ⊕ yi′′+1
Ш
И
1
шт''
x
7
y'
шт' y''
T
10000 01111 П 11111
Ъ
11010 10011 У
9
01001
Ка к ви ди м, пр и р а ссмо тр е нно й о ши б ке ши ф р о ва льщ и ка пр и р а ссылке ци р куляр но й те ле гр а ммы, но ши ф р уе мо й одним клю чо м, ши ф р за ме ны на о сно ве о пе р а ци и XOR ле гко вскр ыть и б е з по дб о р а клю че й. Ко ли че ство ва р и а нто в пр о чте ни я ши ф р о вки не пр е выша е т ко ли че ства си мво ло в в а лф а ви те . Се йча с кр и пто гр а ф ы стр о го де р ж а тся пр а ви ла : ни пр и ка ко м случа е не и спо льзо ва ть клю ч два ж ды. В то р о е сла б о е ме сто во зни ка е т, е сли в со о б щ е ни и встр е ча ю тся б о льши е уча стки пр о б е ло в и ли нуле вых си мво ло в. Н а пр и ме р , е сли ли ни я связи не до за гр уж е на , но в то вр е мя ко гда не т со о б щ е ни я, а ппа р а тур а ши ф р о ва ни я не выклю че на . Т о гда , т.к. x=0, в ли ни ю связи по ступа е т «ши ф р о вка » Y0, пр е дста вляю щ а я со б о й чи стую по сле до ва те льно сть клю ча . Е сли пе р е хва ти ть е е , т.е . клю ч Y0=γ, то мо ж но на не е на ло ж и ть те кст сво е го зло умышле нно го со о б щ е ни я Yзло = xзло ⊕ γ. П о луча те ль, р а сши ф р о ва в е е Yзло ⊕ γ = xзло ⊕ γ ⊕ γ = xзло , по ве р и тте ксту xзло зло умышле нни ка , что уж е ни ка к не до пусти мо . Т а к ка к пе р е хва тчи к-зло умышле нни к не зна е т, сво б о дна ли ли ни я, то б уде тна кла дыва ть сво й те кст на не пр е р ывный ши ф р о ва нный си гна л на уга д не ско лько р а з. Да ж е е сли в то вр е мя по ли ни и шла пе р е да ча , то во зни кши е и ска ж е ни я, ско р е е все го , б удутпо луча те ле м и нте р пр е ти р о ва ныка к по ме хи в ка на ле связи .
5.12. Пот ок овое (п от очное) шиф р ова ние. Бло чно е ши ф р о ва ни е о б ла да е тсле дую щ и ми не до ста тка ми . •
о ди но чна я о ши б ка в ши ф р о ва нно м те ксте вызыва е т и ска ж е ни е пр и де ши ф р а ци и пр и ме р но по ло ви ны и схо дно го те кста , что тр е б уе т до по лни те льно го пр и ме не ни я мо щ ных ко до в и спр а вляю щ и х о ши б ки .
•
Из двух о ди на ко вых б ло ко в и схо дно го те кста по луча ю тся о ди на ко вые б ло ки ши ф р о ва нно го .
Э ти не до ста тки устр а няю тся пр и по то чно м (по то ко во м) ши ф р о ва ни и .
Ге не р а то р клю че во й по сле до ва те льно сти Исхо дный те кст(по то к)à⊕
⊕àРа сши ф р о ва нный по то к
В о тли чи е о т б ло чных ши ф р о в, зде сь ка ж дый си мво л (б и т) и схо дно го по то ка да нных ши ф р уе тся, пе р е да е тся и де ши ф р уе тся не за ви си мо о тдр уги х си мво ло в. Др уги ми сло ва ми , ши ф р ую щ е е пр е о б р а зо ва ни е ме няе тся о то дно го э ле ме нта и схо дно го по то ка к др уго му, а в б ло чных ши ф р а х ши ф р ую щ е е пр е о б р а зо ва ни е для все х б ло ко в не и зме нно . До сто и нство по то ко во го ши ф р а — высо ка я ско р о сть ши ф р о ва ни я/де ши ф р о ва ни я, со и зме р и ма я со ско р о стью по ступле ни я и схо дных да нных. Сле до ва те льно , и ме е тся во змо ж но сть р а б о та ть в р е а льно м вр е ме ни . Е сли ге не р а то р клю че во й по сле до ва те льно сти — э то ка ж дый р а з уни ка льна я случа йна я га мма , то по луча е м схе му В е р на ма . О дна ко пр а кти че ска я р е а ли за ци я «све р хдли нных» клю че вых по сле до ва те льно сте й и и х хр а не ни е за тр удни те льно и не удо б но . Х о тя схе ма В е р на ма те о р е ти че ски не вскр ыва е ма , б о ле е удо б ными о ка за ли сь псе вдо случа йные по сле до ва те льно сти (П СП ), ф о р ми р уе мые
ге не р а то р а ми П СП а ппа р а тно и ли пр о гр а ммно . Се кр е тным клю чо м являю тся стр уктур а ге не р а то р а П СП и е го на ча льно е сло во . П о со о тно ше ни ю пе р и о да ши ф р о ва ни я:
П СП
с дли но й и схо дно го те кста р а зли ча ю т си сте мы
•
с «б е ско не чно й»П СП : Т П СП > Lи сх.те кста
•
с ко не чно й П СП : Т П СП = Lи сх.те кста (р е ж и м б е гущ е го ко да )
Н а пр а кти ке о тпр а ви те ль и по луча те ль и ме ю тсво и ге не р а то р ы П СП . Сле до ва те льно , ка к ви дно и з р и сунка , П CП
П СП
Исхо дный по то к⊕→ ⊕→Ра сши ф р о ва нный по то к по луча те ля тпр сиост е маа випотетл о я→⊕ ко во го ши ф р о ва ни я тр е б уе тси нхр о ни за ци и ге не р а то р о в П СП о тпр а ви те ля и по луча те ля ка к др уг с др уго м, та к и с по то ко м ши ф р о гр а ммы. В ста вка и ли выпа де ни е о дно го дво и чно го си мво ла в ши ф р о гр а мме пр и во ди т к не пр а ви льно му р а сши ф р о ва ни ю о ста льных си мво ло в и з-за по те р и си нхр о ни за ци и . Э то тне до ста то к устр а няе тся в са мосинх р онизир ующ их ся по то чных си сте ма х ши ф р о ва ни я, в ко то р ых во сста но вле ни е р е ж и ма са мо си нхр о ни за ци и пр о и схо ди т а вто ма ти че ски че р е з не ко то р о е ко ли че ство б и тши ф р о гр а ммы.
Си нхр о нно е п о то ко в о е ш и ф р о в ани е А лго р и тм по то чно го (по то ко во го ) ши ф р о ва ни я/де ши ф р о ва ни я: yi = xi E fi(z) — ши ф р о ва ни е xi = yi E fi(z) — де ши ф р о ва ни е где fi(z) — i-ый си мво л П СП выр а б а тыва е мый ге не р а то р о м П СП с ф ункци е й о б р а тно й связи f и на ча льным сло во м z.
Класси ф и каци я Си нхр о нные по то чные ши ф р ы П о ме то да м по стр о е ни я П СП М е то д ф ункци о на льных о то б р а ж е ни й М е то д ко мб и ни р о ва ни я на р е ги стр а х сдви га Спо со б ыте хни че ско й р е а ли за ци и С ли не йно й о б р а тно й связью С внутр е нне й не ли не йно й ло ги ко й С вне шне й не ли не йно й ло ги ко й Пр име р фор мир ова ния ПСП двухступе нча тым ф ункци о на льным о то б р а ж е ни е м. GF(2m)
GF(2k)
GF(2) = {0, 1}
1 0000
1 00
0
2 0001
2 01
1
3 0010 4 0011
f
3 10 4 11
g
1 0
2k
…
Μ Μ
16 1111 m
=2
M=4
k=2
П СП с пе р и о до м 2m
Сам о си нхр о ни з и р ую щ ееся п о то чно е ши ф р о в ани е Си мво лы (б и ты) и схо дно го по то ка ши ф р ую тся с уче то м n пр е дше ствую щ и х си мво ло в, ко то р ые пр и ни ма ю туча сти в ф о р ми р о ва ни и П СП . Се кр е тный клю ч зде сь – ф ункци я о б р а тно й связи ге не р а то р а П СП . А лго р и тмыши ф р о ва ни я/де ши ф р о ва ни я: yi = xi E Fz(yi–1, yi–2, … , yi–n) –ши ф р о ва ни е ) x i = y i E Fz ( y i −1 , y i −2 ,Κ , y i −n ) –де ши ф р о ва ни е xi. П р и ме р си сте мына р е ги стр а х сдви га с о б р а тно й связью : ) xi yi xi = xi
OC
RG
RG
OC
П р и ме няе тся в высо ко ско р о стных ли ни ях связи (ши ф р ы SEC-15, SEC-17 – 256… 2304 кб и т/с, клю ч со сто и ти з 72-х ше стна дца те р и чных ци ф р ). В устр о йстве по то ко во го ши ф р о ва ни я CSD507 и спо льзуе тся 31-р а зр ядный р е ги стр сдви га , в CDE-100 –2 р е ги стр а сдви га . «Со вр е ме нные » го суда р стве нные ста нда р ты: РФ – ГО СТ 28147-89, СШ А Испо льзую тко мб и ни р о ва ни е по то чно го и б ло ко во го ши ф р о ва ни я.
– DES.
5.13. О сновные свойст ва γ -шиф р а . О пи са нный по то ко вый ши ф р пр о сти о сущ е ствляе тся с высо ко й ско р о стью . П о сущ е ству та ка я вр е мяза ви си ма я си сте ма ши ф р о ва ни я о р га ни че ски вклю ча е т в се б я и пр о ве р ку а уте нти чно сти со о б щ е ни я. О сно вные сво йства : 1) Н е о б хо ди м си нхр о ни зм в то м смысле , что и в пе р е да тчи ке , и в пр и е мни ке до лж ны и спо льзо ва ться о ди на ко вые ча сти γ-клю ча . Е сли γ-клю чи , ге не р и р ую тся не пр е р ывно , то не о б хо ди м си нхр о ни зм в р е а льно м вр е ме ни (в б уква льно м смысле ). П о те р я си нхр о ни зма на о ди н р а зр яд (и ли о ди н и нте р ва л вр е ме ни ) по лно стью на р уша е т де ши ф р и р о ва ни е , пр и хо ди тся во сста на вли ва ть е го спе ци а льно й пр о це дур о й. Для вза и мно го за се кр е чи ва ни я б о льшо го чи сла по льзо ва те ле й на до по дде р ж и ва ть си нхр о ни зм мно ги х γ-клю че й.
2) П се во дслуча йный γ-клю ч не и зб е ж но ци кли че н. П о вто р яю щ е е ся и спо льзо ва ни е ци кло в (пе р и о до в га ммы) – се р ье зна я кр и пто гр а ф и че ска я сла б о сть. П о сле о ко нча ни я пе р и о да псе вдо случа йно сти на до пе р е на стр а и ва ть ге не р а то р П СП , что б ы не по р о ж да ть о ди на ко вых пе р и о до в псе вдо случа йно сти . Для мно ги х за се кр е чи ва е мых по льзо ва те ле й и зде сь тр е б уе тся б о льшо е чи сло р а зных псе вдо случа йно сте й. 3) Т а к ка к для пр о сто ты о б р а ти мо сти П СП и и схо дный те кст о б ъе ди няю тся по р а зр ядным сло ж е ни е м по мо дулю два , то , сле до ва те льно , ни ка ко й ме ж си мво льно й за ви си мо сти не т. О ши б ка в о дно м р а зр яде ши ф р о те кста и ска ж а е т не б о ле е че м о ди н со о тве тствую щ и й р а зр яд де ши ф р о ва нно го те кста . Для ли ни й связи с шума ми и со о б щ е ни й с б о льшо й и зб ыто чно стью (на пр и ме р , для р е че во й связи с ква нто ва ни е м) э то сво йство о че нь по ле зно . Н о для ИВ С, для ко то р ых ха р а кте р ны ма ла я и зб ыто чно сть те кста и ма лые до пуски на о ши б ки , о тсутстви е ме ж си мво льно й за ви си мо сти уж е не являе тся пр е и мущ е ство м, та к ка к не да е т го то вых ср е дств для а вто ма ти че ско го и на де ж но го на пр а кти ке спо со б а о б на р уж е ни я о ши б о к.
5.14. О бщие т р ебова ния к шиф р а м . К на сто ящ е му вр е ме ни р а зр а б о та но мно го р а зли чных спо со б о в ши ф р о ва ни я, но да ле ко не все мо ж но и спо льзо ва ть для за щ и ты и нф о р ма ци и в а вто ма ти зи р о ва нных и и нф о р ма ци о нно -вычи сли те льных си сте ма х. К ши ф р а м, и спо льзуе мым в э то й о б ла сти , пр е дъявляю тся сле дую щ и е тр е б о ва ни я: •
до ста то чна я на де ж но сть (сто йко сть) за щ и ты;
•
пр о сто та ши ф р о ва ни я и де ши ф р о ва ни я;
•
не за ви си мо сть ши ф р о ва ни я и де ши ф р о ва ни я о т спо со б а пр е дста вле ни я и нф о р ма ци и .
•
не чувстви те льно сть к не зна чи те льным о ши б ка м ши ф р о ва ни я. Т .е . по явле ни е о тде льных о ши б о к в пр о це ссе ши ф р о ва ни я и ли де ши ф р о ва ни я не до лж но ве сти к б о льши м по те р ям и нф о р ма ци и .
•
не зна чи те льна я и зб ыто чно сть, т.е . ма ло е уве ли че ни е о б ъе ма ши ф р а по ср а вне ни ю с и схо дно й и нф о р ма ци е й.
внутр и ма ши нно го
6. Стегано гр аф и я 6.1. Введение Сте га но гр а ф и я в пе р е во де с гр е че ско го (steganos — се кр е т, та йна ; graphy — за пи сь) — та йно пи сь. Ц е ль кр и пто гр а ф и и (kryptos — скр ытый) — ши ф р о ва ни е со сто и тв со кр ыти и со де р ж а ни я со о б щ е ни я, ко то р о е хо тятсде ла ть се кр е тным. Ра зр а б о тчи к кр и пто -а лго р и тмо в и схо ди ти з пр е дпо ло ж е ни я, что пр о ти вни к б уде тде ла ть что уго дно для де ши ф р о вки со о б щ е ни я. За да ча сте га но гр а ф и и — б о ле е глуб о ка я — скр ыть са м ф а ктсущ е ство ва ни я со о б щ е ни я. Ра зр а б о тчи к сте га но -а лго р и тма о за б о че н те м, ка к не да ть пр о ти вни ку о б на р уж и ть сущ е ство ва ни е са мо го со о б щ е ни я. Сте га но гр а ф и я во зни кла р а ньше кр и пто гр а ф и и . П е р во е упо ми на ни е в и сто р и че ско й ли те р а тур е пр и пи сыва ю т Ге р а до ту (477 го д до н.э .), о пи са вше му два случа я сте га но по сла ни й. 1) Ра б у о б р и ли го ло ву, вытута и р о ва ли пи сьмо на ко ж е го ло вы, за те м о тр а сти ли во ло сы и по сла ли р а б а с б ла го ви дным пр е дло го м к а др е са ту. Т а м р а б а сно ва по б р и ли и пр о чи та ли пи сьмо . 2) С во ско во й до щ е чки со ска б ли ва ли во ск, ца р а па ли пр ямо на де р е ве се кр е тно е пи сьмо , за те м сно ва по кр ыва ли до щ е чку во ско м и пи са ли о стр о й па ло чко й на во ске о ткр ыто е пи сьмо . В Ки та е пи сьма пи са ли на по ло ска х ше лка , сво р а чи ва ли в ша р и ки , по кр ыва ли во ско м и и х гло та ли по сыльные . Др е вни е Ри мляне пи са ли ме ж ду стр о к не ви ди мыми че р ни ла ми — ф р укто выми со ка ми , мо чо й, мо ло ко м. М е то д до ж и л до на ши х дне й. Л е ни н в не во ле пи са лсво и тр удымо ло ко м, на ли ва я е го в «че р ни льни цу» и з хле б но го мяки ша , ко то р ую пр и ма ле йше й о па сно сти б ыстр о съе да л. Л и сты, и спи са нные мо ло ко м, пе р е да ва ли сь на во лю , та м на гр е ва ли сь на д ла мпо й и пе р е пи сыва ли сь па р т-то ва р и щ а ми . I-я и II-я ми р о вые во йны спо со б ство ва ли б ыстр о му р а зви ти ю сге га но гр а ф и и . Н е мцы во вто р о й ми р о во й во йне пр и ме няли ми кр о ф о то гр а ф и и р а зме р о м с о б ычную ти по гр а ф скую то чку. П р и уве ли че ни и «ми кр о то чка »да ва ла и зо б р а ж е ни е пе ча тно й стр а ни цы, че р те ж е й и ли р и сунко в. А ме р и ка нцы по д впе ча тле ни е м до сти ж е ни й сте га но гр а ф и и да ж е по сле во йны за пр е ти ли пе р е сыла ть по по чте за пи си ша хма тных па р ти й, и нстр укци и по вяза ни ю и де тски е р и сунки , ка к на и б о ле е пр о стые для сте га но гр а ф и и о б ъе кты встр а и ва ни я шпи о нски х со о б щ е ни й. Се го дня та ки е за пр е ты не э ф ф е кти вны. Л ю б о й шпи о н мо ж е т по сла ть e-mail, пр е два р и те льно за ши ф р о ва в, на пр и ме р , р а зр е ше нным DES-ши ф р о м. О дна ко , уси ле нно му р а зви ти ю сте га но гр а ф и и служ и т то , что в б о льши нстве стр а н на кр и пто гр а ф и ю на кла дыва ю тся о гр а ни че ни я-за пр е ты. Н а пр и ме р : тр е б уе тся пе р е да ча го суда р ству клю че й о т и спо льзуе мых си сте м ши ф р о ва ни я, о б яза те льна я р е ги стр а ци я и ли це нзи р о ва ни е кр и пто си сте м, не за ви си мо о т то го являю тся ли о ни а ппа р а тными и ли пр о гр а ммными ср е дства ми . А ме то ды сте га но гр а ф и и не по па да ю т по д де йстви е э ти х о гр а ни че ни й и являю тся пр и э то м э ф ф е кти вным спо со б о м со кр ыти я да нных.
6.2. Пр им ер ы м ет одов ст ега ногр а ф ии без исп ольз ова ния сп ец иа льных т ехническ их ср едст в. 1) П о пе р вым (и ли др уги м) б уква м о ткр ыто го пи сьма .
2) В ло ж е ни е о пр е де ле нно го смысла в о ткр ыто е со о б щ е ни е и ли за ко ди р о ва нные сло ва . Ф а ла нги Испа ни и да ли ко ма нду выступле ни я, пе р е да в по р а ди о ф р а зу, за ма ски р о ва нную по д ме те о со о б щ е ни е «Н а д все й Испа ни е й чи сто е не б о ». 3) Т а йно пи сь Гр и б о е до ва . О н пи са л ди пло ма ти че ски е до не се ни я и з П е р си и че р е з на кла дыва е мый на ли ст б ума ги тр а ф а р е т с выр е за нными о кна ми по д б уквы. Н а пи са в до не се ни е че р е з тр а ф а р е т Гр и б о е до в до пи сыва л р а зб р о са нные по ли сту б ума ги б уквы в связа нный те кст, ка к пи сьмо к ж е не , и по сыла л е го о б ычно й по что й. Име я о дно пи сьмо , вскр ыть скр ытый те кстпр а кти че ски не во змо ж но . 4) Н а ко л б укв в ко нкр е тно м ме сте не ко й кни ги и ли га зе ты (ко нцы сло в о тме ча ю тся на ко ло м ме ж ду б уква ми ). 5) Со о б щ е ни е ка ки х-то да нных (на б о р то ва р о в, о пто вые це ны и т.п.) в о пр е де ле нно м по р ядке . 6) За пи сь на б о ко во й по ве р хно сти ко ло дыка р т(и ли по до б но й па чки ), по до б р а нных в о пр е де ле нно м по р ядке . Ко ло да ка р тпо сле э то го та суе тся. 7) За пи сь на о б р а тно й сто р о не ф ла ко но в, б а но к и ли б утыло к. 8) Т е кстпо д на кле е нно й по что во й ма р ко й. 9) За пи сь на внутр е нне й по ве р хно сти спи че чно й ко р о б ки , ко то р а я для э то го р а зла мыва е тся, а по сле скле и ва е тся по но во й. 10) За пи сь внутр и ва р е но го яйца . Бе р ут сме сь ква сцо в, че р ни л и уксуса , за пи сыва ю т е ю то , что не о б хо ди мо , на ско р лупе яйца , ко то р о е по то м выде р ж и ва ю тв кр е пко м р а ссо ле и ли уксусе , что б ы стр а ви ть сле ды с по ве р хно сти ; яйцо за те м ва р ят вкр утую , пр и э то м ве сь те ксто ка зыва е тся све р ху б е лка по д ско р лупо й. 11) Испо льзо ва ни е «и спо р че нно й» пи шущ е й ма ши нки , в ко то р о й не ко то р ые б уквы пр ыга ю т вве р х и ли вни з. У чи тыва ю т зде сь по р ядо к и чи сло э ти х б укв и пр о ме ж утки и х по явле ни я, на пр и ме р , в ко де а зб уки М о р зе . 12) За пи си о тр уки но тв но тно й те тр а ди (но ты и ме ю тзна че ни е , на пр и ме р , по а зб уке М о р зе и ли и но му ко ду). 13) За пи си в ви де ка р ди о гр а ммы и ли гр а ф и ка не ко го ме ха ни че ско го пр о це сса . Зде сь, на пр и ме р , пр и и спо льзо ва ни и а зб уки М о р зе пи ки по выше о зна ча е т, ска ж е м, то чки , а те , что ни ж е — ти р е ; че р то чки ме ж ду зуб ца ми со о б щ а ю т о р а зде ле ме ж ду б уква ми ; р а зр ывыли ни и — ко не ц сло ва . 14) Ш и ф р «А ве М а р и я». В ко до во м ва р и а нте ка ж до му сло ву, и но гда и ф р а зе , ста ви тся в со о тве тстви е не ско лько сло в явно й р е ли ги о зно й те ма ти ке , та к что пе р е да ва е мо е со о б щ е ни е выгляди тка к спе ци ф и че ски й те кстдухо вно го со де р ж а ни я.
6.3. Пр им ер ы ст ега ногр а ф ии с исп ольз ова нием т ехническ их ср едст в. 4) Бе сцве тные спе цче р ни ла , пр о являю щ и е ся по сле о пр е де ле нным ф и зи ко - и ли хи ми ко -во зде йстви й, ко то р ыми пи шутме ж ду стр о к о б ычно го пи сьма . 5) П р о явле ни е пи сьма в ультр а ф и о ле то во м о тр а ж е нно м и ли по ляр и зо ва нно м све те и ли лю ми не сце нци и . Н а пр и ме р , на ти р а е м те кст ва зе ли но м и за те м е го на спе цб ума гу в не ви ди мо м ви де . 6) Испо льзо ва ни е для пе р е да чи о стр о на пр а вле нных луче й но си те ля связи . 7) Испо льзо ва ни е ква нто во го ка на ла ф о то но в для пе р е да чи се кр е тных клю че й.
8) Све р хми ни а тю р на я ф о то гр а ф и я-ми кр о то чка , стр а ни цыми кр о те кста .
в ко то р ую
мо ж но
по ме сти ть
9) М и кр о те кст для чте ни я в э ле ктр о нно м ми кр о ско пе . Испо льзуе тся те хно ло ги я пр о и зво дства ми кр о чи по в. 10) Ф о р ма ти р о ва ни е ди ско в и на че , че м пр и нято в DOS и со кр ыти е и нф о р ма ци и в э ти х се кто р а х. Испо льзо ва ни е «и нж е не р ных» до р о ж е к, до ступных для чте ни я, но не во спр и ни ма е мых DOS. У пр ятыва ни е ви р усо в и и нф о р ма ци и в сб о йные б ло ки и ли в не усто йчи вые б и ты, ко то р ые спе ци а льно за пи са ны на ур о вне , пр о ме ж уто чно м ме ж ду «0»и «1». 11) М а ски р о ва ни е се кр е тных б и ти нф о р ма ци и по д шум, по ме хи , и ска ж е ни я. o В ка на ла х ко мме р че ско й связи o В ци ф р о вых сни мка х Kodak-Photo. o В 18-ме га б и тно й ви де о ка р ти нке ле гко скр ыть пр и ме р но 1 М б и тши ф р о вки , пр а кти че ски не за ме тно й и не ухудша ю щ е й ка че ство и зо б р а ж е ни я. o М а ски р о вка звуко во й (р е че во й) и нф о р ма ци и по д шум. o В о дно й и з М о ско вски х ко мпа ни й пр и пе ча ти на Э В М ко нтр а кто в в ни х вно си ла сь ци ф р о ва я и нф о р ма ци я о б усло ви ях со ста вле ни я ко нтр а кта за сче т ма ло за ме тных и ска ж е ни й о че р та ни я о тде льных си мво ло в.
6.4. Пр инц ип ы к ом п ьют ер ной ст ега ногр а ф ии. Ра ссма тр и ва е м и нф о р ма ци ю о тде льно о т е е ма те р и а льно го пр е дста вле ни я. Т о гда во зни ка е тво пр о с — где ж е и нф о р ма ци ю мо ж но спр ята ть? О тве то дно зна чный. Т о лько в е щ е б о льше м ма сси ве и нф о р ма ци и — ка к и го лка в сто гу се на . Сте га но гр а ф и я пр е дпо ла га е т, что пе р е да ва е мый те кст «р а ство р яе тся»в со о б щ е ни и б о льше го р а зме р а с со ве р ше нно «по сто р о нни м»смысло м. Н о , е сли пр и ме ни ть к не му о пр е де ле нный а лго р и тм и звле че ни я, то по лучи м ко нкр е тно е та йно е со о б щ е ни е .
Недо статки и п р о б лем ы 1) Т р удно о б о сно ва ть сто йко сть ко нкр е тно го ме то да . В др угзло умышле нни ку ста не т и зве сте н спо со б «по дме ши ва ни я» се кр е тных да нных к «б о лва нке » — ма сси ву о ткр ытых да нных. 2) П р и и спо льзо ва ни и ме то да о б ъе м пе р е да ва е мых и ли хр а ни мых да нных мо ж е т уве ли чи ва ться. Э то о тр и ца те льно ска зыва е тся на пр о и зво ди те льно сти си сте м о б р а б о тки . Сте га но гр а ф и че ски е пр о гр а ммные пр о дуктыб а зи р ую тся на двух о сно вных пр и нци па х: 1) Ф а йлы со де р ж а щ и е о ци ф р о ва нно е и зо б р а ж е ни е и ли звук мо гутб ыть до не ко то р о й сте пе ни и зме не ны б е з по те р и сво е й ф ункци о на льно сти , в о тли чи е о тдр уги х ти по в да нных, тр е б ую щ и х а б со лю тно й то чно сти . 2) О р га ны чувств че ло ве ка не спо со б ны р а зли ча ть не зна чи те льные и зме не ни я в цве те и ли ка че стве звука . Н а пр и ме р , о тпр а вляе м ко р р е спо нде нту по э ле ктр о нно й по чте ф а йл с р а стр о во й че р но б е ло й ка р ти нко й, в ко то р о й на и ме не е зна ча щ и й б и т (мла дши й) в ко де яр ко сти ка ж до й то чки и зо б р а ж е ни я б уде т э ле ме нто м та йно го со о б щ е ни я. П о луча те ль и звле че т все э ти б и тыи со ста вляе ти з ни х и схо дно е со о б щ е ни е . Ка р ти нка пр и сутствуе тто лько «для о тво да гла з».
П о а на ло ги и с кр и пто си сте мо й вво дят те р ми н сте го си сте ма . Сте го си сте ма — э то со во купно сть ср е дств и ме то до в для ф о р ми р о ва ни я скр ыто го ка на ла пе р е да чи и нф о р ма ци и .
о тп р а витель ко нте йне р ы
п о луча тель
В стр а и ва ни е ши ф р о ва ни е .... и сх. со о б щ . Сте го -клю ч (о ткр ытый и ли се кр е тный)
сте го ка на л и звле че ни е р а сши ф р о вка со о б щ е ни е , встр о е нно е в ко нте йне р
Сте го -клю ч (о ткр ытый и ли се кр е тный)
пусто й ко нте йне р
.... В о сста но вле нно е со о б щ е ни е
Н а р и сунке по ка за на мо де ль о б о б щ е нно й сте го си сте мы. П р и пр о е кти р о ва ни и лю б о й сте го си сте мына до учи тыва ть сле дую щ и е тр е б о ва ни я: 1) Х а ке р и ме е т по лно е пр е дста вле ни е о сте го си сте ме , де та лях е е р е а ли за ци и и е ди нстве нна я и нф о р ма ци я е му не и зве стна я э то клю ч, с по мо щ ью ко то р о го то лько е го де р ж а те ль мо ж е т уста но ви ть фа кт п р исутствия и со де р ж а ни е скр ыто го со о б щ е ни я. 2) Е сли пр о ти вни к ка ки м-то о б р а зо м узна е т о ф а кте сущ е ство ва ни я скр ыто го со о б щ е ни я — э то не до лж но по зво ли ть е му и звле чь по до б ные со о б щ е ни я в др уги х да нных до те х по р , по ка клю ч хр а ни тся в та йне . 3) П о те нци а льный ха ке р до лж е н б ыть ли ше н ка ки х-ли б о те хни че ски х и и ных пр е и мущ е ств в р а спо зна ва ни и и ли р а скр ыти и со де р ж а ни я та йных со о б щ е ни й. В сте го си сте ме по д и схо дным со о б щ е ни е м на р и сунке по ни ма е тся лю б а я и нф о р ма ци я: те кст, и зо б р а ж е ни е , а уди о да нные и т.п. В сте го си сте ме сущ е ствую т два о сно вных ти па ф а йло в: сообщ е ние -ф а йл для скр ыти я и конте йне р -ф а йл для встр а и ва ни я в не го со о б щ е ни я. Со о б щ е ни е встр а и ва е тся в ко нте йне р спе ци а льным пр о гр а ммным о б е спе че ни е м. Ко нте йне р — лю б а я и нф о р ма ци я пр е дна зна че нна я для со кр ыти я та йных со о б щ е ни й. Да нные ко нте йне р а до лж ныб ыть до ста то чно шумными , что б ыне б о льши е и зме не ни я в и х б е спо р ядо чно сти не мо гли б ыть за ме че ны. В ыб о р ко нте йне р а сущ е стве нно вли яе т на де ж но сть все й сте го си сте мы и во змо ж но сть о б на р уж е ни я ф а кта пе р е да чи скр ыто го со о б щ е ни я. Н а пр и ме р о пытный гла з це нзо р а с худо ж е стве нным о б р а зо ва ни е м ле гко о б на р уж и т и зме не ни я цве то во й га ммы пр и вне др е ни и со о б щ е ни я в р е пр о дукци ю «М а до нны» Ра ф а э ля и ли «че р но го ква др а та »М а ле ви ча . В о змо ж нысле дую щ и е ва р и а нтыко нте йне р о в: 1) Ко нте йне р ге не р и р уе тся са мо й сте го си сте мо й 2) Ко нте йне р выб и р а е тся и з не ко то р о го мно ж е ства ко нте йне р о в
3) Ко нте йне р по ступа е ти звне 4) Ко нте йне р по луча е тся с по мо щ ью мо де ли р о ва ни я шумо вых ха р а кте р и сти к П о пр о тяж е нно сти ко нте йне р ыб ыва ю т: 1) Н е пр е р ывные (по то ко вые ). Н а пр и ме р , по то к не пр е р ывных да нных, по до б ный ци ф р о во й те ле ф о нно й связи 2) О гр а ни че нно й (ф и кси р о ва нно й) дли ны. Н а пр и ме р , ф а йл по до б ный р а стр о во му и зо б р а ж е ни ю . Для по то ко во го ко нте йне р а тр удно о пр е де ли ть мо ме нты на ча ла скр ыто го со о б щ е ни я. Н е о б хо ди ма си нхр о ни за ци я б и т ко нте йне р а с б и та ми со о б щ е ни я. Н а пр и ме р , е сли по то к да нных ко нте йне р а ча сто пр е р ыва е тся и вно вь о ткр ыва е тся (па узыр е чи — нуле во й о тсче т о ци ф р о вки ), то та йно е со о б щ е ни е мо ж е тна чи на ться ср а зу по сле о дно го и з ни х. Ко нте йне р ф и кси р о ва нно й дли ны (на пр и ме р , р и суно к) си нхр о ни зи р уе тся с со о б щ е ни е м э ле ме нта р но , но ча сто е го о б ъе ма не до ста то чно для встр а и ва е мо го со о б щ е ни я. О б щ и й не до ста то к-пр о б ле ма — э то р а ссто яни е ме ж ду скр ыва ю щ и ми б и та ми ко нте йне р а , т.е . б и та ми ко нте йне р а , на ме сто ко то р ых вне др яю тся б и тысо о б щ е ни я: •
пр о сто й случа й: р а ссто яни е ме ж ду скр ыва ю щ и ми б и та ми = const
•
лучше , ко гда р а ссто яни я ме ж ду скр ыва ю щ и ми б и та ми псе вдо случа йны и р а спр е де ле ны р а вно ме р но ме ж ду са мым ко р о тки м и са мым дли нным за да нными р а ссто яни ями . О дна ко «и сти нный» случа йный шум и ме е т э кспо не нци а льно е р а спр е де ле ни е дли н и нте р ва ло в. на де ж но сть Сф о р ми р о ва ть та ко е псе вдо случа йно е р а спр е де ле ни е сли шко м тр удо е мко . Н а пр а кти ке ча щ е и спо льзую т до ступные и О б ъе м ко нте йне р а = const р а спр о стр а не нные ко нте йне р ы ф и кси р о ва нно й дли ны. о б ъе м со о б щ е ни я
Для та ки х ко нте йне р о в и ме е т ме сто э кспо не нци а льна я за ви си мо сть ме ж ду на де ж но стью скр ыти я и о б ъе мо м
со о б щ е ни я. П о д сте га но клю чо м по ни ма е тся се кр е тный э ле ме нт (спо со б , а лго р и тм), ко то р ый о пр е де ляе тза не се ни я со о б щ е ни я в ко нте йне р . П о а на ло ги и с кр и пто гр а ф и е й сте го си сте мыде лятпо ти пу сте го клю ча на два ви да : 1) С се кр е тным сте га клю чо м, ко гда и спо льзуе тся о ди н клю ч, для встр а и ва ни я и и звле че ни я, ко то р ый о пр е де ле н, ли б о до на ча ла о б ме на се кр е тными скр ытыми со о б щ е ни ями , ли б о пе р е да н по за щ и щ е нно му ка на лу связи . 2) С о ткр ытым клю чо м, ко гда для во сста но вле ни я и и звле че ни я со о б щ е ни я и з ко нте йне р а и спо льзую тся р а зные клю чи , ко то р ые р а зли ча ю тся та к, что с по мо щ ью вычи сле ни й не во змо ж но выве сти о ди н клю ч и з др уго го . П о э то му о ди н клю ч (о ткр ытый) мо ж но пе р е да ть сво б о дно по не за щ и щ е нно му ка на лу связи . Э та схе ма хо р о шо р а б о та е ти пр и вза и мно м не до ве р и и о тпр а ви те ля и по луча те ля. Сте го си сте ма мо ж е т и ме ть не ско лько ур о вне й за щ и ты с со о тве тствую щ и ми клю ча ми . Н а пр и ме р : Со о б щ . → ко нте йне р ⇒ … . Со о б щ . → ко нте йне р → ко нте йне р ⇒ … .
Со о б щ . → ко д → ко нте йне р ⇒ … . Со о б щ . → ко д → кр и пто ши ф р → ко нте йне р ⇒ … . и т.п. Сте го си сте ма до лж на о тве ча ть сле дую щ и м тр е б о ва ни ям: 1) для о б е спе че ни я б е спр е пятстве нно го пр о хо ж де ни я сте го со о б щ е ни я по ка на лу связи о но ни ка к не до лж но пр и вле чь вни ма ни е а та кую щ е го (це нзо р а , ха ке р а , зло умышле нни ка ). П о э то му сво йства ко нте йне р а до лж ны б ыть мо ди ф и ци р о ва ны та к, что б ы и зме ни в не сущ ую и нф о р ма ци ю со о б щ е ни я па р а ме тр а не во змо ж но б ыло выяви ть пр и ви зуа льно м ко нтр о ле . 2) В хо де пе р е да чи со о б щ е ни я (ко нте йне р (звук, и зо б р а ж е ни е и ли др .) мо ж е т тр а нсф о р ми р о ва ться: уме ньша ться и ли уве ли чи ва ться, пр е о б р а зо выва ться в др уго й ф о р ма т и т.п., а та кж е б ыть сж а т, и да ж е а лго р и тмо м сж а ти я с по те р е й да нных. П оэ то му сте го си сте ма до лж на б ыть усто йчи ва к и ска ж е ни ям, в то м чи сле и зло на ме р е нным. 3) Для со хр а не ни я це ло стно сти встр а и ва е мо го со о б щ е ни я сле дуе ти спо льзо ва ть ко д с и спр а вле ни е м о ши б о к 4) Для уве ли че ни я на де ж но сти встр а и ва е мо е не о дно кр а тно , и зме няя и пути сле до ва ни я.
со о б щ е ни е
сле дуе т пе р е да ва ть
Н а пр а вле ни я пр и ме не ни я сте га но гр а ф и и 1) Скр ыти е со о б щ е ни й (да нных). 2) Ц и ф р о вые «во дяные зна ки » для за щ и ты а вто р ски х и ли и мущ е стве нных пр а в на ци ф р о во е и зо б р а ж е ни е , ф о то гр а ф и и и др уги е о ци ф р о ва нные пр о и зве де ни я и скусства . О сно вные тр е б о ва ни я к «ци ф р о вым во дяным зна ка м»— на де ж но сть и усто йчи во сть к и ска ж е ни ям 3) За го ло вки для ма р ки р о ва ни я в б о льши х э ле ктр о нных хр а ни ли щ а х (б и б ли о те ка х) ци ф р о вых и зо б р а ж е ни й, а уди о - и ви де о ф а йло в, а та кж е и для и ных и де нти ф и ци р ую щ и х и нди ви дуа льных пр и зна ко в ф а йло в. В се ти Инте р не тсте го си сте мыа кти вно и спо льзую тся для р е ше ни я сле дую щ и х за да ч: 1) За щ и та ко нф и де нци а льно й и нф о р ма ци и о т Н СД. Н а пр и ме р , 1 се к о ци ф р о ва нно го звука с ча сто то й ди скр е ти за ци и 44,1 кГц и ур о внями о тсче то в 8 б и т в сте р е о р е ж и ме по зво ляе т скр ыть за ме но й мла дши х р а зр ядо в о тсче то в 10 Кб а йт за щ и щ е нно й и нф о р ма ци и . Э то 3 стр а ни цы те кста (42 стр о ки по 80 си мво ло в). П р и э то м и зме не ни я зна че ни й ци ф р о вых о тсче то в со ста вляе тме не е 1% и пр а кти че ски не о б на р уж и ва е тся пр и пр о слуши ва ни и б о льши нство м лю де й. 2) П р о ти во сто яни е по пытка м ко нтр о ля на д и нф о р ма ци о нным пр о стр а нство м пр и пр о хо ж де ни и и нф о р ма ци и че р е з се р ве р ы упр а вле ни я ло ка льных и гло б а льных вычи сли те льных си сте м. 3) Ка муф ли р о ва ни е пр о гр а ммно го о б е спе че ни я по д ста нда р тные пр о гр а ммные пр о дукты (на пр и ме р , те ксто вые р е да кто р ы и ли со кр ыти е в ф а йла х мульти ме ди а ко мпью те р ных и гр ) для пр е до твр а щ е ни я и спо льзо ва ни я П О не за р е ги стр и р о ва нными по льзо ва те лями . 4) За щ и та а вто р ско го пр а ва «ци ф р о во й во дяно й зна к». Т о лько спе ци а льна я пр о гр а мма и звле ка е т и нф о р ма ци ю : ко гда со зда н ф а йл, кто вла де е т а вто р ски м пр а во м, ка к вступи ть в ко нта ктс а вто р о м и др . О сно вные по ло ж е ни я со вр е ме нно й ко мпью те р но й сте га но гр а ф и и
1) М е то дыскр ыти я до лж ныо б е спе чи ва ть а уте нти ф и ка ци ю и це ло стно сть ф а йла . 2) П р е дпо ла га е тся, что пр о ти вни ку по лно стью и зве стныво змо ж ные сте го ме то ды. 3) Бе зо па сно сть ме то до в о сно выва е тся на со хр а не ни и сте го -пр е о б р а зо ва ни е м о сно вных сво йств о ткр ыто го пр е да ва е мо го ф а йла -ко нте йне р а пр и вне се ни и в не го се кр е тно го со о б щ е ни я с по мо щ ью не ко то р о й не и зве стно й пр о ти вни ку и нф о р ма ци и -клю ча . 4) Да ж е е сли ф а кт со кр ыти я ста л и зве сте н пр о ти вни ку че р е з со о б щ ни ка , все р а вно и звле че ни е са мо го се кр е тно го со о б щ е ни я пр е дста вляе тсло ж ную вычи сли те льную за да чу.
6.5. М ет оды к ом п ьют ер ной ст ега ногр а ф ии О б щ и е п р и нци п ы 1) В ка че стве но си те ля (ко нте йне р а ) скр ыто й и нф о р ма ци и до лж е н выступа ть о б ъе кт (ф а йл) до пуска ю щ и й для со б стве нно й и нф о р ма ци и и ска ж е ни я, не на р уша ю щ и е е го ф ункци о на льно сть и суть. 2) В не се нные вне др е нным со о б щ е ни е м и ска ж е ни я до лж ны б ыть ни ж е ур о вня чувстви те льно сти ср е дств р а спо зна ва ни я (че ло ве ко м и ли те хни ко м) ф а йла скр ыти я. 1 ме тод. Испо льзо ва ни е за р е зе р ви р о ва нных для р а сши р е ни я по ле й ко мпью те р ных ф о р ма то в да нных. Ха р а кте р истика
П о ля р а сши р е ни я и ме ю тся во мно ги х мульти ме ди йных ф о р ма та х, о ни за по лняю тся нуле во й и нф о р ма ци е й и не учи тыва ю тся пр о гр а ммо й
Н е доста тки
Н и зка я сте пе нь скр ытно сти , пе р е да ча не б о льши х о гр а ни че нных о б ъе мо в и нф о р ма ци и
Пр е имущ е ства
П р о сто та и спо льзо ва ни я
2 ме тод. О ди н и з ме то до в спе ци а льно го ф о р ма ти р о ва ни я те ксто вых ф а йло в. Ха р а кте р истика
Испо льзо ва ни е и зве стно го сме щ е ни я сло в, пр е дло ж е ни й, а б за це в, и зме не ни е по ло ж е ни я стр о к и р а сста но вки сло в в пр е дло ж е ни и , что о б е спе чи ва е тся вста вко й до по лни те льных пр о б е ло в ме ж ду сло ва ми
(А ) Н е доста тки
Сла б а я пр о и зво ди те льно сть, пе р е да ча и нф о р ма ци и , ни зка я сте пе нь скр ытно сти
(Б) Пр е имущ е ства
П р о сто та и спо льзо ва ни я. Име е тся о пуб ли ко ва нно е пр о гр а ммно е о б е спе че ни е р е а ли за ци и ме то да
не б о льши х
о б ъе мо в
3 ме тод. Из спе ци а льно го ф о р ма ти р о ва ни я Ха р а кте р истика
В ыб о р о пр е де ле нных по зи ци й б укв (нуле во й ши ф р ). А кр о сти х — ча стный случа й ме то да (на пр и ме р , на ча льные б уквы ка ж до й стр о ки о б р а зую тсо о б щ е ни е . Ш и ф р Гр и б о е до ва ).
Н е доста тки
См. (А )
Пр е имущ е ства
См. (Б)
4 ме тод и з гр уппыспе ци а льно го ф о р ма ти р о ва ни я те кста . Испо льзо ва ни е спе ци а льных сво йств по ле й ф о р ма то в, не о то б р а ж а е мых на э кр а не . Ха р а кте р истика
Испо льзо ва ни е спе ци а льных «не ви ди мых», скр ытых по ле й для о р га ни за ци и сно со к и ссыло к (на пр и ме р , и спо льзо ва ни е че р но го на че р но м ф о не ).
Н е доста тки
См. (А )
Пр е имущ е ства
См. (Б)
5-ы й ме тод. Скр ыти е в не и спо льзуе мых ме ста х ги б ки х ди ско в. Ха р а кте р истика
Инф о р ма ци я за пи сыва е тся в о б ычно не и спо льзуе мых ме ста х ГМ Д (на пр и ме р , в нуле во й до р о ж ке )
Н е доста тки
См. (А )
Пр е имущ е ства
См. (Б)
6-й ме тод. Испо льзо ва ни е и ми ти р ую щ и х ф ункци й (mimie function). Ха р а кте р истика
Ге не р а ци я те ксто в ка к со о б щ е ни я а кр о сти ха . Для та йно го со о б щ е ни я ге не р и р уе тся о смысле нный те кст, скр ыва ю щ и й са мо со о б щ е ни е .
Н е доста тки
См. (А )
Пр е имущ е ства
Ре зульти р ую щ и й те стне являе тся по до зр и те льным
7-й ме тод. У да ле ни е за го ло вка и де нти ф и ци р ую щ е го ф а йл Ха р а кте р истика
Скр ыва е мо е со о б щ е ни е ши ф р уе тся и у р е зульта та уда ляе тся и де нти ф и ци р ую щ и й за го ло во к. О ста ю тся то лько ши ф р о ва нные да нные . П о луча те ль за р а не е зна е т о пе р е да че со о б щ е ни я и и ме е т не до ста ю щ и й за го ло во к.
Н е доста тки
П р о б ле ма со кр ыти я р е ша е тся то лько ча сти чно . Н е о б хо ди мо за р а не е пе р е да ть ча сть и нф о р ма ци и по луча те лю
Пр е имущ е ства
П р о сто та р е а ли за ци и . М но ги е ср е дства (White Noise Storm, S-Tools) о б е спе чи ва ю тр е а ли за ци ю э то го ме то да с PGP-а лго р и тмо м.
Г р уп п а м ето до в и сп о льз о в ани я и з б ы то чно сти ауди о - и в и з уально й и нф о р м аци и . 8-й ме тод. Испо льзо ва ни е и зб ыто чно й ци ф р о во й ф о то гр а ф и и , ци ф р о во го ви де о (C) Ха р а кте р истика
М ла дши е р а зр яды ци ф р о вых о тсче то в со де р ж а т о че нь ма ло по ле зно й и нф о р ма ци и . Их за по лне ни е до по лни те льно й и нф о р ма ци е й пр а кти че ски не вли яе тна ка че ство во спр и яти я, что и да е тво змо ж но сть скр ыти я ко нф и де нци а льно й и нф о р ма ци и
(D) Н е доста тки
До по лни те льна я и нф о р ма ци я и ска ж а е т ста ти сти че ски е ха р а кте р и сти ки ци ф р о вых по то ко в. Для сни ж е ни я ко мпр о ме ти р ую щ и х пр и зна ко в тр е б уе тся ко р р е кци я ста ти сти че ски х
ха р а кте р и сти к. (E) Пр е имущ е ства
В о змо ж но сть скр ыто й пе р е да чи б о льшо го о б ъе ма и нф о р ма ци и . В о змо ж но сть за щ и ты а вто р ско го пр а ва , скр ыто го и зо б р а ж е ни я то р го во й то ва р но й ма р ки , р е ги стр а ци о нных но ме р о в и т.п.
9-ы й ме тод. Испо льзо ва ни е и зб ыто чно сти ци ф р о во го звука . Ха р а кте р истика
См. (C)
Н е доста тки
См. (D)
Пр е имущ е ства
См. (E)
7. Кр и п то ф о ни я – з ащ и та р ечев ы х со о б щ ени й 7.1. М ет оды обесп ечения ск р ыт ност и п ер еговор ов п о нез а щищенным к а на ла м связ и В на сто ящ е е вр е мя и зве стны тр и о сно вных ме то да за щ и ты (за кр ыти я) те ле ф о нных р е че вых со о б щ е ни й: а на ло го во е скр е мб ли р о ва ни е си гна ла р е чи , ци ф р о во е скр е мб ли р о ва ни е , ко мб и ни р о ва нно е : а на ло го во е скр е мб ли р о ва ни е и ма ски р о ва ни е р е чи за гр а ди те льно й по ме хо й. Кэ ти м устр о йства м пр е дъявляю тся сле дую щ и е тр е б о ва ни я. − У кла дка спе ктр а скр е мб ли р о ва нно го си гна ла р е чи в по ло су ча сто тста нда р тно го ка на ла связи . − Со хр а не ни е р а зб о р чи во сти р е чи по сле о пе р а ци и за щ и ты. − У де р ж а ни е о пр е де ле нно й кр и пто усто йчи во сти си сте мыза щ и тыпр и выпо лне ни и двух пр е дыдущ и х усло ви й. А на логовы й скр е мбле р ф о р ми р уе т и нве р си ю спе ктр а р е чи та к, что Н Ч -со ста вляю щ и е спе ктр а пр е о б р а зуе тся в высо ко ча сто тные со ста вляю щ и е и на о б о р о т. Стр уктур на я схе ма а на ло го во го скр е мб ли р о ва ни я/де скр е мб ли р о ва ни я по ка за на на р и с 1, а пр е о б р а зо ва ни я спе ктр о в – на р и с 2. Т а ки е устр о йства ши р о ко пр и ме няли сь с сво е вр е мя в по ли ци ях СШ А для связи с по дви ж ными па тр улями . О дна ко р а зб о р чи во сть р е чи по сле дво йно го пр е о б р а зо ва ни я спе ктр а не пр е выша ла 65%. П р и нци пи а льна я схе ма устр о йства пр и ве де на в [А ндр и а но в А . М . и др . «Ш пи о нски е штучки » и устр о йства за щ и ты о б ъе кто в и и нф о р ма ци и . Спр а во чно е по со б и е –: М . Л а нь, 1996 г.]. Ц ифр овой скр е мбле р пр о и зво ди т о ци ф р о вку по сле дую щ и м ши ф р о ва ни е м/де ши ф р о ва ни е м.
вхо д
П Ф 300… 3000 Гц
Сме си те ль
3600… 6300 Гц
3000… 300 Гц 3300 Гц
р е че во го
а на ло го во го
П Ф 300… 3000 Гц
3000… 300 Гц
си гна ла
ши ф р
Ге не р а то р (клю ч)
ши ф р
П Ф 300… 3000 Гц
Сме си те ль
Ге не р а то р 3300 Гц
6,3 кГц… 3,6 кГц 0,3 кГц… 3 кГц
П Ф 300… 3000 Гц
П Ф – п о ло со во й фильтр Ри с. 1
300… 3000 Гц Де ши ф р о ва нна я р е чь
с
вхо д ши ф р а
Ш ифр о ва н ие
вхо д
Дешифр о ва н ие
f, Гц 300 сме си те ль
f, Гц
3000
300 сме си те ль
3000
f, Гц П Ф
300
3000 3600 3300
300
3000
f, Гц
6300
П Ф
300
3000 3600 3300
300
3000
f, Гц
6300
f, Гц Ри с. 2
Ри с. 3 – стр уктур на я схе ма ци ф р о во го скр е мб ли р о ва ни я.
ЦО вхо д
П Ф (300… 3000) Гц
А ЦП
мо де м
ци ф р о во й ко де р (скр е мб ле р )
мо де м
ши ф р (по то к 0 и 1)
ге не р а то р клю ча
клю ч ши ф р о ва ни я
ши ф р
SK
ци ф р о во й де ко де р (де скр е мб ле р )
ЦА П
П Ф (300… 3000) Гц
де ши ф р о ва нна я р е чь
клю ч ко ди р о ва ни я/де ко ди р о ва ни я
ге не р а то р клю ча
Ри с. 3
А Ц П – а на ло го -ци ф р о во й пр е о б р а зо ва те ль. Ц О – ци ф р о вые о тсче тыа на ло го во го си гна ла р е чи SK – ци ф р о во й ши ф р на выхо де ср е мб ле р а М о де м – устр о йство , ф о р ми р ую щ е е (пе р е ко ди р ую щ е е ) си гна л SK в си гна л о пти ма льный для ли ни и связи , мо де м мо ж е т о тсутство ва ть пр и не по ср е дстве нно й пе р е да че SK на ли ни ю связи . Клю ч ши ф р о ва ни я – на ча льно е N-б и то во е сло во на б а зе ко то р о го ге не р а то р клю ча ф о р ми р уе тM-б и то вый клю ч для скр е мб ле р а .
Стр уктур ная схем а ко м б и ни р о в анно го скр ем б ли р о в ани я Ге не р а то р ча сто т ве р хне го по дди а па зо на Ф НЧ 3000 Гц
сме си те ль вхо д
ци ф р о во й ф и льтр
300… FSP FSP… 3000
сме си те ль
ши ф р
Ф НЧ 3000 Гц
сме си те ль
Ге не р а то р ча сто т ни ж не го по дди а па зо на Ри с. 4
Де ши ф р о ва ни е – та ж е схе ма .
В о ко дер ная схем а з акр ы ти я
В хо д s(t)
Ф НЧ
де ши ф р а то р
А ЦП
s(n)
Де ко де р па р а ме тр о в
В ыде ле ни е р е че вых па р а ме тр о в
: :
: :
си нте з р е чи
Ко де р па р а ме тр о в
ши ф р а то р ка на л связи
ЦА П
Ф НЧ
s(t)
Ри с. 5
М а скир овка а на ло го во го си гна ла р е чи за гр а ди те льно й по ме хо й. Иде я ма ски р о ва ни я си гна ла р е чи и мпульсными по ме ха ми (а е сть е щ е и ма ски р о вка шумо по до б ными си гна ла ми ) со сто и т в по сылке на ли ни ю связи , вме сте с а на ло го вым си гна ло м р е чи , ко р о тки х, по р ядка 0,3 мс и мпульсо в о тно си те льно б о льшо й а мпли туды ~2..3 В (пр и а мпли туде р е че во го си гна ла 0,3… 0,6 В ), с ча сто то й по вто р е ни я о ко ло 340 Гц и сква ж но стью не ме не е 10.
О сци лло гр а мма р е че во го си гна ла на те ле ф о нно й ли ни и с ма ски р ую щ е й по ме хо й
U0
t 0,3 мс
3 мс В о сста но вле нный р е че во й си гна л
U0
t Ри с. 6
П р и пр и е ме и мпульсыпо ме хи выр е за ю тся спе ци а льным устр о йство м. Т а к о б е спе чи ва е тся во сста но вле ни е р е че во го си гна ла б е з по ме хи , р и с 6. U0 – по сто янно е на пр яж е ни е на те ле ф о нно й ли ни и пр и по днято й те ле ф о нно й тр уб ке . П р а кти че ски на йде но , что по те р я и нф о р ма ци и и з-за выр е зки 1/10 ча сти пе р и о да и мпульсно й по ме хи пр и во ди т ли шь к не б о льшо му и ска ж е ни ю звуча ни я р е чи . В то ж е вр е мя и з-за мо щ но й по ме хи , «р о ко та »на слух, не во змо ж но р а спо зна ть р е чь со б е се дни ка . Т а ко й ва р и а нт ма ски р а то р а не о б ла да е т се р ье зно й кр и пто сто йко стью . Н о во змо ж ны ва р и а нтые е уве ли че ни я путе м скр е мб ли р о ва ня и мпульсо в по ме хи .
7.2. Пр им ер п р а к т ическ ой р еа лиз а ц ии п р ост ого ц иф р ового ск р ем блир ова ния/деск р ем блир ова ния сигна ла р ечи Н а р и с. 1 по ка за на стр уктур на я схе ма та ко го устр о йства . x(n) Ф НЧ 3000 Гц
Ге не р а то р та кто вых и мпульсо в
δмо дулято р
скр е мб ле р
c(n)
ка на лсвязи
A(n) c’(n) за де р ж ка D(n)=X(n)
ка на л связи
A(n) Ре ге не р а то р
де те кто р та кто вых и мпульсо в
де скр е мб ле р
δ-де мо дулято р (Ф Н Ч )
Ри с. 1
•
М – ми кр о ф о н
•
Ф Н Ч – ф и льтр ни ж ни х ча сто тс ве р хне й гр а ни чно й ча сто то й 3000 Гц
•
δ-мо дулято р – пр о сте йше е устр о йство о ци ф р о выва ни я а на ло го во го си гна ла р е чи (пр е дста вле ни е е го δ-ко до м)
•
x(n) – δ-ко д (де льта -ко д). n – по р ядко вый но ме р та кто во го и мпульса .
•
c(n) – скр е мб ли р о ва нный δ-ко д (ши ф р по ступа ю щ и й на ли ни ю связи ).
•
р е ге не р а то р – устр о йство во сста но вле ни я П -о б р а зно й ф о р мы си гна ла и з б и т ши ф р а , и ска ж е нных ли ни е й связи .
•
за де р ж ка – си нхр о ни зи р уе т о дно вр е ме нно сть по ступле ни я на де скр е мб ле р б и т пр и нято го ши ф р а c’(n) с во сста но вле нными та кто выми и мпульса ми A(n).
•
D(n)=x(n) – на выхо де де скр е мб ле р а по луча е м и схо дный δ-ко д.
•
δ-де мо дулято р – пр е о б р а зуе т δ-ко д в а на ло го вый си гна л р е чи . Ре а ли зуе тся пр о стым а кти вным Ф Н Ч 2-го по р ядка .
О дна и з во змо ж ных пр о стых пр и нци пи а льных схе м δ-мо дулято р а пр и ве де на на р и с. 2. 1
R1
U0
Σ
Us
С1
Us+U0 3
+5В
+5В
5 Uk
= U2 4
D
Q
C
Q
Uδ
δ-ко д
UT Ге не р а то р та кто вых и мпульсо в
R2 C2 Ри с. 2 UT
T t=nT
U
(Us+U0) U2
U0
U2δ
t
Uδ +5В 1 1 1 1 1 1 1 1 0 0 0 0 0 01 1 01 1 1 01 1 1 1
δ-ко д Uδь
U0
t
Ри с. 3
Н а р и с. 3 по ка за ныо сци о ло гр а ммыси гна ло в. 1 – а на ло го вый сумма то р 2 – устр о йство уср е дняю щ е е си гна л δ-ко да (и нте гр и р ую щ а я це по чка R1C1) 3 – ко мпа р а то р 4 – δ-де мо дулято р (и нте гр и р ую щ а я це по чка R2C2) 5 –D-тр и гге р
Us – а на ло го вый си гна л р е чи U0 – ср е дне е зна че ни е а мпли тудыUδm и мпульсо в δ-ко да . U2 – си гна л на выхо де δ-де мо дулято р а UT – и мпульсыта кто во го ге не р а то р а , за пи сыва ю щ и е по ло ж и те льные ф р о нты со сто яни е ко мпа р а то р а {‘0’,’1’}={0, 5 В } на выхо д Q D-тр и гге р а . ('0','1' – ло ги че ски е нуль и е ди ни ца ). Ко гда U2<(Us+U0), то Uk=’0’. Н а выхо д Q D-тр и гге р а за пи сыва е тся о че р е дным по ло ж и те льным ф р о нто м та кто во го и мпульса ло ги че ски й 0, а на ¯Q-ло ги че ска я 1 (т. е . +5 В ) и ве ли чи на U2 уве ли чи ва е тся на о ди н ша гU2δ. Т а к ф о р ми р уе тся си гна л δ-ко да Uδ, пр е дста вляю щ и й со б о й не стр уктур и р о ва нный («спло шно й») по то к б и т{0,1}, т. е . на р а зб и тый на б а йтыи ли сло ва .
7.3. Л огическ а я оп ер а ц ия XOR к а к шиф р ова ние (дешиф р ова ние) п от ок а бит . П усть {xi} – и схо дна я по сле до ва те льно сть по то ка б и т. x∈{0,1}. {.} – си мво л мно ж е ства . i – но ме р по по р ядку си мво ла x в по сле до ва те льно сти , {ci} – ко ди р о ва нна я (ши ф р о ва нна я, О пе р а ци я ко ди р о ва ни я
О б р а тна я о пе р а ци я де ко ди р о ва ни я
ci := xi XOR ci-1
yi := ci XOR ci-1
за ксо р е нна я) по сле до ва те льно сть. зде сь x, c, y ∈ {0,1} Ре а ли за ци я о пе р а ци й. a
Зде сь b
xi
=1
с
– сумма то р по мо дулю 2
ci
=1 T
T
=1
yi
T
о пе р а ци я ши ф р о ва ни я
ai
ci
c = a XOR b.
ai-1
о б р а тна я о пе р а ци я
– за де р ж ка и нф о р ма ци и на о ди н та кт
Н а пр и ме р , с по мо щ ью D-тр и гге р а . Зна че ни е «а » на вхо де D a за по ми на е тся тр и гге р о м на выхо де Q в мо ме нт пр и хо да на вхо д c по ло ж и те льно го пе р е па да та кто вых и мпульсо в. Н а р и сунка х схе м ти р е а ли за ци и ге не р а то р та кто вых и мпульсо в не по ка за н.
D
Q
C
П о ка ж е м, что yi = xi О б о зна чи м сумми р о ва ни е по мо дулю 2 – ⊕ Т о гда
ci = xi ⊕ ci-1
(1)
yi = ci ⊕ ci-1
(2)
Т . к.: yi = ci ⊕ ci-1 = xi ⊕ ci-1 ⊕ ci-1, а ci-1 ⊕ ci-1 = 0, то yi = xi
(3)
Или и на че (в о б щ е м случа е ): т. к. ci-1 = xi-1 ⊕ ci-2,
(4)
то , по дста вляя в (2) ве ли чи ны(1) и (4), по лучи м: yi=xi ⊕ ci-1 ⊕ xi-1 ⊕ ci-2. Н о и з (2) и ме е м ci-1 ⊕ ci-2 = yi-1 Сле до ва те льно : yi = xi ⊕ xi-1 ⊕ yi-1 П р ямо й по дста но вко й о че р е дных зна че ни й x и y не тр удно уб е ди ться, что выр а ж е ни я (5) и (3) э кви ва ле нтны. П р е о б р а зо ва ни е xi ⇒ yi мо ж но р а ссма тр и ва ть ка к ча стный случа й те о р и и ци ф р о вых ф и льтр о в для x и y – дво и чных чи се л и сумм по мо дулю два . Со гла сно те о р и и ци ф р о вых ф и льтр о в во зме м для выр а ж е ни й (1) и (2) Z-пр е о б р а зо ва ни е . с(z) = x(z) ⊕ c(z) ⋅ z-1 ⋅ y(z) = c(z) y(z) = c(z) ⋅ (1 ⊕ z-1) y ( z ) = x( z )
z
-1
x(z) = c(z) ⊕ c(z) ⋅ z-1 Т .к. о пе р а ци и сло ж е ни я и вычи та ни я по мо дулю 2 то ж де стве нны -1 x(z) = c(z) ⋅ (1 ⊕ z )
1 ⊕ z −1 1 ⊕ z −1
и по пр а ви лу сдви га Z-пр е о б р а зо ва ни я по луча е м yi=xi Со вме стную па р у о пе р а ци й XOR ко ди р о ва ни я/де ко ди р о ва ни я по лучи м и пр и взяти и до по лни те льно й о пе р а ци и о тр и ца ни я ¯ci ci := xi XOR ci-1
xi
xi := ci XOR ci-1
=1
ci
ci
¯ci
0
1
1
0
ci
¯ci
ci
Qi
=1 T T
xi
Т е пе р ь во зьме м вме сто о дно го э ле ме нта за де р ж ки не ско лько по сле до ва те льно со е ди не нных, т.е . р е ги стр сдви га , а вме сто о дно вхо до во й о пе р а ци и о тр и ца ни я –
xi
=1
ci
ci
=1
T
yi=xi
T ci-1
Qi
T
ЛП 1 Ni
T ci-2
T
T
Л П 2 Qi
Ni
ci-n RG1
RG2
ло ги че ски й пр е о б р а зо ва те ль (Л П ), и ме ю щ и й не ско лько вхо до в и о ди н выхо д Сно ва по лучи м со вме стную па р у устр о йств ко ди р о ва ни я/де ко ди р о ва ни я. Т а ки е устр о йства на зыва ю т скр е мб ле р а ми /де скр е мб ле р а ми . Л П удо б но р е а ли зо ва ть на ми кр о схе ма х па мяти (П ЗУ ), со де р ж а щ и х 2n яче е к. Т о гда Ni – а др е с i-то й яче йки . Qi – и нф о р ма ци я (0, 1) за пи са нна я в не й. Ф о р мула р а б о тыскр е мб ле р а . c i = x i ⊕ Qi Qi = φ(N) N = ci-1 + 2 ⋅ ci-2 + 22 ⋅ ci-3 + … + 2n-1 ⋅ ci-n N – де сяти чный э кви ва ле нтдво и чно го чи сла ci-1ci-2… ci-n (ci-1 – мла дши й р а зр яд) со сто яни я р е ги стр а сдви га RG1, являю щ е го ся а др е со м яче йки П ЗУ . Ита к, ci = xi ⊕ φ(RG1)
φ(N) = φ(RG1)
(6)
Для де скр е мб ле р а yi = ci ⊕ φ(RG1)
(7)
Е сли ф ункци и для Л П 1 и Л П 2 о ди на ко вы: φ(RG1) = φ(RG2), то выр а ж е ни я (6) и (7) а на ло ги чны(1) и (2). Со о тве тстве нно б уде м и ме ть и утве р ж де ни е yi = x i О со б е нно сти сво йств си сте мы скр е мб ле р /де скр е мб ле р в о б щ е м случа е с пр о и зво льно й та б ли це й па мяти Л П не и ссле до ва ны. П о лучи ли ши р о ко е р а спр о стр а не ни е и и ссле до ва ны сво йства си сте мы скр е мб ле р /де скр е мб ле р с Л П и з ли не йки сумма то р о в по мо дулю два . Н а пр и ме р :
Зде сь для сумма то р по о б о зна че н
+
+ T
T
T
T
+
на глядно сти мо дулю два
+ a
+
+
c = a XOR b
+ T
T
b
7.4. Ск р ем блер /деск р ем блер . Ра ссмо тр и м ци ф р о во й скр е мб ле р и де скр е мб ле р . Э то устр о йство для а ппа р а тно го ши ф р о ва ни я и р а сши ф р о вки по сле до ва те льно сти б и т и з нуле й и е ди ни ц. П р о сте йша я р е а ли за ци я пр е дста вляе тся в о б щ е м случа е схе ма ми и з n-р а зр ядно го р е ги стр а сдви га и 1≤m≤n сумма то р о в по мо дулю 2, р и с.1 и 2. вхо д Ki
+
Si
Si
выхо д L
+ 1
1 + + 2
R1 2
+ +
R2 + + n n Rn
Ри с. 1
Ри с. 2
Т а к ка к ло ги че ски е пе р е ме нные мо гут пр и ни ма ть то лько ко не чно е чи сло зна че ни й, в да нно м случа е {0, 1}, и на мно ж е стве э ти х чи се л о пр е де ле ныо пе р а ци и сло ж е ни я (XOR) и умно ж е ни я (AND), то и ме е м ча стный случа й по ля Га луа . Э то по ле о б ла да е т за ме ча те льным сво йство м: о пе р а ци я вычи та ни я в нём то ж де стве нна о пе р а ци и сло ж е ни я. П о ля (по сле до ва те льно сти ) б и т, на пр и ме р б а йт и ли сло во , удо б но р а ссма тр и ва ть ка к мно го чле ны. Н а пр и ме р , б а йт пр е дста вляе тся мно го чле но м 7-й сте пе ни , ка ж дый чле н ко то р о го со о тве тствуе тне нуле во му б и ту в б а йте :
(10010101) = 1*x7+0*x6 + 0*x5 + 1*x4 + 0*x3 + 1*x2 + 0*x1 + x0 = x7 + x4 + x2 + 1 . П р и ме не ни е мно го чле но в упр о щ а е т р а ссмо тр е ни е о пе р а ци й сдви га б и то вых по ле й. Би то во е по ле (по сле до ва те льно сть) по ступа е тна вхо д со ста р ше го чле на . Сдви гда нных в р е ги стр е в сто р о ну выхо да (ка к на р и с. 1) со о тве тствуе тумно ж е ни ю на x, а сдви гда нных в р е ги стр е в сто р о ну вхо да (ка к на р и с. 1) со о тве тствуе тде ле ни ю на x. Сво йства скр е мб ле р а и де скр е мб ле р а р а ссмо тр и м на пр и ме р е схе мы с тр ёхр а зр ядным р е ги стр о м и двумя сумма то р а ми , р и с. 3. вхо д Ki x
3
3
1
x
2
S i = V + Ki
+
R1 2
Si
+
V = R1 + R3
2
(1)
R 1 = Ki-1 R 3 = Ki-3
x1 1
3 R2
x0 0
R3
П усть на вхо д по ступа е тсло во и з пяти б и т(K4K3K2K1K0) на чи на я со ста р ше го б и та , где Ki = {0, 1}. Со ста ви м та б ли цу по та кто во й р а б о ты схе мы, со гла сно ло ги че ско му а лго р и тму (1), пр и ве дённо му на р и сунке . Н о ме р та кта
K
R1 R2 R3 V
S
0
K4
0
0
0
0
K4
→ x7
1
K4-1=K3 K4 0
0
K4
K4+K3
→ x6
2
K4-2=K2 K3 K4 0
K3
K3+K2
→ x5
3
K4-3=K1 K2 K3 K4 K2+K4 K4+K2+K1 → x4
4
K4-4=K0 K1 K2 K3 K1+K3 K3+K1+K0 → x3
5
K4-5=0
K0 K1 K2 K0+K2 K2+K0
→ x2
6
K4-6=0
0
K0 K1 K1
K1
→ x1
7
0
0
0
K0 K0
K0
→1
8
0
0
0
0
0
0
(… )
(… )
0
0
0
0
0
Ита к, вхо дно е сло во (чи та е м све р ху вни з со ста р ше го р а зр яда ): K(x) = K4K3K2K1K0 (2), В ыхо дно е сло во :
S(x) = K4K1K0 (3) Т о тж е са мый р е зульта т, но за ме тно пр о щ е и о б о б щ ённе е по лучи м на языке мно го чле но в. Н а вхо д по ступа е тсло во (мно го чле н): K(x) = K4*x4 + K3*x3 + K2*x2 + K1*x1 + K0 , где Ki = {0, 1}, ‘+’ – сумма по мо дулю 2. Э то сло во умно ж а е тся на мно го чле н, е ди ни чные б и ты ко то р о го о пр е де ляю тся то лько те ми си гна ла ми с р е ги стр а , ка ки е по да ю тся на сумма то р ы. Т а к ка к на пе р во е зве но р е ги стр а по да ётся ста р ши й б и т вхо дно го сло ва , то нуме р уе м си гна лы р е ги стр а (б и ты мно ж и те ля) сни зу вве р х, ка к по ка за но на р и сунке 3. Н а сумма то р ы по да ю тся то лько б и ты но ме р 0, 2, 3. Сле до ва те льно , мно го чле н б уде т и ме ть ви д: g(x) = 1*x3 + 1*x2 + 0*x + 1 = x3 + x2 + 1. Ита к: (K4*x4 + K3*x3 + K2*x2 + K1*x1 + K0)*(x3 + x2 + 1) = (K4*x7 + K3*x6 + K2*x5 + K1*x4 + K0* x3) + (K4*x6 + K3*x5 + K2*x4 + K1*x3 + K0* x2) + (K4*x4 + K3*x3 + K2*x2 + K1*x1 + K0) = K4*x7 + (K3 + K4)*x6 + (K2 + K3)*x5 + (K1 + K2 + K4)*x4 + (K0 + K1 + K3)*x3 + (K0 + K2)*x2 + K1*x + K0 = S(x) (5) В ыр а ж е ни е (5) со впа да е тс (3). Ита к, во о б щ е : выхо дно е сло во е сть пр о и зве де ни е вхо дно го сло ва (мно го чле на (4)) и мно го чле на x3 + x2 + 1 = g(x). S(x) = K(x)*g(x). Т е пе р ь р а ссмо тр и м схе му на р и сунке 4. + 1 + 2
3
В э то й схе ме мно го чле н L(x) е сть ча стно е о тде ле ни я мно го чле на вхо дно го сло ва S(x) на мно го чле н g(x) = x3 + x2 + 1: L(x) =
S(x) (8). g(x)
Э то не тр удно уви де ть, пр о ве дя а на ли з р и сунка 4 по до б но а на ли зу р и сунка 3. Инте р е сне е уб е ди ться в сле дую щ е м. П о да ди м на вхо д схе мы с р и с.4 сло во с выхо да схе мы с р и с.3. то гда по дста вляя (6) в (8) по лучи м: L(x) = K(x).
Сле до ва те льно , е сли схе му с р и с.3 и спо льзо ва ть ка к ши ф р а то р (скр е мб ле р ), то схе ма с р и с.4 и спо лняе тр о ль де ши ф р а то р а (де скр е мб ле р а ). Де йстви те льно , по де ли м «угло м»мно го чле н S(x) на мно го чле н g(x). О б о зна чи м: a 6 = K3 + K4 , a 5 = K2 + K3 , a4 = K1 + K2 + K4, a3 = K0 + K1 + K3, a 2 = K0 + K2 . Т о гда по лучи м: K4*x7+a6*x6+a5*x5+a4*x4+a3*x3+a2*x2+K1*x+K0 │
x3+x2+0*x+1 │ K4*x4+K3*x3 +K2*x2+K1*x1+K0
+ K4*x7+K4*x6+0*x5+K4*x4 │ K3*x6+K3*x5+0*x4│ +a3*x3 + K3*x6+K3*x5+0*x4+K3*x3
│ K2*x5+(K1+ K2)*x4+(K0+ K1)*x3│ +a2*x2 + K 2*x5+K2*x4+0*x3+K2*x2 │ K1*x4+(K0+ K1)*x3+ K0*x2│ +K1*x + K 1*x4+K1*x3+0*x2+K1*x │ K0*x3+K0*x2+0│ +K0 + K0*x3+K0*x2+0+K0 0+0+0 В схе ме де ле ни я ср а зу учте но , что ,на пр и ме р , a6 + K4 = K3 + K4 + K4 = K3 и та к да ле е , та к ка к зде сь р а б о та е та р и ф ме ти ка по ля Га луа , о пр е де лённа я для мно ж е ства {0, 1}, в ко то р о й о пе р а ци я вычи та ни я то ж де стве нна о пе р а ци и сло ж е ни я. А о пе р а ци я сло ж е ни я зде сь (на языке р а б о тыци ф р о вых схе м) е сть сло ж е ни е по мо дулю 2. Н а схе ме де ле ни я мно го чле но в «угло м» р а мо чка ми выде ле ны по сле до ва те льные ча сти чные о ста тки . В и ди м, что в да нно м случа е де ле ни е о сущ е стви ло сь б е з о ста тка , и ча стно е о тде ле ни я ка к р а з и е сть во сста но вле ни е вхо дно го для схе мыс р и с.2 сло ва K(x). В о б щ е м случа е для схе мы на р и сунке 4 по сле о ко нча ни я де ле ни я в яче йка х р е ги стр а б удутза пи са ныко э ф ф и ци е нтыо ста тка . Ка к ви дно и з ф о р мул (6) и (8), па р а схе м на р и сунка х 3 и 4 о б ла да е т с по зи ци и ши ф р а ци и /де ши ф р а ци и по сле до ва те льно сте й б и то вых сло в сво йство м пе р е ста но вки . Т о е сть, е сли и спо льзо ва ть схе му с р и с. 3 ка к скр е мб ле р , то гда схе ма с р и с.4 б уде т
де скр е мб ле р о м. И, на о б о р о т, е сли скр е мб ли р о ва ть и нф о р ма ци ю схе мо й с р и с.4, то схе му с р и с.3 мо ж но и спо льзо ва ть ка к де скр е мб ле р . О б р а ти м вни ма ни е на е щ ё два за ме ча те льных сво йства скр е мб ле р а и де скр е мб ле р а . 1) Е сли на вхо д скр е мб ле р а по сто янно по да ва ть ко нста нту (0 и ли 1) , то на выхо де по д де йстви е м та кто вых и мпульсо в сдви га б уде тге не р и р о ва ться псе вдо случа йна я по сле до ва те льно сть нуле й и е ди ни ц, о пр е де ляе ма я ко нф и гур а ци е й схе мы и на ча льным со сто яни е м р е ги стр а . Для за да ч ши ф р о ва ни я и нф о р ма ци и , че м дли нне е э та со б стве нна я псе вдо случа йна я по сле до ва те льно сть (да ле е б уде м го во р и ть «сло во скр е мб ле р а »), те м сло ж не е р а сши ф р о вка . 2) Стр уктур а скр е мб ле р /де скр е мб ле р о б ла да е т сво йство м са мо си нхр о ни за ци и . Е сли пр и вклю че ни и стр уктур ы скр е мб ле р /де скр е мб ле р , то е сть в на ча ле р а б о ты, р е ги стр скр е мб ле р а и р е ги стр де скр е мб ле р а о ка за ли сь в р а зных со сто яни ях, то по сле пр и ёма n по сле до ва те льных б и т (n р а вно и л ме ньше дли ны сло ва скр е мб ле р а ) р е ги стр де скр е мб ле р а о ка ж е тся в то м ж е со сто яни и , что и ме л р е ги стр скр е мб ле р а , и си гна л на выхо де де скр е мб ле р а на чнёт то чно по вто р ять си гна л на вхо де скр е мб ле р а .
Мо дели р о в ани е р аб о ты си стем ы скр ем б лер /дескр ем б лер . Ра ссмо тр и м о со б е нно сти си сте мыскр е мб ле р /де скр е мб ле р на пр и ме р е е ё мо де ли р о ва ни я с 3-х р а зр ядным р е ги стр о м сдви га . Н а р и сунка х 1-5 пр е дста вле ны все во змо ж ные ко нф и гур а ци и схе м, о пр е де ляе мые чи сло м и р а спо ло ж е ни е м сумма то р о в по мо дулю 2 о тно си те льно яче е к р е ги стр а . На э ти х схе ма х пр и ве де ны ло ги че ски е ф о р мулы р а б о ты и по р о ж да ю щ и й мно го чле н g(x), на ко то р ый де ли тся вхо дно е сло во скр е мб ле р а и умно ж а е тся выхо дно е сло во де скр е мб ле р а . Инте р е сно о тме ти ть, что стр уктур а на р и с.1 и зве стна пр о гр а мми ста м ка к о пе р а ци я ксо р ки /р а сксо р ки , ча сто пр и ме няе ма я для за тр удне ни я не са нкци о ни р о ва нно го чте ни я (вскр ыти я) сво и х пр о гр а мм. + + 1 T
+
+ T
T +
+ T
T
+
+ T
T
+
+ T
T
T
T
+
+ T
T
T
T
+
+ T
T
+
+ T
T
+
+ T
T
+
+ T
T
Н а йдём сло во скр е мб ле р а , то е сть псе вдо случа йную по сле до ва те льно сть (П СП ) б и т на выхо де Sn пр и Kn = const на вхо де , р а спи са в для э то го по та ктно со сто яни я р е ги стр а сдви га RG, на пр и ме р для схе мына р и с.4. П р и Kn = 0 и и схо дно м со сто яни и RG = 111 и ме е м: n
0 1 2 3 4 5 6 7
Sn
0 0 1 0 1 1 1
Sn-1 1 0 0 1 0 1 1 1 Sn-2 1 1 0 0 1 0 1 1 Sn-3 1 1 1 0 0 1 0 1 П о лучи м ма кси ма льную дли ну сло ва (23 - 1) = 7 б и т. S(n) = 0010111. Е сли взять Kn = 1, RG = 000, то по лучи м и нве р сно S(n) = 1101000. Для др уги х на ча льных усло ви й дли на сло ва скр е мб ле р а б уде тме ньше ма кси ма льно й.
Пр и нци п и альная схем а о п ы тно го м акета скр ем б лер а/дескр ем б лер а. =1
=1 =1
D
D
D
C
C
C
7.5. Сист ем а ск р ем блер /деск р ем блер со см енным сек р ет ным к лючом . Си гна л р е чи , о ци ф р о ва нный, на пр и ме р , δ -мо дулято р о м (р и с. 2 и 3, р а зде л 2.2.), мо ж но р а ссма тр и ва ть ка к не пр е р ывный по то к б и т. А ппа р а тно и пр о гр а ммно пр о стыми и де шёвыми спо со б а ми являю тся: 1) М е то д га мми р о ва ни я (р и с.1) с по мо щ ью сумма то р о в по мо дулю два и двух о ди на ко вых на пр и ёмно й и пе р е да ю щ е й сто р о не ге не р а то р о в П СП в ка че стве клю че й ши ф р о ва ни я и де ши ф р о ва ни я. П о то к б и тклю ча на зыва ю тга ммо й.
+ Ге не р а то р П СП клю ча
+ Ге не р а то р П СП клю ча
2) У стр о йства скр е мб ле р /де скр е мб ле р на б а зе р е ги стр а сдви га с о б р а тными связями на сумма то р а х па мо дулю два , р а ссмо тр е нных в р а зде ла х 2.4. и 2.5. Ко де к (устр о йство ко ди р о ва ни я/де ко ди р о ва ни я) о ци ф р о ва нно го си гна ла р е чи на б а зе схе мы с р и с.1 тр е б уе т, что б ы в р е а льно м вр е ме ни на ча ло ко ди р о ва ни я и на ча ло де ко ди р о ва ни я стр о го со впа да ли по ф а зе , с то чно стью до б и та по сле ка ж до й «ми кр о па узы»р е чи . Сдви г клю ча K о тно си те льно ши ф р о гр а ммы Ci все го на о ди н б и т пр и во ди т к по лно му на р уше ни ю пр о це сса де ко ди р о ва ни я на пр и ёмно й сто р о не , та к ка к ге не р а то р ыП СП пр и ёма и пе р е да чи не си нхр о ни зи р о ва ны. Э ту за да чу р е ша ю тс по мо щ ью сло ж но го и до р о го го , ка к пр о гр а ммно го , та к и а ппа р а тно го о б е спе че ни я. О дна ко ко де к р а б о та ю щ и й по схе ме с р и с.1 и ме е тне со мне нно е до сто и нство : на ли чи е се кр е тно го клю ча . Ко де к на б а зе р е ги стр а сдви га пр о сти дёше в и о б ла да е тсво йство м са мо си нхр о ни за ци и , за клю ча ю щ е мся в то м, что че р е з не ско лько та кто в (не б о льше чи сла р а зр ядо в р е ги стр а сдви га ) со сто яни я р е ги стр о в ши ф р а то р а и де ши ф р а то р а выхо дят на р е ж и м со впа де ни я, по сле че го уста на вли ва е тся но р ма льна я р а б о та ко де ка , ко гда yi = xi. О дна ко р а зли чных схе м о б р а тных связе й р е ги стр а сдви га не та к мно го . П о э то му, пе р е хва ти в ши ф р о гр а мму Ci на ли ни и связи , мо ж но вскр ыть ко нф и гур а ци ю скр е мб ле р а . Ра ссмо тр и м пр о сто й и де шёвый ко де к (скр е мб ле р /де скр е мб ле р ), р а б о та ю щ и й с се кр е тным клю чо м за пи са нным в ми кр о схе мыпа мяти П ЗУ 1 и П ЗУ 2 (р и с. 2). +
+
T
T
Ci-1
Ci-1 T
T
Ci-2
Ci-2 N2
N1
T
T
Ко ли че ство р а зли чных клю че й, ко то р ые мо ж но за пи са ть в П ЗУ с p-р а зр ядными а др е са ми о дно р а зр ядных яче е к па мяти , р а вно p
M=22
Н а пр и ме р , для p = 8 по лучи м: дли на клю ча M = 2256 = 1.15*1077. В р а зде ле 2.3 до ка за но , что для скр е мб ле р а /де скр е мб ле р а с клю чо м на П ЗУ выпо лняе тся р а ве нство yi = xi. До ка ж е м те пе р ь, что выпо лняе тся та кж е и сво йство са мо си нхр о ни за ци и . В о зьмём во змо ж ный а лго р и тм ф ункци о ни р о ва ни я мо де ли на ше й си сте мы.
1
ввод N1
2
ввод N2
3
ввод x
4
K1 := f(N1)
5
K2 := f(N2)
6
C := x XOR K1
7
y := C XOR K2
8
печать x, N1, C, N2, y
9
N1 := сдвиг RG1
10
N2 := сдвиг RG2
11
GO TO 3
Си сте ма во зб уж да е тся та кто выми и мпульса ми , ге не р а то р ко то р ых на пе р е да ю щ е й сто р о не и устр о йство выде ле ни я и х и з по луче нно го си гна ла на пр и ёмно й сто р о не на р и сунке не по ка за ны. Си сте ма о б ла да е т сво йство м са мо си нхр о ни за ци и , со сто ящ е м в то м, что че р е з не ко то р о е ко ли че ство та кто в со сто яни е р е ги стр о в ста но ви тся о ди на ко вым: N1i = N2i = Ni. Для по сле дую щ и х та кто в на ступа е тр а ве нство yi = xi для лю б ых клю че й, о ди на ко вых для пр и ёмни ка и пе р е да тчи ка : f(N1i) = f(N2i) (1) До ка ж е м э то . Де йстви те льно и з (1) выте ка е т, что на чнутсо впа да ть и б и тыклю че й: K1i = K2i = Ki. Со гла сно 6-7 стр о к а лго р и тма б уде м и ме ть: yi = Ci ⊕ Ki = xi ⊕ Ki ⊕ Ki. Н о та к ка к Ki ⊕ Ki = 0, то то по луча е м пр и са мо си нхр о ни за ци и yi = xi. Ко ли че ство та кто в не о б хо ди мых для выхо да на са мо си нхр о ни за ци ю о пр е де ляе тся р а зни це й в на ча льных со сто яни ях р е ги стр о в и ко ли че ство м р а зр ядо в в ни х. П усть RG и ме ю т p р а зр ядо в. Ра ссмо тр и м мно ж е ство по дгр упп мла дши х б и т дво и чно го чи сла N со сто яни я р е ги стр а , то е сть сле дую щ и е по дгр уппымла дши х б и т: (a0), (a1, a0), (a2, a1, a0), (a3, a2, a1, a0) и та к да ле е , где a∈ {0, 1}. О б о зна чи м б и тыр е ги стр а RG1 си мво ла ми ‘a’, б и тыр е ги стр а RG2 - си мво ла ми ‘b’. Т а к ка к пр и о пе р а ци и сдви га в р е ги стр а х в и х мла дши й б и т за пи сыва е тся о ди на ко ва я и нф о р ма ци я Ci ∈ {0, 1}, то во змо ж нысле дую щ и е случа и : 1) Е сли m мла дши х б и т, ка к на ча льных, та к и о че р е дных со сто яни й р е ги стр о в, со впа да ю т: am-1am-2… a1a0 = bm-1bm-2… b1b0, то ка ка я б ы и нф о р ма ци я Ci (ли б о 0, ли б о 1) ни за пи сыва ла сь б ы в мла дши й р а зр яд р е ги стр о в, по сле э то го та кта б удутсо впа да ть уж е m+1 мла дши х р а зр ядо в.
Н а пр и ме р : N1 = … x101, N1 = … x101, где х∈ {0, 1} – б е зр а зли чно ка ко й б и т; П о сле сдви га пр и Ci = 1 по лучи м: N1 = … x1011, N1 = … x1011 – со впа да ю тче тыр е мла дши х б и та , П о сле сдви га пр и Ci = 1: N1 = … x1010, N1 = … x1010 – со впа да ю тче тыр е мла дши х б и та . Сле до ва те льно че р е з (p – m) на чнётся по лно е со впа де ни е со сто яни й р е ги стр о в и в ка ж до м по сле дую щ е м та кте б уде тN1 = N2, не за ви си мо о то че р е дно го зна че ни я Ci.
i
2) Е сли в на ча льных со сто яни ях р е ги стр о в не т со впа де ни й для ка ж до й по дгр уппы мла дши х б и т, то е сть m = 0, то са мо си нхр о ни за ци я уста на вли ва е тся че р е з p та кто в. Н а пр и ме р , пусть p = 4, и пусть в RG1 на хо ди тся чи сло N1, а в RG2 - чи сло N2.то гда пр и о че р е дных сдви га х с пр о и зво льным Ci по лучи м: N2 Ci N1
0
1101
0010
1 1
1011
0101
2 0
0110
1010
3 1
1101
0101
4 1
1011 = 1011
Со впа де ни я на чи на ю тся на 4-о м та кте . Зде сь в и схо дно м со сто яни и N2 е сть и нве р си я N1: m = 0. I
Ci N1
N2
0
1011
0110
1 1
0110
1100
2 0
1100
1000
3 1
1001
0001
4 1
0011 = 0011
Со впа де ни я на чи на ю тся на 4-о м та кте . Зде сь все по дгр уппымла дши х б и тне со впа да ю т: m = 0. Ита к, пр и са мых не б ла го пр и ятных на ча льных со сто яни ях р е ги стр о в са мо си нхр о ни за ци я на ступа е тче р е з p та кто в. Ка к ви дно и з выше и зло ж е нно го , выхо д на са мо си нхр о ни за ци ю не за ви си т о т клю че во й по сле до ва те льно сти нуле й и е ди ни ц, за пи са нных в П ЗУ , е сли та б ли цы f(N1) и f(N2) со де р ж и мо го о б е и х П ЗУ о ди на ко вы.
В ы б о р клю ча. Кр и те р и и выб о р а клю ча ди ктую тся то лько за да че й за тр удни ть е го вскр ыти е ха ке р о м. С э то й по зи ци и к клю чу пр е дъявляю тся сле дую щ и е тр е б о ва ни я:
1) Ч е м дли нне е клю ч, те м лучше . Н а пр и ме р , пр и p = 11 не тр удно р е а ли зо ва ть скр е мб ле р /де скр е мб ле р на де шёвых М С: К555Т М 9 - р е ги стр ыи К573РФ 2 – П ЗУ . 2) Для то го , что б ы ста ти сти че ски й а на ли з по то ка б и т Ci не да л ха ке р у ка ко й-ли б о по ле зно й и нф о р ма ци и , сле дуе т выб и р а ть по сле до ва те льно сть б и т клю ча , о б ла да ю щ ую тр е мя и зве стными сво йства ми «хо р о ше й» псе вдо ха о ти чно сти (см. р а зде л3). 3) Х а ке р у и зве сте н то лько пе р е хва че нный по то к б и т Ci. Ста ти сти че ски й а на ли з ка ки х-ли б о гр упп э то го по то ка не пр и не сёт ха ке р у но во й и нф о р ма ци и , та к ка к ка ки х-ли б о о пр е де лённых гр упп б и т в по то ке Ci не сущ е ствуе т, и б о по то к б и т Ci сф о р ми р о ва н и з не стр уктур и р о ва нно го по то ка б и т δ -мо дулято р а р е чи с по сле дую щ е м е го скр е мб ли р о ва ни е м клю чо м. О дна ко ха ке р у и зве стно , что в па уза х р е чи δ -мо дулято р выда ёт пе р и о ди че ски й си гна л че р е до ва ни я нуле й и е ди ни ц. Т о гда в выхо дно м по то ке б и т Ci по явятся пе р и о ди че ски по вто р яю щ и е ся гр уппы б и т не ко то р о й дли ны L, о пр е де ляе мо й ко нф и гур а ци е й клю ча . Сле до ва те льно , мо ж но вскр ыть L б и т клю ча (с то чно стью до и нве р си и ) с по мо щ ью о пе р а ци и о б р а тно й скр е мб ли р о ва ни ю . Х о тя L вскр ытых б и т б удут ка к-то р а ссе яны по все й дли не ши ф р а . Ч е м ме ньше L, те м хуж е для ха ке р а . П о э то му, выб р а в клю ч, сле дуе т p пр о ве р и ть е го на мо де ли а лго р и тма , что б ы дли на L б ыла не б о ле е 2q . Ч е м б о льше q, те м хуж е для ха ке р а . О дна ко , да ж е пр и q = 2 по ло ви на б и т клю ча о ста не тся не вскр ыто й. В скр ыть е ё мо ж но то лько пр ямым пе р е б о р о м не вскр ытых б и т клю ча по кр и те р и ю по явле ни я на слух и з за щ и щ ённо го си гна ла пр о б ле ско в р е чи . Н а пр и ме р , пр и p = 11 дли на клю ча - 211 = 2048 (яче е к П ЗУ ), и ха ке р ы пр и дётся на слух пр о во ди ть пе р е б о р во змо ж ных клю че й по р ядка б о льше че м 2100 (100 ме ньше 2048, та к ка к «не и нте р е сные »клю чи и склю чи ли ). Ита к, тр е ти й кр и те р и й выб о р а клю ча за клю ча е тся в то м, что б ы дли на пе р и о ди че ско го сло ва , по являю щ е го ся в по то ке Ci ко гда на вхо д скр е мб ле р а по да ётся си гна л … 010101… , б ыла б ы, по кр а йне й ме р е , в не ско лько р а з ме ньше дли ныклю ча .
8. Сп и со к ли тер атур ы . 1. Со ко ло в А .В ., Сте па ню к О .М . «За щ и та о т ко мпью те р но го те р р о р и зма ». Спр а во чно е по со б и е . – СП б .: БХ В -П е те р б ур г; А р ли т2002 –496с. 2. М и ха э ль А . Бэ нкс «Инф о р ма ци о нна я за щ и та П К: пе р . с а нгл.». К.: В Е К+, М .: Э нтр о п, СП б .: Ко р о на – П р и нт2002. – 201с. 3. Ро ма не ц Ю .В ., Т и мо ф е е в П .А ., Ш а ньги н В .Ф . «За щ и та и нф о р ма ци и в ко мпью те р ных си сте ма х и се тях»(по д р е д. В .Ф . Ш а ньги на . – 2-е и зд., пе р е р а б . И до п.) М .: Ра ди о и связь, 2001 –376с. 4. Л е ви н М . «PGP: ко ди р о ва ни е и ши ф р о ва ни е и нф о р ма ци и с о ткр ытым клю чо м». М .: М а йо р , 2001. –176с. 5. Ба р и че в С.Г., Го нча р о в А .А ., Се р о в Р.Е . «О сно высо вр е ме нно й кр и пто гр а ф и и ». М .: Го р яча я ли ни я – Т е ле ко м, 2001 – 120с. 6. Ч мо р а А .Л . «Со вр е ме нна я пр и кла дна я кр и пто гр а ф и я». У че б но е по со б и е . – М .: Ге ли о с, 2001 –256с. 7. А лф ёр о в А .П ., Зуб о в А .Ю ., Кузьми н А .С., Ч е р ёмушки н А .В . «О сно вы кр и пто гр а ф и и : уче б но е по со б и е ». М .: Ге ли о с, 2001 – 980с. 8. «В ве де ни е в кр и пто гр а ф и ю »по д р е д. В .В . Я щ е нко . – СП б .: П и те р , 2001 – 288с. 9. Бр укши р , Гле н «В ве де ни е в ко мпью те р ные на уки »(о б щ и й о б зо р , 6-е и зда ни е , пе р . с а нгл.) – М .: «В и льямс», 2001 –608с. 10. М о лдо вян А .А ., М о лдо вян Н .А ., Со ве то в Б.Я . «Кр и пто гр а ф и я»(се р и я «У че б ни ки для В У Зо в. Спе ци а льна я ли те р а тур а ») – СП б .: «Л а нь», 2000 – 224с. 11. П е тр о в А .А . «Ко мпью те р на я б е зо па сно сть. Кр и то гр а ф и че ски е ме то ды за щ и ты». М .: ДМ К, 2000 – 448с. 12. Гунда р ь К.Ю ., Гунда р ь А .Ю ., Я ни ше вски й Д.А . «За щ и та и нф о р ма ци и в ко мпью те р ных си сте ма х». К.: «Ко р не йчук», 2000 –152с. 13. П .Н . Де вяни н, О .О . М и ха льски й, Д.И. П р а ви ко в, А .Ю . Щ е р б а ко в «Т е о р е ти че ски е о сно вы ко мпью те р но й б е зо па сно сти »(уче б но е по со б и е для В У Зо в) – М .: Ра ди о и связь, 2000 – 192с. 14. А ни н Б.Ю . «За щ и та ко мпью те р но й и нф о р ма ци и ». СП б .: БХ В – П е те р б ур г, 2000 – 344с. 15. А .В . До ма ше в и др . «пр о гр а мми р о ва ни е а лго р и тмо в за щ и ты и нф о р ма ци и » (уче б но е по со б и е ) – М .: «Н о ли дж », 2000 – 288с.