Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Skytale cipher

by turo (Friar)
on May 04, 2006 at 04:02 UTC ( #547337=note: print w/replies, xml ) Need Help??


in reply to Skytale cipher

Good Implementation :-) ...

Your scitale has a width (W) denoted by the number of lower cups characters the filename has, plus one.

Then, you use W arrays for storing each character from the plaintext; first character on the plaintext to the array[0], the second to the array1, and so on up to reach the arrayW-1, the next char to the first array[0], etc.

Cool!, i've made an implementation of this cipher (i like too much these topic) a long time ago (i do not remember where did i put it), but for sure my impl. was unobfuscated an i think i made W reads of the plaintext for encoding and decoding. Not too optimal, but easy to understand :-) (ummm... i don't rememeber if i've made it in perl ... or it was in awk? ... anyway)

perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://547337]
help
Chatterbox?
[Eily]: that was a sneeze overpowering a cough
[choroba]: Czechs sneeze "Hep-cheek"
vrk adds gingerbread cookies to the platter on the sideboard.
[erix]: I'll give that a try next time
vrk takes a cookie from the platter on the sideboard.
[Eily]: French sneeze "Atchoum", because we close our mouth when we're done :P
[erix]: Hatshepsut (no sneezing audio there)
choroba wipes the saliva from the cookies
[LanX]: scary Le Pen + Melonchon had over 40% ...
[vrk]: One good word for it in Finnish is pärskäys. A very wet connotation.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-04-24 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (442 votes). Check out past polls.