Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Kryptos

by Felonious (Chaplain)
on Jun 23, 2005 at 05:52 UTC ( #469296=obfuscated: print w/replies, xml ) Need Help??

If you are unfamiliar with Kryptos, it is a sculpture by James Sanborn located on the campus of the CIA headquarters, located in Langley, VA. (Usually off limits to the general public) The sculpture, made in the shape of a scroll, holds a series of four encrypted messages. Although the code was intended by Sanborn to be decrypted by hand, only three of the four passages have been deciphered, and those only through machine aided cryptoanalysis. Credit for breaking the first three keys belongs to Jim Gillogly.

The code below does not embody any "cracking" functionality, it contains decryption algorithms that require the keys to function. The first two messages are encoded by character replacement algorithms called a Vigenere cipher. The third is encrypted by keyed columnar transposition and route transposition. The encryption method(s) used on the fourth passage have yet to be determined.

$nl=qr;\r*\n\r*;;sub __($@){join$?[0],@?[1..$#_];}sub _($;$){split$?[0 +],$?[1]||$?;} $m=qq|KRYPTOS${*?=*_;|x2;$m=~s[$nl];;;%dkeys=map{$?=>$m=~ m/($_.{26})/ +;}@tr=_$*,$m; $/=$*;@parts=map{[_ $nl,$_] ;}_ '_', <DATA> ;$#="edrkpyt"; su +b dekrypt{@c= map{_$,}@{$_[0]};$n=@p=_$*, $_[1]; $=%=$=;return __ '', map { +m"[A-Z]"? $tr [index$dkeys{$p[$=++%$n ]}, $?]: $_;}@c;}$#=~s/(.)(.)/$2$1/g; +sub ::{$l=@c= reverse map {_ $,}@{$_[0]}; $k =@k=_ $*,$_[1];$g=$?[2];$__c=$ +g%$k;$d=($k-1 )-$__c;$_r=($l-($d*$__c)) / $k;$__r=$_r+$d;@cr=();$kc=__ '', + sort {$a cmp $b}@k;@i=map{index$kc,$_; } @k ;@__c=(@i)[0..($__c-1)];for$x( +0..($k -1) ){ if(grep{$_ == $x}@__c) {for (1.. $__r){$cr[$x].=shift@c;}}else +{ for(1..$_r) {$cr[$x].=shift@c;}}}@g =() ;$g_= int($l/$g)+($l%$g>0);foreac +h$r(0..($k-1) ){for($x=0;$x<length($cr[$r ]);$x+= $g_){push@{$g[$r]},substr( + $cr[$r], $x, $g_);}}$gc=int($__r/$g_)+ ( $__r%$g_> 0);@l=();foreach $c (0 . +. ($g_- 1)) { foreach $g__ (0 .. ($gc - 1) ){ foreach $r (@i) {@l [$c] .= substr $g[ +$r] [$g__],$c ,1;}}} $ct = __ '', @l ; $ct =~ s/^(.)(.*)/$2$1/; return $ct;} }ABCDEF +GHIJLMNQUVWXZ sub : {print ${#}->( $parts[0], uc "palimpsest"), "\n\n"; print ${#}- +>( $parts [1] , uc "abscissa" ) , "\n\n"; print :: ( $parts [2] , uc "kryptos", 86), + "\n\n" ; } ; __DATA__ EMUFPHZLRFAXYUSDJKZLDKRNSHGNFIVJ YQTQUXQBQVYUVLLTREVJYQTMKYRDMFD_ VFPJUDEEHZWETZYVGWHKKQETGFQJNCE GGWHKK?DQMCPFQZDQMMIAGPFXHQRLG TIMVMZJANQLVKQEDAGDVFRPJUNGEUNA QZGZLECGYUXUEENJTBJLBQCRTBJDFHRR YIZETKZEMVDUFKSJHKFWHKUWQLSZFTI HHDDDUVH?DWKBFUFPWNTDFIYCUQZERE EVLDKFEZMOQQJLTTUGSYQPFEUNLAVIDX FLGGTEZ?FKZBSFDQVGOGIPUFXHHDRKF FHQNTGPUAECNUVPDJMQCLQUMUNEDFQ ELZZVRRGKFFVOEEXBDMVPNFQXEZLGRE DNQFMPNZGLFLPMRJQYALMGNUVPDXVKP DQUMEBEDMHDAFMJGZNUPLGEWJLLAETG_ ENDYAHROHNLSRHEOCPTEOIBIDYSHNAIA CHTNREYULDSLLSLLNOHSNOSMRWXMNE TPRNGATIHNRARPESLNNELEBLPIIACAE WMTWNDITEENRAHCTENEUDRETNHAEOE TFOLSEDTIWENHAEIOYTEYQHEENCTAYCR EIFTBRSPAMHNEWENATAMATEGYEERLB TEEFOASFIOTUETUAEOTOARMAEERTNRTI BSEDDNIAAHTTMSTEWPIEROAGRIEWFEB AECTDDHILCEIHSITEGOEAOSDDRYDLORIT RKLMLEHAGTDHARDPNEOHMGFMFEUHE ECDMRIPFEIMEHNLSSTTRTVDOHW?_OBKR UOXOGHULBSOLIFBBWFLRVQQPRNGKSSO TWTQSJQSSEKZZWATJKLUDIAWINFBNYP VTTMZFPKWGDKZXTJCDIGKUHUAUEKCAR

-- So prophesied the shakespearean monkeys, and so it shall be.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://469296]
Approved by ghenry
Front-paged by diotalevi
help
Chatterbox?
[james28909]: i cannot understand how someone cant see that a cloud of gas that evolves into a solar system or galaxies. it just makes sense to me. everythign that has happened, had to have happened for anything on this planet to be.
[james28909]: /gas/gas and debris/
[james28909]: another thing, i used to be atheist. life experiences, personal evidence. and my own perception is the reason why i believe the things i do.
[erix]: and now you are agnostic?
[james28909]: arunbear, your picking bits of history to fit your own narrative. right now, humans are smarter than in any of those times.
[james28909]: in order for there to be a mutation, there has to be a universe with laws setup that even allow a mutation.
[james28909]: everything past the first two things you piked from my posts are irrelevant to me and my beliefs. they are side effects.

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (16)
As of 2017-12-15 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (433 votes). Check out past polls.

    Notices?