TEORIA DOS NÚMEROS E CRIPTOGRAFIA - 2003/04
António Machiavelo


Segunda 13/10:

O teste de Friedman.
Mini-programa em Maple para calcular índice de coincidência e fazer o teste de Friedman (disponível aqui).
O código ENIGMA: uma introdução, usando a página de Tony Sale, director do museu de Bletchley Park.

Exercício #2  (a entregar antes de 23/10/2003, de preferência por correio electrónico):
Decifrar o seguinte texto, sabendo que foi codificado com a cifra de Vigenère:

« uszhmgvgldwnbygwezhdgrbkiswrpsvinnokxbkouseyefxrhngeyptwvnaujeoyakmyli
jespcgybyfsebirshblsuvvaojfnpafsrvrwxehtghbirswvsdgtbcozyzplviqvnwkevdsqhshw
vflnkynsexiypzfefjivsnkerhrhggwgvdwqvsngzrjefxbzevsmlnsjngefhnhujmppdaeavajv
npadhrmejvnkakhvztjmgvdgqhuiumcpovivaatyahjgvtljeeqvejebwraqbnefmgvdwnbh
osqnkovishraerludeypadinsaeeqvdwjnyisnbygwezhdgifaenirtfgvghlwdnlmemyuonipl
nlsflngzrutsippnuschrssyhnuezlnlsqlavifjotieaaventejmphpwpbztmvpvsfsplnlvbkeusa
cefgblsxmyhswrbymwwqllwmgvrwwflfgvzhrsqchrsgbuswkhprshrkiuegvraeqvamxb
yohyosiusflnlmnxuwefhuviqllwrnvejentekqnhahifhrvetyafhrsuumqlzwgbusumrucaeq
vswychpwpqlekgeptgvrkaxmetereqvswyfvcaeypseshaohmpvauvrzcahbkemqbaiem
ftouszvfmxhyovsoyakmyxuwhrpxgygyafwchrwgrynswfbakiaarwzvztswwvryiflmhvr
hcjiqptgyavbjefplwrblsuvvaojfehsaprprgefbagfehegvrarsxbkemqchikuhlswhvgmghry
ngqnzdwyzhdazrysahnkeuyyaujeylngvzlfsgbjojsnzpspncrswqlfsfvvlmgnznszvzaggep
tagnkotvnzidnbygwezhdgxehbspuhcgqnjofxehpgwvjaglvztgvvjavsoyafgbwejeaaegrr
nrgibmejiplcgqbyektbztstbzilmihoaqrusgifausvvvdsqvzcakruauebuekwrhshipaogifjra
xbybsmnuokizwrwespreshjoelhtidhnkeiyrhpwrnzotwryvsznhshifzoswruagxvuhsteltw
rfhovirepdmphrswbjiwhnkeiynudgwrmadeahvswghotvnkosygvrdstvswgepamqnpms
krtdwqnnnaxhkevefwejwbuayiazfwqvuifefhpjsoseeegpcshntudlrybgrvaakiazuspgyaf
wtyekwbyawmeyeiyvltsuhlswifaatiylcwrbpmskvuajmbkoyvnudwthilagbseaxbypjmaj
iheytefxrhpsvgprvithbjmrsauvncowgnuedezplfsilcwrgvswgvuqmiaaawsvaohevzdggn
ynsznsmapavvwgrutgwrararghemqrhekxelispvaejeepavsrzcjmgvriyrjaemaoomtnyag
vbtafgrkeahrvlgkvhpgpvaiuepvmsthilagnjaghrjauehtidrbceuiaaokigyifxnltjifhgjeakeyy
vuaveqhvahnldssoyasqnkisrnzevepvmgeohnvsavdgtnytahbjoeyapslerkojszhnuiqlefkn
qaeiaaohsyptagbhotvnkebsenesqnkoheeaeheehuegnzaeiaaouszhajxrwrgtepaeiaaevm
ghekwrlnusaargislilspvmteflnswclrksahgwrfmeemapnswntudlrypswfvuswryowtvjefx
evdsrnyrsxvcastnytavqhcjmnjaghrnatvvllsuhlpgwglrasetefxrvlwznyisepyisvqvnsjyvrli
elssfnaikxnltaighdwrgyovecyotprtalmphdgvbtafgrtovieuotvnzidivyoyeoyiwpnaoeenzs
wrgvngqhudgjvjcasahlssyhdghrprsgrtakiaoojenlsuvncaawnbrsgnwilypvnuivjagizbilsf
vulvbzmaxbzqminmiugnvbjefplwmehcjmbbagpbugghbztwqcvsgwnzpwggvsdmepcgw
bhulsetuaxbieeiazaaeeheeqnymgvgvmapavvwgrutgwrararghekivzqmeakouvvvudmip
aeeflsgqrutwechrlmekeyeoyiwpnxuwsqpmwrfpofezlnlsqvfwqvuifsflfabnuojszhnuintav
mnuowegyanifkekwnvbjedbegwcvslyyhdgwcvlaxvjokwnvpgwgvsviyhdgtnyaveesuye
ehueerztjygbrsrnyrsxvcaeevzedeovrshnnatvvllsrbkiriekouvvaiuschudschekrnvdwmkh
dwwrylavvjahefaojiyhpgvrtdwyzhlavvjaesqlrfeqlsjszhnlmmhdstepnumchleiaaefsdbev
mmyektrptgebhshipaoksppadeboueselakegprsgbtpsvnyahvbaaysapslenbmstnztgvnlsw
qqbvahnwedephnvmqlziyrcikphtbjeqvaheelcaqrutghnwejwbuayizjoewrbpmieplvifsuef
ehmwrgvfwiepcghbjijgbtuaxbjoeyzuoeyakovepbllyehpgthsajzrqaesfjoesnwajiplgsfepe
decllstepmwmehvwdqpafxrkefeppbnifaiveqltjecvsemflrszrpsusolrleqltsqnuhswhqeavn
xuwiehietbzsazrsvwvyoeswsliusrzeveeshwmqhdwsfjatiyvsvifnrwruhdgwvtufhbzdwtbv
shifkekgnscgwavdwgbyrwvqhnsvehtaznhpjsghggrvztsipvmheehdsehtaxpbyrgwnyutvn
joegulijsqlcjeivpwvsbmwhrnatvvllsgbtokipvnkxnaaggbuvarplnlieladmftowqppruyaztsrp
pavmilrkeqvlavvzmgtnztgvrsakirciviajisvnjoesqlswrivlnmzlnlsqhnsvehtaznlswviprshrjo
fxehslirutjibsijmpvegwrusmeyxuwephbjmghdgwrytssrmrmxbkoskelslirwonsahoksbhm
gvqlnsgvipgvthbjmrsaliaaalvnusxsetadertueeqhmshnzoumrkaviflmjifblleqvseefhcaqnke
lyqvafeeyalmihcgrghazmfaojmnkadmolrveqldsgepalyehhmqnuauszvswvhuiusrpnvippfj
eillbeqpzaebjraxvjolvvztssqlallnfdweupslsepavercodyphoksppadhrplzihznssrztshvzsggv
hdshnoikxbyishnlvgphjagwbjispqlgsfepederuqmeaaoapulukwrnuwrnzusfepgstrsohsqlrs
xehvwwqvcgrsyofxbkokgbyofivzehsyptagbzqmielpjiflnlezvpswfhdgibmulyevgsfepedefl
gmiypvjizlnlipvmgqbjakizmaemypawjvshshbuavedbevifljseclnswbztsxhzdwezhnlintave
rjojxrqaveflmiyrpsksphslvrhsmefldwhrsitiekavipvmgyapcsjbycswvutwxvgavsehdgwrb
ivinsdwzvkagxehtsqrutghnkossntojiznatvvllsgehvgiphnwpnzejzrzeehhcivechrsnhztajvja
jsubmgvrvejsgpsescyekiaaekrnvbjebwrgkelsksqlidlrbskmtuixmphohvbnrwwfvdgxehts
qrutghnkohiyvhgqrtaeyyoejinvaeseuojszhnuibzcswbzaesevsgwfholvnaavsfkeesqvektrji
sppvmwgnudgtbyoxiapsaenwaabbuavecllgmzwejeqvrhefzafhbwedsevmsrplpswfpofeyk
ekmaoarmaoawsftufhblvgphpnvspvmsxehiuebkeypbyisibwejhnvswqqbvahnlskidbavvbk
eyeylraeqlmmpulrwwipsleflmjiyhcssnvaesezeuszwlwxnyausztadzvuaxmyoavipvrgrrsq
mielnwknvdwwgpnghrtouephsshbprshrzaxmnudgsfwrwgbucwmgvswxbynsrqvswehuiu
eclrksahgwqdbewpniojehtanmfhouvvaiueqlskefvcaiqhdwmyoewrfldgwnuokzvutwzbsts
rqvayeoyiwpnhpjsghggrvztstrymsrrjeuszvueeclrksahgwqgllmvvjavivtefwbciysezefwhh
lfeahrjegpvsuhlnssflsmfzltweapnyyrtnwqflefuhhdjeahvwpuhomrnuonevshwyfhpwwnyd
gwrzfgvpvsviahcafrtqmielrlvnusxsetadenualyelzshrnatvvllsintaawnbtwrgpcshraovefhsh
iezofetlnkhbyoeeajeweglnlegpvshrtuveajalseuasyzhmggnarawgvnzerlnkmzlseeqhokxna
ukwbjispnkqmmepdgtrsouefhmwrgvnssglmgqrzmgznsojiyhbgvnkohiyhmgvnsbmvtbeke
bxuwprcagxretgezhdaeavamqspnspslladdbafhbhpwvfvnskrtdwmkhdwwrydsqnkakspp
eveqlensyaaswrysaqcsekwvtbgpbzepynsevrnjajpbzdweuvlsrqhpjsslsksehdsyapvwvfpd
shrlsleqbadhbjesvn »

Quinta 16/10:

Detalhes do funcionamento das máquinas ENIGMA, com extractos do filme do mesmo nome.