From msuinfo!agate!overload.lbl.gov!ames!hookup!yeshua.marcam.com!zip.eecs.umich.edu!newsxfer.itd.umich.edu!uunet!nwnexus!chinook!ken Sat Jul 23 09:05:57 1994 Path: msuinfo!agate!overload.lbl.gov!ames!hookup!yeshua.marcam.com!zip.eecs.umich.edu!newsxfer.itd.umich.edu!uunet!nwnexus!chinook!ken From: ken@chinook.halcyon.com (Ken Pizzini) Newsgroups: sci.crypt Subject: Re: somebody post a book cipher so I can break it. Date: 22 Jul 1994 20:31:59 GMT Organization: Northwest Nexus Inc. Lines: 74 Message-ID: <30pabv$7qm@nwfocus.wa.com> References: <30mil3$gsm@xmission.xmission.com> NNTP-Posting-Host: chinook.halcyon.com In article <30mil3$gsm@xmission.xmission.com>, Berzerk wrote: >Hey, could someone post a book cipher with the techneque used to generate >it, but with unknown plaintext and unknown book key, so I could prove >that it can be broken? > >I have a fealing this will be easy. I suspect it should be. Okay, here is a little ciphertext: begin 644 cipher M 0$$08,&45!"AH*! P5&@!320%&0QL%"%4O! 83'0H. %-B @ 7'E(B M! T40@013T4;#1L"'$4M ! !%V\I%14%0F\0 $$]!!)93AT 04M73DU24QX; M' !&TP<10X44T,)!QH"&TXN !2$082 $1%%Q%2#4@#13-O"003!AY+3E1T M!P, /1$65!9^ !U$ %(=3Q8/"TP1 4P#" !!$P!! 1<,' 94&QI+ $8M$44 M2!(-4P , &]%/T49%T4$21U8# P:&!%30D\5!@U.$V($0AL4%U0="P1,4PP# M$1%)"AA%'1\ &0<+5 Q'4$PF VL3# U%$0X(10=("!U$5P(:4 4 !E\ "AY# M Q\&10\('"H:"1%)&P\"&!I-04QN('0\.TD $@0:!DA)&4$'8AL65@H<$ I4 .'1=,$DX*&4,(50P:#GX" end And here is the C program that created it: -------------------------- #include #include int main(int argc, char **argv) { FILE *keyfile; FILE *textfile = stdin; int kc; int pc; if (argc < 2){ fprintf(stderr, "USAGE: %s keyfile [textfile]\n", argv[0]); return EXIT_FAILURE; } if (!(keyfile=fopen(argv[1], "r"))){ fprintf(stderr, "%s: could not open key file ", argv[0]); perror(argv[1]); return EXIT_FAILURE; } if (argc > 2){ if (!(textfile=fopen(argv[2], "r"))){ fprintf(stderr, "%s: could not open text file ", argv[0]); perror(argv[1]); return EXIT_FAILURE; } } while ((pc = getc(textfile)) != EOF){ if ((kc = getc(keyfile))== EOF){ fprintf(stderr, "%s: unexpected EOF on keyfile %s!\n", argv[0], argv[1]); return EXIT_FAILURE; } putchar(pc ^ kc); } return EXIT_SUCCESS; } -------------------------- Enjoy! (Oh, and P.S., if you prefer, I can do this in a variant form that more closely matches traditonal useage where plaintext, key, and ciphertext all consist solely of uppercase alphabetics.) --Ken Pizzini From msuinfo!agate!library.ucla.edu!psgrain!charnel.ecst.csuchico.edu!nic-nac.CSU.net!usc!rand.org!mycroft.rand.org!not-for-mail Sat Jul 23 09:06:19 1994 Path: msuinfo!agate!library.ucla.edu!psgrain!charnel.ecst.csuchico.edu!nic-nac.CSU.net!usc!rand.org!mycroft.rand.org!not-for-mail From: jim@mycroft.rand.org (Jim Gillogly) Newsgroups: sci.crypt Subject: Re: somebody post a book cipher [SPOILER] Date: 22 Jul 1994 23:22:33 -0700 Organization: Banzai Institute Lines: 53 Message-ID: <30qcv9$1ks@mycroft.rand.org> References: <30mil3$gsm@xmission.xmission.com> <30pabv$7qm@nwfocus.wa.com> NNTP-Posting-Host: mycroft.rand.org Summary: Crib dragging In article <30pabv$7qm@nwfocus.wa.com>, Ken Pizzini posted a running key cipher which was the XOR of two ASCII texts with each other: >begin 644 cipher >M 0$$08,&45!"AH*! P5&@!320%&0QL%"%4O! 83'0H. %-B @ 7'E(B >M! T40@013T4;#1L"'$4M ! !%V\I%14%0F\0 $$]!!)93AT 04M73DU24QX; >M' !&TP<10X44T,)!QH"&TXN !2$082 $1%%Q%2#4@#13-O"003!AY+3E1T >M!P, /1$65!9^ !U$ %(=3Q8/"TP1 4P#" !!$P!! 1<,' 94&QI+ $8M$44 >M2!(-4P , &]%/T49%T4$21U8# P:&!%30D\5!@U.$V($0AL4%U0="P1,4PP# >M$1%)"AA%'1\ &0<+5 Q'4$PF VL3# U%$0X(10=("!U$5P(:4 4 !E\ "AY# >M Q\&10\('"H:"1%)&P\"&!I-04QN('0\.TD $@0:!DA)&4$'8AL65@H<$ I4 >.'1=,$DX*&4,(50P:#GX" > >end The standard way to do a running key cipher is kind of tedious... and that's how I did it: guess cribs, drag them through the ciphertext, and see where they produce plaintext. My favorite crib for this kind of thing is ". The ", which turns out to give a likely hit partway through with "ent of ". This isn't too revealing, so I tried " the "; there are several good matches, the first of which is "commu", which suggests communication[s] or communism, again with space or newline before or after. Expanding this island in both directions gave 00 00 00 00 04 04 11 06 0c 19 45 41 0a 1a 0a 04 0c 15 1a 00 53 49 01 46 43 sp i n sp c s sp o f sp 1b 05 08 55 2f 04 06 13 1d 0a 0e 00 53 62 02 00 17 1e 52 22 04 0d 14 42 04 t h e sp A m e r i c a n s o m m u n i c a t i o n sp which turned out to be misleadingly incorrect, but close: the 's' and ' ' for the last letter are actually reversed in the opposite texts. The next occurrence of " the " expanded the previously found "ent of " to "the Department of ", and when I finally extended that to "Department of State" things started falling into place. A little farther and I recognized the source text as "The American Black Chamber", by Yardley. The cryptogram begins: 00 00 00 00 04 04 11 06 0c 19 45 41 0a 1a 0a 04 0c 15 1a 00 53 49 01 46 43 T h e sp s e c r e t sp a c t i v i t i e s sp o f sp T h e sp w a r t i m e sp i n c r e a s e sp i n sp c 1b 05 08 55 2f 04 06 13 1d 0a 0e 00 53 62 02 00 17 1e 52 22 04 0d 14 42 04 t h e sp A m e r i c a n sp B l a c k sp C h a m b e o m m u n i c a t i o n s sp n a t u r a l l y sp a 11 4f 45 1b 0d 1b 02 1c 45 2d 00 10 01 17 6f 29 15 15 05 42 6f 10 00 41 3d There's one typo in the cryptogram... I'll leave it to the devoted reader to find it. -- Jim Gillogly 30 Afterlithe S.R. 1994, 06:22