Feed aggregator

Programming Praxis: Chaocipher

Planet Scheme - Tue, 07/06/2010 - 10:00

In 1918, John Byrne invented a two-disk cryptographic machine, which he called a chaocipher; he drew up blueprints, but was unsuccessful in his efforts to sell the machine to the US Signal Corps and Navy. He left several challenge messages in his 1954 autobiography, but no one successfully deciphered the messages. Recently, following the death of Byrne’s son, the son’s widow donated Byrne’s complete archives, including a mock-up of the machine, to the National Cryptologic Museum at Fort Meade, Maryland. Last Friday, Moshe Rubin published the first public description of the chaocipher algorithm.

The algorithm uses two key sequences, one for cipher-text and one for plain-text. Encryption and decryption look up the desired character on one sequence and report the corresponding character on the other sequence, working from plain-text to cipher-text for encryption and from cipher-text to plain-text for decryption.

After each character, both sequences are permuted, each by a different method. Thus, the chaocipher is similar to an autokey cipher, because the key is modified according to the plain-text.

The left disk, which normally represents the cipher-text, is permuted in two steps. First, the entire alphabet is shifted left as far as cipher-text of the current character (so the current cipher-text character becomes the first character in the sequence), with the shifted-off portion of the sequence reattached at the end. Second, the second through fourteenth characters are shifted left one character, and cycled; the third character becomes the second, the fourth character becomes the third, and so on, until the fourteenth character becomes the thirteenth and the second character becomes the fourteenth. For instance, given the sequence HXUCZVAMDSLKPEFJRIGTWOBNYQ and the current character P, the entire sequence is shifted to bring P to the front, giving PEFJRIGTWOBNYQHXUCZVAMDSLK, then the second through fourteenth characters are shifted to move E after Q, giving PFJRIGTWOBNYQEHXUCZVAMDSLK. Byrne invented the terms zenith and nadir to represent the first and fourteenth characters, Rubin refers to zenith and zenith+13, but we’ll just call them by their ordinal positions in the sequence.

The right disk, which normally represents the plain-text, is permuted in three steps. First, the entire alphabet is shifted left as far as the plain-text of the current character (so the current plain-text character becomes the first character in the sequence), with the shifted-off portion of the sequence reattached at the end. Second, the first character is shifted to the end (so the current plain-text character becomes the last character in the sequence). Third, the third through fourteenth characters are shifted left one character, and cycled, similar to the left disk except for the different starting position. For instance, given the sequence PTLNBQDEOYSFAVZKGJRIHWXUMC and the current character A, the final sequence is VZGJRIHWXUMCPKTLNBQDEOYSFA.

Thus, the encryption of WELLDONEISBETTERTHANWELLSAID, given the above cipher-text and plain-text sequences, is OAHQHCNYNXTSZJRRHJBYHQKSOUJY.

Your task is to write functions that perform encryption and decryption according to the algorithm given above. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.


See Hot Sexy Star Aishwarya Nude Bathing Videos In All Angles

comp.lang.scheme - Tue, 07/06/2010 - 06:00
See Hot Sexy Star Aishwarya Nude Bathing Videos In All Angles.
At [link]
Due to high sex content, i have hidden the videos in an image. in
that
website on left side Above search box click on image and watch
videos in all angles.please dont tell to anyone.

NFL NBA MLB NHL copy jersey (http://www.cntrade09.com/ )

comp.lang.scheme - Mon, 07/05/2010 - 00:00
2010 south africa soccer world cup, world cup
Palpal ([link] )
world cup soccer jerseys, world cup 2010
Palpal ([link] )
world cup product, world cup jerseyPalpal (http://
[link] )
world cup soccer ball, world cup footabll (http://
[link] )

Russian Spies ???? This is Hilarious !!!!! Does anyone BELIEVE it ? after 911 Inside JOB and ANTHRAX

comp.lang.scheme - Sun, 07/04/2010 - 03:00
YanQui cry babies using old RACIST formula of Harassment !!!
To Harass Muslims :- Make a Movie of Bin Laden from a Studio in
Langley Virginia with an actor with SILICONE mask
and release on the internet
with FBI working on AUTHENTICATING it.
Hey YANK Bustards , NO ONE trust you. You have DESTROYED your OWN

TAGBODY in Scheme

comp.lang.scheme - Sun, 07/04/2010 - 00:00
I have recently wondered how to implement Common LISP TAGBODYs in
Scheme. Not that I can imagine any real use for this, but I thought
it might be fun to try (it was). So I hacked up some code that works
surprisingly well, but I wonder if there is a more efficient and/or
obvious way to do this.
Here is what I came up with. (Nested TAGBODYs do not work properly

Third World War is Coming - Who is Webster Tarpley ?

comp.lang.scheme - Sat, 07/03/2010 - 18:00
Third World War is Coming - Who is Webster Tarpley ?
[link]
[link]
[link]

CLICK AND GET $1000 TO YOUR HOME.

comp.lang.scheme - Sat, 07/03/2010 - 07:00
VISIT SITE [link] AND
CLICK SEARCH BOX ABOVE BANNER
AFTER FILL YOUR NAME AND ADDRESS.
YOU CAN GET INSTANT $1000 TO YOUR HOME.

Another version of miniscm

comp.lang.scheme - Sat, 07/03/2010 - 03:00
Since things are quiet, I will mention my port of miniscm (and bits of
tinyscheme) to Fortran 95. It is a Fortran 95 module suitable for
embedding:
[link] (an intro)
[link]
It is almost complete, except for an occasional problem with the garbage

Re: A link to a collection of tutorials on LISP.

comp.lang.scheme - Sat, 07/03/2010 - 03:00
On Jun 27, 1:30 pm, nanothermite911fbibustards
That guys intention is not to spread tutorial, but its a commercial. I
clarified its true nature.
On the genocide, the thing that drives it is the lies and deception -
of people like the FBI bustards - as well as the events that took
place on the Turkish FLOTILLA.

Programming Praxis: Contents: Chronological Listing Of Exercises

Planet Scheme - Fri, 07/02/2010 - 10:00

You may have noticed that the Contents page changed recently. Previously the Contents page listed all the exercises in chronological order. Now, there are four listings of the exercises, in chronological order, reverse chronological order, permuted by the words in the title and summary, and organized manually by themes.

The four listings all derive from a single source. The file praxis.info consists of records separated by blank lines, fields on a single line with field name followed by a tab character followed by the data element. Here is an excerpt, which shows the header at the beginning of the file followed by the first two records:

praxis.info

number  exercise number
file    base name of files
pubmon  month of publication
pubday  day of publication
pubyear year of publication
title   formatted title
ptitle  plain title
blurb   formatted blurb
pblurb  plain blurb
exer    exercise sub-page number
soln    solution sub-page number
extra   extra info sub-page number
codepad eight-character codepad index
theme   category in which exercise appears

name/value pairs on a line separated by tabs,
with records separated by blank lines

the "number" field must appear first, others
may be in any order, and are optional

----+----1----+----2----+----3----+----4----+----5----+----6

number  1
file    rpn-calculator
pubmon  2
pubday  19
pubyear 2009
title   RPN Calculator
blurb   Evaluate numeric expressions at the command line
exer    1
soln    2
codepad fjzlC50x
theme   Parsing

number  2
file    sieve-of-eratosthenes
pubmon  2
pubday  19
pubyear 2009
title   Sieve of Eratosthenes
blurb   A Scheme implementation of an ancient algorithm
exer    1
soln    2
codepad wI14BJ8Q
theme   Prime Numbers

Four programs manipulate the data from the praxis.info file to produce the four listings. The output has elements of html, but WordPress adds the surrounding context; here is the corresponding excerpt from the listing in chronological order:

<table cellpadding="10">

<tr><td>1</td><td>19 Feb 2009</td><td><a href="/2009/02/19/rpn-calculator/">RPN Calculator</a>: Evaluate numeric expressions at the command line</td><td><a href="/2009/02/19/rpn-calculator/">exercise</a> <a href="/2009/02/19/rpn-calculator/2/">solution</a> <a href="http://programmingpraxis.codepad.org/fjzlC50x">codepad</a></td></tr>

<tr><td>2</td><td>19 Feb 2009</td><td><a href="/2009/02/19/sieve-of-eratosthenes/">Sieve of Eratosthenes</a>: A Scheme implementation of an ancient algorithm</td><td><a href="/2009/02/19/sieve-of-eratosthenes/">exercise</a> <a href="/2009/02/19/sieve-of-eratosthenes/2/">solution</a> <a href="http://programmingpraxis.codepad.org/wI14BJ8Q">codepad</a></td></tr>

</table>

Your task is to write programs that read praxis.info and write the two listing files for exercises in chronological order and reverse chronological order. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.


Scholarly Lecture - USA will be DESTROYED the same way GERMANY was DESTROYED - What The Zionist Jews Did To Germany

comp.lang.scheme - Thu, 07/01/2010 - 18:00
USA will be DESTROYED the same way GERMANY was DESTROYED - What The
Zionist Jews Did To Germany
[link]

Re: FlateDecode, ASCIIHexDecode, ASCII85Decode, and LZWDecode streams

comp.lang.scheme - Thu, 07/01/2010 - 16:00
On Jun 24, 12:53 am, bugbear <bugbear@trim_papermule.co.uk_ trim>
wrote:
I did not get enough ideas so I am expanding my posting from
gnu.emacs.help, gnu.emacs.sources, gnu.emacs.gnus, comp.text.pdf
to
gnu.emacs.help,comp.lang.lisp, comp.compression,comp.lang.sch eme,comp.text.pdf

2010 world cup Portugal jerseys,paypal payment and free shipping

comp.lang.scheme - Thu, 07/01/2010 - 12:00
2010 world cup Brazil jerseys,paypal payment and free shipping
[link]
2010 world cup England jerseys,paypal payment and free shipping
2010 world cup France jerseys,paypal payment and free shipping
[link]
2010 world cup New Zealand jerseys,paypal payment and free shipping

Cheap wholesale Gucci Boots

comp.lang.scheme - Thu, 07/01/2010 - 06:00
Welcome to visit [link]
Men size 40,41,42,43,44,45,46. Women size 36,37,38,39,40.
High quality wholesale Air Force One shoes, Nike Jordan, Nike,Air
Max,
Nike Shox, Puma Shoes, Nike shoes, Adidas Shoes, Christian Louboutin,
Chanel Shoes, Coach Shoes, D&G Shoes, Dior Shoes, ED Hardy Shoes,

Cheap Wholesale Air Force One 25 Women

comp.lang.scheme - Thu, 07/01/2010 - 06:00
Cheap Wholesale Nike Air Max 87
<[link] > paypal
payment
Cheap Wholesale Nike Air Max 89
<[link] > paypal
payment
Cheap Wholesale Nike Air Max 90
<[link] > paypal
payment
Cheap Wholesale Nike Air Max 91
<[link] > paypal

Cheap Wholesale Evisu Coat

comp.lang.scheme - Thu, 07/01/2010 - 06:00
Suit [link]
Cheap Wholesale Adidas Suit
Cheap Wholesale Baby Suit (wholesale free shipping)
Cheap Wholesale ED Suit
Cheap Wholesale juicy Suit (wholesale free shipping)
Cheap Wholesale Lacoste Suit
Cheap Wholesale NBA Suit
Cheap Wholesale Nike Suit

Cheap Wholesale Tommy Shirt

comp.lang.scheme - Wed, 06/30/2010 - 18:00
Suit [link]
Cheap Wholesale Adidas Suit
Cheap Wholesale Baby Suit (wholesale free shipping)
Cheap Wholesale ED Suit
Cheap Wholesale juicy Suit (wholesale free shipping)
Cheap Wholesale Lacoste Suit
Cheap Wholesale NBA Suit
Cheap Wholesale Nike Suit

A vi-style editor for Scheme

comp.lang.scheme - Wed, 06/30/2010 - 18:00
ARSE is a Recursive[1] Scheme Editor modeled after vi. While it is
certainly not too useful as a general-purpose text editor, it has
some features that facilitate editing Scheme code, like
- an interaction buffer for evaluating expressions
- a help buffer for looking up keywords and procedures
- a built-in pretty-printer

Leslie Lamport is a Jew - His book is NOTORIOUSLY uninsightful and obfuscatory

comp.lang.scheme - Wed, 06/30/2010 - 09:00
Leslie Lamport is a Jew - His book is NOTORIOUSLY
uninsightful&obfuscatory (nothing on the design of LaTeX and macros,
no insights)
but he made millions from his book as you can tell from the number of
copies sold, ie even if he got a dollar from a copy, he made millions.
Stephen Wolfram is also a jew. I wonder how his Univ of Phd studies

Jew JUDGE shows off JEW POWER by BULLYING and BLACKMAILING a BLACK PRESIDENT OBAMA

comp.lang.scheme - Tue, 06/29/2010 - 18:00
Jew Judges NEVER came out against the CRIMES of BUSH and CHENEY and
LARRY S I L V E R S T E I N - The main player in 911
Jews are coming out from the directions of Corporations, Mafias,
Legislators, and now Judge to SUBVERT the UNITED STATES.
Please listen to the Speech of Mr Benjamin H Freedman on [link]
Syndicate content