[net.crypt] The Beale Ciphers - here they are

ed@oakhill.UUCP (Ed Rupp) (07/07/84)

Here's most of what I have on the ciphers.  It's fairly long and
most of it is a copy of the 1885 pamphlet.  Comments are welcome 
especially about the conclusions in the notes.  The pamphlet is
as close to the original as I can make it.  Ward's version of the
DOI is omitted to save space.  His version of the DOI was adjusted
to make the document fit the cipher.  The pamphlet is the oldest
known copy of the ciphers so I prefer using it to later copies
especially the one by Clayton Hart.  Hart actually changed the
ciphers to fit the DOI and probably caused everyone to waste
many years working on bogus data.


Ed Rupp		{ihnp4,seismo,gatech,ctvax}!ut-sally!oakhill!ed

------------------- cut here ----------------------

: This is a shar archive.  Extract with sh, not csh.
echo x - 1
cat > 1 << '!Funky!Stuff!'
71,   194,  38,   1701, 89,   76,   11,   83,   1629, 48,   /*  10 */
94,   63,   132,  16,   111,  95,   84,   341,  975,  14,   /*  20 */
40,   64,   27,   81,   139,  213,  63,   90,   1120, 8,    /*  30 */
15,   3,    126,  2018, 40,   74,   758,  485,  604,  230,  /*  40 */
436,  664,  582,  150,  251,  284,  308,  231,  124,  211,  /*  50 */
486,  225,  401,  370,  11,   101,  305,  139,  189,  17,   /*  60 */
33,   88,   208,  193,  145,  1,    94,   73,   416,  918,  /*  70 */
263,  28,   500,  538,  356,  117,  136,  219,  27,   176,  /*  80 */
130,  10,   460,  25,   485,  18,   436,  65,   84,   200,  /*  90 */
283,  118,  320,  138,  36,   416,  280,  15,   71,   224,  /* 100 */
961,  44,   16,   401,  39,   88,   61,   304,  12,   21,   /* 110 */
24,   283,  134,  92,   63,   246,  486,  682,  7,    219,  /* 120 */
184,  360,  780,  18,   64,   463,  474,  131,  160,  79,   /* 130 */
73,   440,  95,   18,   64,   581,  34,   69,   128,  367,  /* 140 */
460,  17,   81,   12,   103,  820,  62,   116,  97,   103,  /* 150 */
862,  70,   60,   1317, 471,  540,  208,  121,  890,  346,  /* 160 */
36,   150,  59,   568,  614,  13,   120,  63,   219,  812,  /* 170 */
2160, 1780, 99,   35,   18,   21,   136,  872,  15,   28,   /* 180 */
170,  88,   4,    30,   44,   112,  18,   147,  436,  195,  /* 190 */
320,  37,   122,  113,  6,    140,  8,    120,  305,  42,   /* 200 */
58,   461,  44,   106,  301,  13,   408,  680,  93,   86,   /* 210 */
116,  530,  82,   568,  9,    102,  38,   416,  89,   71,   /* 220 */
216,  728,  965,  818,  2,    38,   121,  195,  14,   326,  /* 230 */
148,  234,  18,   55,   131,  234,  361,  824,  5,    81,   /* 240 */
623,  48,   961,  19,   26,   33,   10,   1101, 365,  92,   /* 250 */
88,   181,  275,  346,  201,  206,  86,   36,   219,  324,  /* 260 */
829,  840,  64,   326,  19,   48,   122,  85,   216,  284,  /* 270 */
919,  861,  326,  985,  233,  64,   68,   232,  431,  960,  /* 280 */
50,   29,   81,   216,  321,  603,  14,   612,  81,   360,  /* 290 */
36,   51,   62,   194,  78,   60,   200,  314,  676,  112,  /* 300 */
4,    28,   18,   61,   136,  247,  819,  921,  1060, 464,  /* 310 */
895,  10,   6,    66,   119,  38,   41,   49,   602,  423,  /* 320 */
962,  302,  294,  875,  78,   14,   23,   111,  109,  62,   /* 330 */
31,   501,  823,  216,  280,  34,   24,   150,  1000, 162,  /* 340 */
286,  19,   21,   17,   340,  19,   242,  31,   86,   234,  /* 350 */
140,  607,  115,  33,   191,  67,   104,  86,   52,   88,   /* 360 */
16,   80,   121,  67,   95,   122,  216,  548,  96,   11,   /* 370 */
201,  77,   364,  218,  65,   667,  890,  236,  154,  211,  /* 380 */
10,   98,   34,   119,  56,   216,  119,  71,   218,  1164, /* 390 */
1496, 1817, 51,   39,   210,  36,   3,    19,   540,  232,  /* 400 */
22,   141,  617,  84,   290,  80,   46,   207,  411,  150,  /* 410 */
29,   38,   46,   172,  85,   194,  39,   261,  543,  897,  /* 420 */
624,  18,   212,  416,  127,  931,  19,   4,    63,   96,   /* 430 */
12,   101,  418,  16,   140,  230,  460,  538,  19,   27,   /* 440 */
88,   612,  1431, 90,   716,  275,  74,   83,   11,   426,  /* 450 */
89,   72,   84,   1300, 1706, 814,  221,  132,  40,   102,  /* 460 */
34,   868,  975,  1101, 84,   16,   79,   23,   16,   81,   /* 470 */
122,  324,  403,  912,  227,  936,  447,  55,   86,   34,   /* 480 */
43,   212,  107,  96,   314,  264,  1065, 323,  428,  601,  /* 490 */
203,  124,  95,   216,  814,  2906, 654,  820,  2,    301,  /* 500 */
112,  176,  213,  71,   87,   96,   202,  35,   10,   2,    /* 510 */
41,   17,   84,   221,  736,  826,  214,  11,   60,   760   /* 520 */
!Funky!Stuff!
echo x - 2
cat > 2 << '!Funky!Stuff!'
115,  73,   24,   807,  37,   52,   49,   17,   31,   62,   /*  10 */
647,  22,   7,    15,   140,  47,   29,   107,  79,   84,   /*  20 */
56,   239,  10,   26,   811,  5,    196,  308,  85,   52,   /*  30 */
160,  136,  59,   211,  36,   9,    46,   316,  554,  122,  /*  40 */
106,  95,   53,   58,   2,    42,   7,    35,   122,  53,   /*  50 */
31,   82,   77,   250,  196,  56,   96,   118,  71,   140,  /*  60 */
287,  28,   353,  37,   1005, 65,   147,  807,  24,   3,    /*  70 */
8,    12,   47,   43,   59,   807,  45,   316,  101,  41,   /*  80 */
78,   154,  1005, 122,  138,  191,  16,   77,   49,   102,  /*  90 */
57,   72,   34,   73,   85,   35,   371,  59,   196,  81,   /* 100 */
92,   191,  106,  273,  60,   394,  620,  270,  220,  106,  /* 110 */
388,  287,  63,   3,    6,    191,  122,  43,   234,  400,  /* 120 */
106,  290,  314,  47,   48,   81,   96,   26,   115,  92,   /* 130 */
158,  191,  110,  77,   85,   197,  46,   10,   113,  140,  /* 140 */
353,  48,   120,  106,  2,    607,  61,   420,  811,  29,   /* 150 */
125,  14,   20,   37,   105,  28,   248,  16,   159,  7,    /* 160 */
35,   19,   301,  125,  110,  486,  287,  98,   117,  511,  /* 170 */
62,   51,   220,  37,   113,  140,  807,  138,  540,  8,    /* 180 */
44,   287,  388,  117,  18,   79,   344,  34,   20,   59,   /* 190 */
511,  548,  107,  603,  220,  7,    66,   154,  41,   20,   /* 200 */
50,   6,    575,  122,  154,  248,  110,  61,   52,   33,   /* 210 */
30,   5,    38,   8,    14,   84,   57,   540,  217,  115,  /* 220 */
71,   29,   84,   63,   43,   131,  29,   138,  47,   73,   /* 230 */
239,  540,  52,   53,   79,   118,  51,   44,   63,   196,  /* 240 */
12,   239,  112,  3,    49,   79,   353,  105,  56,   371,  /* 250 */
557,  211,  505,  125,  360,  133,  143,  101,  15,   284,  /* 260 */
540,  252,  14,   205,  140,  344,  26,   811,  138,  115,  /* 270 */
48,   73,   34,   205,  316,  607,  63,   220,  7,    52,   /* 280 */
150,  44,   52,   16,   40,   37,   158,  807,  37,   121,  /* 290 */
12,   95,   10,   15,   35,   12,   131,  62,   115,  102,  /* 300 */
807,  49,   53,   135,  138,  30,   31,   62,   67,   41,   /* 310 */
85,   63,   10,   106,  807,  138,  8,    113,  20,   32,   /* 320 */
33,   37,   353,  287,  140,  47,   85,   50,   37,   49,   /* 330 */
47,   64,   6,    7,    71,   33,   4,    43,   47,   63,   /* 340 */
1,    27,   600,  208,  230,  15,   191,  246,  85,   94,   /* 350 */
511,  2,    270,  20,   39,   7,    33,   44,   22,   40,   /* 360 */
7,    10,   3,    811,  106,  44,   486,  230,  353,  211,  /* 370 */
200,  31,   10,   38,   140,  297,  61,   603,  320,  302,  /* 380 */
666,  287,  2,    44,   33,   32,   511,  548,  10,   6,    /* 390 */
250,  557,  246,  53,   37,   52,   83,   47,   320,  38,   /* 400 */
33,   807,  7,    44,   30,   31,   250,  10,   15,   35,   /* 410 */
106,  160,  113,  31,   102,  406,  230,  540,  320,  29,   /* 420 */
66,   33,   101,  807,  138,  301,  316,  353,  320,  220,  /* 430 */
37,   52,   28,   540,  320,  33,   8,    48,   107,  50,   /* 440 */
811,  7,    2,    113,  73,   16,   125,  11,   110,  67,   /* 450 */
102,  807,  33,   59,   81,   158,  38,   43,   581,  138,  /* 460 */
19,   85,   400,  38,   43,   77,   14,   27,   8,    47,   /* 470 */
138,  63,   140,  44,   35,   22,   177,  106,  250,  314,  /* 480 */
217,  2,    10,   7,    1005, 4,    20,   25,   44,   48,   /* 490 */
7,    26,   46,   110,  230,  807,  191,  34,   112,  147,  /* 500 */
44,   110,  121,  125,  96,   41,   51,   50,   140,  56,   /* 510 */
47,   152,  540,  63,   807,  28,   42,   250,  138,  582,  /* 520 */
98,   643,  32,   107,  140,  112,  26,   85,   138,  540,  /* 530 */
53,   20,   125,  371,  38,   36,   10,   52,   118,  136,  /* 540 */
102,  420,  150,  112,  71,   14,   20,   7,    24,   18,   /* 550 */
12,   807,  37,   67,   110,  62,   33,   21,   95,   220,  /* 560 */
511,  102,  811,  30,   83,   84,   305,  620,  15,   2,    /* 570 */
10,   8,    220,  106,  353,  105,  106,  60,   275,  72,   /* 580 */
8,    50,   205,  185,  112,  125,  540,  65,   106,  807,  /* 590 */
138,  96,   110,  16,   73,   33,   807,  150,  409,  400,  /* 600 */
50,   154,  285,  96,   106,  316,  270,  205,  101,  811,  /* 610 */
400,  8,    44,   37,   52,   40,   241,  34,   205,  38,   /* 620 */
16,   46,   47,   85,   24,   44,   15,   64,   73,   138,  /* 630 */
807,  85,   78,   110,  33,   420,  505,  53,   37,   38,   /* 640 */
22,   31,   10,   110,  106,  101,  140,  15,   38,   3,    /* 650 */
5,    44,   7,    98,   287,  135,  150,  96,   33,   84,   /* 660 */
125,  807,  191,  96,   511,  118,  40,   370,  643,  466,  /* 670 */
106,  41,   107,  603,  220,  275,  30,   150,  105,  49,   /* 680 */
53,   287,  250,  208,  134,  7,    53,   12,   47,   85,   /* 690 */
63,   138,  110,  21,   112,  140,  485,  486,  505,  14,   /* 700 */
73,   84,   575,  1005, 150,  200,  16,   42,   5,    4,    /* 710 */
25,   42,   8,    16,   811,  125,  160,  32,   205,  603,  /* 720 */
807,  81,   96,   405,  41,   600,  136,  14,   20,   28,   /* 730 */
26,   353,  302,  246,  8,    131,  160,  140,  84,   440,  /* 740 */
42,   16,   811,  40,   67,   101,  102,  194,  138,  205,  /* 750 */
51,   63,   241,  540,  122,  8,    10,   63,   140,  47,   /* 760 */
48,   140,  288                                             /* 763 */
!Funky!Stuff!
echo x - 3
cat > 3 << '!Funky!Stuff!'
317,  8,    92,   73,   112,  89,   67,   318,  28,   96,   /*  10 */
107,  41,   631,  78,   146,  397,  118,  98,   114,  246,  /*  20 */
348,  116,  74,   88,   12,   65,   32,   14,   81,   19,   /*  30 */
76,   121,  216,  85,   33,   66,   15,   108,  68,   77,   /*  40 */
43,   24,   122,  96,   117,  36,   211,  301,  15,   44,   /*  50 */
11,   46,   89,   18,   136,  68,   317,  28,   90,   82,   /*  60 */
304,  71,   43,   221,  198,  176,  310,  319,  81,   99,   /*  70 */
264,  380,  56,   37,   319,  2,    44,   53,   28,   44,   /*  80 */
75,   98,   102,  37,   85,   107,  117,  64,   88,   136,  /*  90 */
48,   151,  99,   175,  89,   315,  326,  78,   96,   214,  /* 100 */
218,  311,  43,   89,   51,   90,   75,   128,  96,   33,   /* 110 */
28,   103,  84,   65,   26,   41,   246,  84,   270,  98,   /* 120 */
116,  32,   59,   74,   66,   69,   240,  15,   8,    121,  /* 130 */
20,   77,   89,   31,   11,   106,  81,   191,  224,  328,  /* 140 */
18,   75,   52,   82,   117,  201,  39,   23,   217,  27,   /* 150 */
21,   84,   35,   54,   109,  128,  49,   77,   88,   1,    /* 160 */
81,   217,  64,   55,   83,   116,  251,  269,  311,  96,   /* 170 */
54,   32,   120,  18,   132,  102,  219,  211,  84,   150,  /* 180 */
219,  275,  312,  64,   10,   106,  87,   75,   47,   21,   /* 190 */
29,   37,   81,   44,   18,   126,  115,  132,  160,  181,  /* 200 */
203,  76,   81,   299,  314,  337,  351,  96,   11,   28,   /* 210 */
97,   318,  238,  106,  24,   93,   3,    19,   17,   26,   /* 220 */
60,   73,   88,   14,   126,  138,  234,  286,  297,  321,  /* 230 */
365,  264,  19,   22,   84,   56,   107,  98,   123,  111,  /* 240 */
214,  136,  7,    33,   45,   40,   13,   28,   46,   42,   /* 250 */
107,  196,  227,  344,  198,  203,  247,  116,  19,   8,    /* 260 */
212,  230,  31,   6,    328,  65,   48,   52,   59,   41,   /* 270 */
122,  33,   117,  11,   18,   25,   71,   36,   45,   83,   /* 280 */
76,   89,   92,   31,   65,   70,   83,   96,   27,   33,   /* 290 */
44,   50,   61,   24,   112,  136,  149,  176,  180,  194,  /* 300 */
143,  171,  205,  296,  87,   12,   44,   51,   89,   98,   /* 310 */
34,   41,   208,  173,  66,   9,    35,   16,   95,   8,    /* 320 */
113,  175,  90,   56,   203,  19,   177,  183,  206,  157,  /* 330 */
200,  218,  260,  291,  305,  618,  951,  320,  18,   124,  /* 340 */
78,   65,   19,   32,   124,  48,   53,   57,   84,   96,   /* 350 */
207,  244,  66,   82,   119,  71,   11,   86,   77,   213,  /* 360 */
54,   82,   316,  245,  303,  86,   97,   106,  212,  18,   /* 370 */
37,   15,   81,   89,   16,   7,    81,   39,   96,   14,   /* 380 */
43,   216,  118,  29,   55,   109,  136,  172,  213,  64,   /* 390 */
8,    227,  304,  611,  221,  364,  819,  375,  128,  296,  /* 400 */
1,    18,   53,   76,   10,   15,   23,   19,   71,   84,   /* 410 */
120,  134,  66,   73,   89,   96,   230,  48,   77,   26,   /* 420 */
101,  127,  936,  218,  439,  178,  171,  61,   226,  313,  /* 430 */
215,  102,  18,   167,  262,  114,  218,  66,   59,   48,   /* 440 */
27,   19,   13,   82,   48,   162,  119,  34,   127,  139,  /* 450 */
34,   128,  129,  74,   63,   120,  11,   54,   61,   73,   /* 460 */
92,   180,  66,   75,   101,  124,  265,  89,   96,   126,  /* 470 */
274,  896,  917,  434,  461,  235,  890,  312,  413,  328,  /* 480 */
381,  96,   105,  217,  66,   118,  22,   77,   64,   42,   /* 490 */
12,   7,    55,   24,   83,   67,   97,   109,  121,  135,  /* 500 */
181,  203,  219,  228,  256,  21,   34,   77,   319,  374,  /* 510 */
382,  675,  684,  717,  864,  203,  4,    18,   92,   16,   /* 520 */
63,   82,   22,   46,   55,   69,   74,   112,  134,  186,  /* 530 */
175,  119,  213,  416,  312,  343,  264,  119,  186,  218,  /* 540 */
343,  417,  845,  951,  124,  209,  49,   617,  856,  924,  /* 550 */
936,  72,   19,   28,   11,   35,   42,   40,   66,   85,   /* 560 */
94,   112,  65,   82,   115,  119,  236,  244,  186,  172,  /* 570 */
112,  85,   6,    56,   38,   44,   85,   72,   32,   47,   /* 580 */
63,   96,   124,  217,  314,  319,  221,  644,  817,  821,  /* 590 */
934,  922,  416,  975,  10,   22,   18,   46,   137,  181,  /* 600 */
101,  39,   86,   103,  116,  138,  164,  212,  218,  296,  /* 610 */
815,  380,  412,  460,  495,  675,  820,  952               /* 618 */
!Funky!Stuff!
echo x - Makefile
cat > Makefile << '!Funky!Stuff!'
all:	code modulo use

code:	code.c getwrd.c loadkey.c beale.h
	cc code.c -o code

modulo:	modulo.c  beale.h
	cc modulo.c -o modulo -lm

use:	use.c getwrd.c beale.h
	cc use.c -o use

beale.h:	1 2 3

clean:
	rm -f code modulo use
!Funky!Stuff!
echo x - README
cat > README << '!Funky!Stuff!'
Description of files:

	1,2,3		The Beale Ciphers
	beale.h		miscellaneous setup 
	code.c		apply keytext to ciphers (various print options)
	modulo.c	examine modulo 'n' bias for cipher elements
	use.c		usage statistics on keytext & ciphers
	newlist		run keytext through code & use
	doi.original	straight DOI
	doi.rupp	'corrected' DOI (differences are described in notes)
	notes		explanations & speculation
	ward		"The Beale Papers"

code [123vm] [width] <keytext
	Takes the first letter of each word in the keytext and applies
	it to one of the 3 ciphers.  Default is B1, not verbose.
	Verbose option causes the cipher elements to be printed above
	the decoding.
	'm' switches output to vertical with surrounding elements
	to allow quick checks for 'off by 1' type errors.
	Optional width may be specified. Default is 75 for non-verbose
	and 25 for verbose.
	Compare 'code 2 <doi.original' and 'code 2 < doi.rupp'.  Also examine
	'code 1v <doi.rupp' for the Gillogly strings.

use <keytext
	Each word in keytext is numbered and a usage count in all 3 ciphers
	is printed.  '14.' means that a particular cipher element appears
	once in B1, four times in B2 and not at all in B3.  

modulo [-limit] n
	divides each cipher element by 'n' and records total of each
	remainder.  -limit throws out elements above the limit.  Try
	modulo -500 5.

newlist keytext
	runs all 3 ciphers through a keytext (verbose and non-verbose),
	prints the keytext via 'use' and sorts the keytext by first
	letter (maybe useful?).
!Funky!Stuff!
echo x - beale.h
cat > beale.h << '!Funky!Stuff!'
#include <ctype.h>
#define MAXKEY  2907    /* maximum length of key text */

char key[MAXKEY];       /* collected key text letters */
int use[MAXKEY];        /* general purpose usage array */

#define MAXBUF  1000    /* character buffer */
char buf[MAXBUF];

int msg1[] = {
#include "1"    /* paper #1: The Locality of the Vault */
};

int msg2[] = {
#include "2"    /* paper #2: The Contents of the Vault */
};

int msg3[] = {
#include "3"    /* paper #3: Names and Residences */
};

#define SIZE1	(sizeof(msg1)/sizeof(msg1[0]))
#define SIZE2	(sizeof(msg2)/sizeof(msg2[0]))
#define SIZE3	(sizeof(msg3)/sizeof(msg3[0]))
!Funky!Stuff!
echo x - code.c
cat > code.c << '!Funky!Stuff!'
#include <stdio.h>
#include "beale.h"
#include "loadkey.c"
#include "getwrd.c"

/*
 *      code --- read key text from standard input and use
 *               it to decrypt Beale ciphers
 */

#define WIDTH    75     /* default number of letters per line */
#define VWIDTH   25     /* default number of letters per line (verbose mode)*/
int verbose = 0;        /* display more crud when set */
int mflag = 0;		/* vertical matrix format when set */
int rflag = 0;          /* reverse output */

main(argc,argv)
int argc;
char **argv;
{
	register int i,j;
	register int *ip;       /* pointer to selected cipher */
	int msglen;             /* length of selected cipher */
	int width = WIDTH;      /* display width */
	char *p;

	/* default is #1, non-verbose */
	ip = msg1;
	msglen = SIZE1;
	if( argc >= 2){
		p = argv[1];    /* first argument is which cipher & verbose */
		while(*p){
			switch(*p++){
				case '1':
					ip = msg1;
					msglen = SIZE1;
					break;
				case '2':
					ip = msg2;
					msglen = SIZE2;
					break;
				case '3':
					ip = msg3;
					msglen = SIZE3;
					break;
				case 'v':
					verbose++;
					width = VWIDTH;
					break;
				case 'm':	/* vertical matrix */
					mflag++;
					break;
				case 'r':
					rflag++;
					break;
				default:
					printf("Usage: code [123vmr] [display-width]  <document\n");
					exit();
				}
			}
		}

	if( argc >= 3 )
		width = atoi(argv[2]);  /* use specified width */

	loadkey();

	if(mflag){	/* vert. matrix flag overrides other options */
		vdump(ip,msglen,width);
		exit(0);
		}
	/* convert cipher to text */
	if(verbose && !rflag){    /* include key numbers over text */
		for(i=0; i<msglen; i += width){
			for(j=i; j<i+width && j<msglen; j++)
				printf("%-5d",*(ip+j));
			printf("\n");
			for(j=i; j<i+width && j<msglen; j++)
				printf("%c    ",key[*(ip+j)]);
			printf("\n\n");
			}
		}
	else if (!rflag){   /* short form */
		for(i=0;i<msglen;i+=width){
			for(j=i;j<i+width && j<msglen; j++)
				printf("%c",key[*(ip+j)]);
			printf("\n");
			}
		}
	else{
		for(i=msglen-1; i>=0; i-=width){
			for(j=i;j> i-width && j>=0; j--)
				printf("%c",key[*(ip+j)]);
			printf("\n");
			}
		}
}

/*
 *	vdump --- vertical matrix dump of a cipher
 */
vdump(ip,l,width)
int *ip;	/* which cipher */
int l;		/* cipher length */
int width;      /* elements per line */
{
	while(l--){
		printf("%d\t",*ip);
		outline(*ip,10);
		printf("\n");
		ip++;
		}
}

/* 
 *	outline --- output elements around a specific key element
 */
outline(ell,eps)
int ell;	/* key element # */
int eps;	/* plus/minus this much */
{
	register int i;

	for(i=ell-eps; i<= ell+eps; i++){
		if( i<=0 )
			printf(" ");
		else if( i==ell )
			printf(" %c ",key[i]);
		else
			printf("%c",key[i]);
		}
}
!Funky!Stuff!
echo x - getwrd.c
cat > getwrd.c << '!Funky!Stuff!'
/*
 *      getwrd --- get next word from standard input
 */
getwrd(p)
char *p;
{
	register char *rp = p;
	char c;

	while( (c=getchar()) != EOF )
		if(isalpha(c))
			break;
	if( c==EOF)
		return(EOF);
	*rp++ = c;
	while( (c=getchar()) != EOF ){
		if(!isalpha(c))
			break;
		*rp++ = c;
		}
	*rp = '\0';
	return(!EOF);
}
!Funky!Stuff!
echo x - loadkey.c
cat > loadkey.c << '!Funky!Stuff!'

/*
 *      loadkey --- read STDIN using 1st letter of each word as key
 */
loadkey()
{
	register int i;
	char    buf[50];

	/* collect key characters */
	for(i=1; (i<MAXKEY) && (getwrd(buf)!=EOF) ; i++)
		key[i] = buf[0];
	for(   ;i<MAXKEY;i++)
		key[i] = '_';   /* unspecified key positions */
}
!Funky!Stuff!
echo x - modulo.c
cat > modulo.c << '!Funky!Stuff!'
#include <stdio.h>
#include "beale.h"

#define	DEFLIM	3000	/* throw out elements above this value */
int	Limit = DEFLIM;
#define MAXMOD  200
#define	SCALE	30
int     m[MAXMOD];

main(argc,argv)
int argc;
char **argv;
{
	int     i;
	int     modulo;
	int     start,end;

	if( argc < 2)
		exit();
	if( *argv[1] == '-'){	/* use non-standard limit */
		Limit = atoi(*++argv);
		Limit = -Limit;
		argc--;
		}
	start = atoi(*++argv);  /* starting modulo */
	if( argc > 2 )
		end = atoi(*++argv);
	else
		end = start;
	if(end>=MAXMOD)
		end = MAXMOD-1;

	for(modulo=start;modulo<=end;modulo++){
		display("B1",msg1,SIZE1,modulo);
		display("B2",msg2,SIZE2,modulo);
		display("B3",msg3,SIZE3,modulo);
		}
}



display(s,msg,msglen,modulo)
char *s;
int *msg;
int msglen;
int modulo;
{
	register int i;
	register int j;
	double weight;
	int     counted = 0;
	double  mu,sigma,p,q;      /* standard deviation test */
	double  sqrt();

	for(i=0;i<modulo;i++)
		m[i]=0;

	for(i=0;i<msglen;i++)
		if( msg[i] <= Limit )
			{
			m[ msg[i]%modulo]++;
			counted++;
			}
	p = 1./modulo;
	q = 1 - p;
	mu = p * counted;
	sigma = sqrt( mu * q);
	printf("%s %% %d, mean:%6.2f, sigma:%6.2f\n",s,modulo,mu,sigma);

	for(i=0;i<modulo;i++)
		{
		printf("%s %%%-2d=%2d:",s,modulo,i);
		printf("%3d",m[i]);
		weight = (m[i]/mu)* SCALE;
		for(j=0;j<weight;j++)
			printf(" ");
		printf("%d",modulo);
		while( m[i] < mu-sigma ){
			printf("-");
			m[i] += sigma;
			}
		while( m[i] > mu+sigma ){
			printf("+");
			m[i] -= sigma;
			}
		printf("\n");
		}
	printf("\n");
}
!Funky!Stuff!
echo x - use.c
cat > use.c << '!Funky!Stuff!'
#include <stdio.h>
#include "beale.h"
#include "getwrd.c"

/*
 *	use --- print use counts for all 3 Beale ciphers
 */

int use1[MAXKEY] = {0};
int use2[MAXKEY] = {0};
int use3[MAXKEY] = {0};

char    ustr[] = ".123456789ABCDEF************************";

main(argc,argv)
int argc;
char **argv;
{
	register int i = 1;
	char	buf[MAXBUF];	/* hold a keytext word */

	collect(msg1,SIZE1,use1);
	collect(msg2,SIZE2,use2);
	collect(msg3,SIZE3,use3);

	while( getwrd(buf) != EOF )
		usage(i++,buf);
	for( ;i<MAXKEY;i++)
		if(use1[i] || use2[i] || use3[i] )
			usage(i,"_");   /* tag on non-zero elements */
}

usage(i,s)
int i;
char *s;
{
	printf("%4d %c%c%c",i,ustr[use1[i]],ustr[use2[i]],ustr[use3[i]]);
	printf(" %s\n",s);
}

collect(ip,size,a)
int *ip;        /* pointer to code message */
int size;       /* length of message */
int *a;		/* accumulated array counts */
{
	while(size--)
		a[ *ip++ ] += 1;
}
!Funky!Stuff!
echo x - doi.original
cat > doi.original << '!Funky!Stuff!'
when in the course of human events, it becomes necessary for  one
people to dissolve the political bands which have connected them 
with  another,  and  to assume among the powers of the earth, the
separate and equal station to which the laws  of  nature  and  of
natures  god  entitle  them,  a decent respect to the opinions of
mankind requires that they should declare the causes which  impel
them to the separation.  

we hold these truths to  be  self-  evident,  that  all  men  are
created  equal,  that  they  are  endowed  by  their creator with
certain unalienable rights, that among these  are  life,  liberty
and the pursuit of happiness.  

that to secure these rights,  governments  are  instituted  among
men, deriving their just powers from the consent of the governed, 
that whenever any form of government becomes destructive of these 
ends,  it  is  the right of the people to alter or to abolish it,
and to institute new government, laying its  foundation  on  such
principles  and  organizing  its  powers in such form, as to them
shall seem most likely to effect their safety and happiness.  

prudence, indeed, will dictate that governments long  established
should  not  be  changed  for  light  and  transient  causes; and
accordingly all experience  hath  shewn  that  mankind  are  more
disposed  to  suffer,  while  evils are sufferable, than to right
themselves by abolishing the forms to which they are accustomed.  

but when  a  long  train  of  abuses  and  usurpations,  pursuing
invariably  the same object evinces a design to reduce them under
absolute despotism, it is their right, it is their duty, to throw 
off such government, and to provide new guards for  their  future
security.  

such has been the patient sufferance of these colonies; and  such
is  now the necessity which constrains them to alter their former
systems of government.  

the history of the present king of great britain is a history  of
repeated  injuries  and  usurpations, all having in direct object
the establishment of an absolute tyranny over these states.  

to prove this, let facts be submitted to a candid world.  

he has refused  his  assent  to  laws,  the  most  wholesome  and
necessary for the public good.  

he has forbidden his governors to  pass  laws  of  immediate  and
pressing importance, unless suspended in their operation till his 
assent  should be obtained; and when so suspended, he has utterly
neglected to attend to them.  

he has refused to pass other laws for the accommodation of  large
districts  of  people,  unless  those people would relinquish the
right of representation in the legislature, a  right  inestimable
to them and formidable to tyrants only.  

he has called together  legislative  bodies  at  places  unusual,
uncomfortable,  and  distant  from the depository of their public
records, for the sole purpose of fatiguing them  into  compliance
with his measures.  

he has dissolved representative houses repeatedly,  for  opposing
with manly firmness his invasions on the rights of the people.

he has refused for a long time after such dissolutions  to  cause
others  to  be elected; whereby the legislative powers, incapable
of annihilation, have returned to the people at large  for  their
exercise; the state remaining in the mean time exposed to all the 
dangers of invasion from without, and convulsions within.  

he has endeavoured to prevent the population of these states; for 
that  purpose  obstructing  the  laws   for   naturalization   of
foreigners;  refusing to pass others to encourage their migration
hither, and raising  the  conditions  of  new  appropriations  of
lands.  

he has obstructed the administration of justice, by refusing  his
assent to laws for establishing judiciary powers.  

he has made judges dependent on his will alone, for the tenure of 
their offices, and the amount and payment of their salaries.  

he has erected a multitude of new offices, and sent hither swarms 
of officers to harass our people and eat out their substance.  

he has kept among us, in times of peace, standing armies  without
the consent of our legislatures.  

he has  affected  to  render  the  military  independent  of  and
superior to the civil power.  

he has combined with others  to  subject  us  to  a  jurisdiction
foreign  to  our  constitution,  and  unacknowledged by our laws;
giving his assent to their acts of pretended legislation: 

for quartering  large  bodies  of  armed  troops  among  us:  for
protecting  them by a mock trial, from punishment for any murders
which they should commit on the inhabitants of these states:  for
cutting  off  our trade with all parts of the world: for imposing
taxes on us without our consent: for depriving us in many  cases,
of the benefits of trial by jury: for transporting us beyond seas 
to  be  tried  for  pretended  offenses:  for abolishing the free
system of english laws in a  neighboring  province,  establishing
therein  an  arbitrary government and enlarging its boundaries so
as to render it  at  once  an  example  and  fit  instrument  for
introducing  the  same  absolute  rule  into  these colonies: for
taking away our charters, abolishing our most valuable laws,  and
altering   fundamentally   the  forms  of  our  governments:  for
suspending  our  own  legislatures,  and   declaring   themselves
invested with power to legislate for us in all cases whatsoever.  

he has abdicated government here, by  declaring  us  out  of  his
protection and waging war against us.  

he has plundered our seas, ravaged our coasts, burnt  our  towns,
and destroyed the lives of our people.  

he  is  at  this  time  transporting  large  armies  of   foreign
mercenaries  to  compleat  the  works  of  death,  desolation and
tyranny, already begun with circumstances of  cruelty  &  prefidy
scarcely  paralleled  in  the  most  barbarous  ages, and totally
unworthy the head of a civilized nation.  

he has constrained our fellow citizens taken captive on the  high
seas   to   bear  arms  against  their  country,  to  become  the
executioners of their friend and brethren, or to fall  themselves
by their hands.  

he  has  excited  domestic  insurrections  amongst  us,  and  has
endeavoured  to  bring  on  the inhabitants of our frontiers, the
merciless indian savages  whose  known  rule  of  warfare  is  an
undistinguished destruction of all ages, sexes and conditions.  

in every stage  of  these  oppressions  we  have  petitioned  for
redress  in  the  most  humble terms: our repeated petitions have
been answered only by repeated injury.  

a prince, whose character is thus marked by every act  which  may
define a tyrant, is unfit to be the ruler of a free people.  

nor have we been wanting in attentions to our british brethren.  

we have warned them from  time  to  time  of  attempts  by  their
legislature to extend an unwarrantable jurisdiction over us.  

we have reminded them of the circumstances of our emigration  and
settlement here.  

we have appealed to their native justice and magnanimity, and  we
have  conjured  them by the ties of our common kindred to disavow
these  usurpations,  which,  would   inevitably   interrupt   our
connections and correspondence.  

they too  have  been  deaf  to  the  voice  of  justice  and  of,
consanguinity.  

we must, therefore, acquiesce in the necessity,  which  denounces
our  separation,  and  hold them, as we hold the rest of mankind,
enemies in war, in peace friends.  

we,  therefore,  the  represenatives  of  the  united  states  of
america, in general congress, assembled, appealing to the supreme 
judge  of  the  world for the rectitude of our intentions, do, in
the name, and by authority of the good people of these  colonies,
solemnly publish and declare, that these united colonies are, and 
of  right  ought to be free and independent states; that they are
absolved from all allegiance to the british crown, and  that  all
political connection between them and the state of great britain, 
is  and  ought  to  be  totally  dissolved;  and that as free and
independent states, they have full power to  levy  war,  conclude
peace,  contract  alliances,  establish  commerce,  and to do all
other acts and things which independent states may of right do.  

and for the support of this declaration, with a firm reliance  on
the  protection  of divine providence, we mutually pledge to each
other our lives, our fortunes and our sacred honor.  
!Funky!Stuff!
echo x - doi.rupp
cat > doi.rupp << '!Funky!Stuff!'
when in the course of human events it becomes necessary  for  one
people  to dissolve the political bands which have connected them
with another and to assume among the  powers  of  the  earth  the
separate  and  equal  station  to which the laws of nature and of
natures god entitle them a decent  respect  to  the  opinions  of
mankind  requires that they should declare the causes which impel
them to the separation we hold these truths to  be  self  evident
that  all  men  are  created equal that they are endowed by their
creator with certain unalienable rights that among these are life
liberty  and the pursuit of happiness that to secure these rights
governments are instituted among men deriving their  just  powers
from  the  consent  of  the  governed  that  whenever any form of
government becomes destructive of these ends it is the  right  of
the  people  to  alter  or  to  abolish it and to institute new X
government  laying  its  foundation  on   such   principles   and
organizing  its  powers  in  such form as to them shall seem most
likely to effect their safety and happiness prudence indeed  will
dictate  that  governments long established should not be changed
for light and transient causes  and  accordingly  all  experience
hath  shewn  that mankind are more disposed to suffer while evils
are sufferable than to right themselves by abolishing  the  forms
to  which they are accustomed but when a long train of abuses and
usurpations pursuing invariably the same objectevinces  a  design
to  reduce  them under absolute despotism it is their right it is
their duty to throw off such government and to provide new guards
for their future security such has been the patient sufferance of
these colonies and such is now  the  necessity  which  constrains
them  to  alter their former systems of government the history of
the present king of  great  britain  is  a  history  of  repeated
injuries   and  usurpations  all  having  in  direct  object  the
establishment of an absolute tyranny over these states  to  prove
this  let facts be submitted to a candid world he has refused his
assent to laws the most wholesome and necessary  for  the  public
good he has forbidden his governors to pass laws of immediate and
pressing importance unless suspended in their operation till  his
assent  should  be  obtained and when so suspended he has utterly
neglected to attend to them he has refused to pass other laws for
the  accommodation  of  large  districts  of  people unless those
people would  relinquish  the  right  of  representation  in  the
legislature a right inestimable to them and formidable to tyrants
only he has called together legislative bodies at places  unusual
uncomfortable  and  distant  from  the depository of their public
records for the sole purpose of fatiguing  them  into  compliance
with   his   measures  he  has  dissolved  representative  houses
repeatedly for opposing with manly firmness his invasions on  the
rights  of  the  people to cause others to be elected whereby the
legislative powers incapable of annihilation have returned to the
people  at  large  for  their exercise the state remaining in the
mean time exposed to all the dangers of invasion from without and
convulsions  within  he has endeavoured to prevent the population
of these  states  for  that  purpose  obstructing  the  laws  for
naturalization of foreigners refusing to pass others to encourage
their  migration  hither  and  raising  the  conditions  of   new
appropriations  of  lands he has obstructed the administration of
justice by refusing his assent to laws for establishing judiciary
powers  he  has  made  judges dependent on his will alone for the
tenure of their offices and  the  amount  and  payment  of  their
salaries  he  has  erected  a  multitude  of new offices and sent
hither swarms of officers to harass our people and eat out  their
substance  he  has kept amongus in times of peace standing armies
without the consent of our legislatures he has affected to render
the  military  independent  of and superior to the civil power he
has combined with others to subject us to a jurisdiction  foreign
to  our  constitution  and  unacknowledged by our laws giving his
assent to their acts  of  pretended  legislation  for  quartering
large  bodies  of  armed troops among us for protecting them by a
mock trial from punishment for  any  murders  which  they  should
commit  on  the  inhabitants  of these states for cutting off our
trade with all parts of  the  world  for  imposing  taxes  on  us
without  our  consent  for  depriving  us  in  many  cases of the
benefits of trial by jury for transporting us beyond seas  to  be
tried  for  pretended  offenses for abolishing the free system of
english laws in a neighboring province  establishing  therein  an
arbitrary  government and enlarging its boundariesso as to render
it at once an example and fit instrument for introducing the same
absolute  rule  into  these colonies for taking away our charters
abolishing our most valuable laws and altering yfundamentally
!Funky!Stuff!
echo x - newlist
cat > newlist << '!Funky!Stuff!'
code 1v <$1
echo ""
echo ""
code 1 <$1
echo ""
echo ""
code 2v <$1
echo ""
echo ""
code 2 <$1
echo ""
echo ""
code 3v <$1
echo ""
echo ""
code 3 <$1
echo ""
use <$1 | pr -w131 -5 -h "    keytext: $1            "
use <$1 | sort +2b -2.1 +0n | pr -w131 -5 -h "     keytext: $1 by first letter  "
!Funky!Stuff!
echo x - notes
cat > notes << '!Funky!Stuff!'
Notes on the Beale Ciphers

~11/?/81
The first 121 words of the Key for B1 would decipher 1/2  of  the
        message.   This  would  include  a  maximum stretch of 10
        clear text letters in a row.  

Using the DOI as a key for B1 gives mostly  garbage,  except  for
        the  curious  ocurrance  of  part  of the alphabet in the
	early part of the paper:


seq#   188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
code#  147 436 194 320  37 122 113   6 140   8 120 305  42  58 461  44 106
	a   b   c   d   e   f   g   h   i   i   j   k   l   m   m   n   o

	What are the odds that this is chance?

Other sequences of the first letters of the alphabet appear when using
the corrections described by Aaron and Matyas: "How the Message in
Paper No. 2 was Recovered"

150  251  284  308  231  124  211  486  225  401
a    a    a    b    b    c    d    e    f    f

25   485  18   436  65   84   200  283  118  320  138
a    b    b    b    c    c    c    c    d    d    e

24   283  134  92   63   246  486
a    c    b    c    d    d    e

147 436 195 320 37  122 113 6   140 8  120 305 42  58  461 44  106 301 13  408
a   b   c   d   e   f   g   h   i   i  j   k   l   m   m   n   o   h   p   p

Note that the largest number in any of the 4 sequences is 486.

Fri Feb 12 19:20:20 CST 1982
        Reworked my copy of B2 to match  the  Ward  pamphlet.   I
        included  corrections for what are almost surely printing
        errors, and left in the  counting  errors  introduced  by
        Beale.   Also  tried  generating  a  version  of  the DOI
        numbered the way Beale might have done it by  hand.   The
        assumed method is to number only every tenth (or possibly 
        every  fifth) word of the document.  The numbering errors
        can most easily be explained if the ORIGINAL  VERSION  of
        the  DOI is used.  The original is written with very long
        lines that might cause the type of counting  errors  seen
        in B2.  Most of the numbering shifts can be attributed to 
        Beale  miscounting  when  going from the end of a line to
        the beginning of the next.  My corrections are: 

        1) Between `new' and `government' insert  a  filler  word
		`X'.  The X would be encoded as 156, but is never
                used (in any of the 3 papers).  Since Beale would 
                count  from the nearest `10-mark' when converting
                a letter to its position, he would  probably  not
                see  his  error  once  the document was numbered.
                This is the only error that requires inserting  a
                word into the document.  All others are caused by 
                dropping a word (or merging them to show how they 
                were derived).  

                Note that Ward just added the word  `a'  at  this
                point (a new government).  

        2) Merge the words `object'  and  `evinces'.   Thus  code
                word 244 could be read as `o' or `e' in B3.  This 
                error  is  also unlikely to be seen by Beale once
                made.  Merging really means dropping one  of  the
                two  words merged.  The program that reads such a
                merged pair will use  the  first  letter  of  the
                string.  

        3) Number 480=people, then number 480=dissolutions.  This 
                error  is  similar  to  the  others,  except  the
                `10-marks'  are  miscounted  instead  of just the
                distance between them.   Again,  the  mistake  is
                across  a  line boundary.  For counting purposes,
                the safest thing to do seems to be  to  drop  the
                sequence:  `He  has refused for a long time after
                such dissolutions'  (Just  as  Ward  did).   Code
                words  475-484  aren't  used anywhere.  Note also
		that none of the Gillogly Strings contain numbers
                higher  than  486.  The break at this point could
                be related to these strings.  Unfortunately,  the
                numbers 485 and 486 occur AFTER the break.....  

        4) `meantime' should be counted  as  2  words.   This  is
                clear   from   inspecting   the  DOI.   mean=509,
                time=510.  In this case, most  modern  texts  are
                wrong,  and  Beale  counted correctly.  Or: count
                `remaining' as two words  since  it's  hyphenated
                across a line break.  

        5) Merge `among' and `us' as word 627.  From  this  point
                on,  the  adjustments  have  little justification
                other than that they are made in the same  manner
		as  the  previous  ones.

        6) Merge `boundaries' and `so' as word 778.  There are  4
                places  that this error could have been made.  It
                only affects a few code words.  This corrects the 
                counting errors through  code  element  #811  and
                leaves only the `x' needing adjustment.  

        There are 4 words remaining in the DOI  that  contain  an
        `x': executioners, excited, sexes, and extend.  Which (if 
        any) of these did Beale use as element 1005?   I  suggest
        an   alternative  to  `sexes'  as  is  commonly  assumed:
        `Executioners' is the sixth word of a line and this  could  be
        element  #1005  if the numbering was restarted at 1000 at
	the beginning of this line.  Actually, this is pretty weak
	reasoning.  I just haven't seen a good of explanation as
	to why 1005=X in B2.

4/16/82:
        Just recieved material ordered from the BCA: Ward's  1885
        pamphlet,  Hart's  version  and  the  '81 proceedings.  I
        found a few irritating differences between what I thought 
        were correct versions of the 3  ciphers  and  the  values
        published  in  Ward's paper.  In particular in B1 I found
        the following differences: 

		Position	Hart,etc.	Ward
		 260		 320		 324
		 405		  90		 290
		 462		 858		 868
		 516		 820		 826

	In B3 the following differences exist:

		 401		  11		   1
		 554		  29		  28

        Where did these errors come from?   Since  the  cleartext
	for  B2  is known, the errors there are understandable as
        either typesetting errors or mis-counts by the author  of
        the ciphers.  

Extending the `Gillogly strings':
        Another string emerges and the longest string is extended 
        if a count of 5 is added  to  elements  above  604.   The
        string: 

		604 230 436 664 582

        is `aabad' without the correction, and `aabcd'  with  it.
        Even more interesting is the cipher element #208  at  the
        end  of  the string: `abcdefghiijklmmnohpp'.  The element
        is 680, and is deciphered as `a' without  adding  5,  but
        becomes  `q'  by  adding  5.  Note that there is only one
        word in the entire DOI that  begins  with  `q'.   Against
        this  argument  is  the  clear(!)  requirement  that  the
        counting not be shifted by 5 for decoding B2.  

        Hammer's 1971 CACM article also notes significant  biases
        for multiples of 5 in B3.  

        Also, the second `h' in  the  string  is  represented  by
        301.  The 302nd word in my version of the DOI is `of'.  

Explanation for the Gillogly strings:
	Assume the method for encoding B1 and B2 went something like this:

        A partial list of numbers  is  prepared  by  writing  the
        alphabet  down  the left side of a piece of paper.  Words
        beginning with this  letter  are  then  noted  and  their
        position  in  the DOI is written on the appropriate line.
        This process continues until most of  the  lines  contain
        enough letters for the expected task.  B2 is then encoded 
        using  this  list;  with reference back to the DOI when a
        needed letter isn't in the prepared list, or the  encoder
        thinks a number has been used too often.  New numbers may 
        be added to the list during this process.  

        In order to encode  B1,  the  preparer  then  writes  the
        alphabet  ACROSS  THE  TOP of his prepared list of cipher
        elements  and  proceeds  as  before;  this  time  picking
        numbers  from  the  columns  instead  of rows.  Thus when
        encoding a particular word, it would be natural to  stick
        to  the top of the columns and work down while encoding a
	word.  Note that some of the Gillogly strings use numbers
        that  do  not  appear  in B2 and that this list must have
        been made up before  either  of  the  two  messages  were
        encoded.  

        If this scenario is correct, then the appearance of (say) 
        four C's  in  a  row  probably  indicate  four  different
        letters in the cleartext of B1.  

        Problems with this explanation: Some  rows  of  the  list
        would  have  only a few numbers in them and thus would be
        unlikely to appear in B1(doi).  This is  contradicted  by
        the  string:  `ijkl'.   There are only 6 words that start
        with `j' and only 2 that start with `k' in the first  811
        words  of the DOI.  Some rows of the list would also have
        many more than 26 numbers and thus  shouldn't  appear  at
        all in B1.  Finally, the BCA newsletter (June 82) article 
        by  Aaron  mentions that the key to B1 was in a format of
	25 letters per line,  basing this observation on the bias
        of numbers toward the center of a  key  list.   (3/30/83:
        This  tendency is very weak; my modulo program shows only
        one significant peak in a chart as described by Aaron) 

Tue Dec 21 16:40:48 CST 1982
        From the recent discussion  in  the  BCA  newsletter,  it
        seems that Ward really was the agent for the author.

Wed Mar 30 17:33:14 CST 1983
        Modulo tests.  Wrote a program to display the  remainders
        after  division  of  the  cipher  elements.  For example,
        there is a definite preference for multiples of 5 in  all
        3 ciphers: 

	B1 % 5, mean: 86.20, sigma:  8.30
	B1 %5 = 0: 78                            5
	B1 %5 = 1:125                                            5++++
	B1 %5 = 2: 59                     5---
	B1 %5 = 3: 80                            5
	B1 %5 = 4: 89                               5

	B2 % 5, mean:138.00, sigma: 10.51
	B2 %5 = 0:187                                         5++++
	B2 %5 = 1:134                              5
	B2 %5 = 2:145                                5
	B2 %5 = 3:140                               5
	B2 %5 = 4: 84                   5-----

	B3 % 5, mean:117.80, sigma:  9.71
	B3 %5 = 0: 81                     5----
	B3 %5 = 1:152                                       5+++
	B3 %5 = 2:111                             5
	B3 %5 = 3:121                               5
	B3 %5 = 4:124                                5

        For each message, the expected number of remainders for a 
        completely random distribution  is  printed  (the  mean),
        followed  by  the  number  of counts corresponding to one
        standard deviation away  from  the  mean  (sigma).   Each
        subsequent line shows the remainder being calculated, the 
        number  of  cipher  elements  with  this remainder, and a
        graphical representation of the deviation.  +'s  and  -'s
        after  the charted number indicate the number of standard
        deviations away from the mean that the count  represents.
        Sigmas of +/- 3 seem to be significant.  

        B2 prefers numbers evenly divisible by 5, while B3 avoids 
        them.  The pattern for all  3  ciphers  is  similar;  One
        remainder  is  preferred,  one avoided, and the remaining
        ones about random.  

        It's  not  surprising  to  find  a  particular  remainder
        preferred  over  others,  but  the  pattern for the Beale
        ciphers is peculiar.  The excess use of a  particular  is
        not  balanced  by  a  general  avoidance  of  the other 4
        remainders.  Instead a single  other  remainder  accounts
        for the excess of another.  What could cause this?  

        The pattern for B2%10 also shows  significant  deviations
        from random: 

	B2 % 10, mean: 69.00, sigma:  7.88
	B2 %10= 0:116                                                 10++++++
	B2 %10= 1: 60                           10-
	B2 %10= 2: 69                              10
	B2 %10= 3: 70                               10
	B2 %10= 4: 55                        10-
	B2 %10= 5: 71                               10
	B2 %10= 6: 74                                 10
	B2 %10= 7: 76                                  10
	B2 %10= 8: 70                               10
	B2 %10= 9: 29             10-----

	B3 % 10, mean: 58.90, sigma:  7.28
	B3 %10= 0: 30                10----
	B3 %10= 6: 87                                             10+++

        Again B2 prefers numbers  evenly  divisible  by  10,  and
        avoids  numbers  with  remainders of 9.  B3 avoids evenly
        divisible numbers, and concentrates on  remainders  of  6
        (which  is  related  to  remainders of 1 when dividing by
        5).  

Conclusions/Observations:
	1) The original DOI was the key for B2; numbering errors
		all ocurr at line break boundaries of the original DOI.
	2) A side table arranged alphabetically was prepared before
		B1 or B2 were encoded.  The Gillogly strings contain
		elements that do not appear in B2.
	3) All 3 ciphers show a bias for multiples of 5.
	4) A shift of 5 for elements >600 will create/extend
		the Gillogly strings in B1.
	5) X=1005 in B2, but no word near 1005 contains an X.
	6) The Ward pamphlet contains the words 'for silver' as the
		cleartext for B2, but the cipher contains no such
		set of numbers.
	7) J.B.Ward was not the author of "The Beale Papers". 
!Funky!Stuff!
echo x - ward
cat > ward << '!Funky!Stuff!'
.LM 8
.pl 66
.sp 10
.ce 99
THE

B E A L E    P A P E R S

containing

Authentic Statements

regarding the

TREASURE BURIED

in

1819 and 1821,

near

Bufords, in Bedford County, Virginia,

and

Which Has Never Been Recovered.


price fifty cents







Lynchburg:
Virginian Book and Job Print
1885.
.ce 0
.BP
.sp 25
.ce 99
Entered according to act of Congress, in the year 1885, by J. B. Ward, in the
Office of the Librarian of Congress, at Washington.
.ce 0
.BP
.sp 5
.ce 99
The Beale Papers

-------- **** --------

.ce 0
.PP
The following details of an incident that happened many years ago, but
which has lost none of its interest on that account, are now given to the
public for the first time.  Until now, for reasons which will be apparent
to every one, all knowledge of this affair was confined to a very limited 
circle -- to the writer's immediate family, and to one old and valued friend,
upon whose discretion he could always rely; nor was it ever intended
that it should travel beyond that circle; but circumstances over
which he has no control, pecuniary embarrassments of a pressing
character, and duty to a dependent family requiring his undivided attention,
force him to abandon a task to which he has devoted the best years
of his life, but which seems as far from accomplishment as at the start.
He is, therefore, compelled, however unwillingly, to relinquish to others
the elucidation of the Beale papers, not doubting that of the many
who will give the subject attention, some one, through fortune or accident,
will speedily solve their mystery and secure the prize which has eluded him.
.PP
It can be readily imagined that this course was not determined upon all at once;
regardless of the entreaties of his family and the persistent advice
of his friend, who were formerly as sanguine as himself, he stubbornly
continued his investigations, until absolute want stared him in the face
and forced him to yield to their persuasions.  Having now lost
all hope of benefit from this source himself, he is not unwilling that
others may receive it, and only hopes that the prize may fall to some
poor, but honest man, who will use his discovery not solely for the
promotion of his own enjoyment, but for the welfare of others.
.PP
Until the writer lost all hope of ultimate success, he toiled
faithfully at his work; unlike any other pursuit with practical
and natural results, a charm attended it, independent of the ultimate
benefit he expected, and the possibility of success lent
an interest and excitement to the work not to be resisted.  It
would be difficult to portray the delight he experienced when
accident revealed to him the explanation of the paper marked
"2." Unmeaning, as this had hitherto been, it was now fully
explained, and no difficulty was apprehended in mastering the
others; but this accident, affording so much pleasure at the time,
was a most unfortunate one for him, as it induced him to neglect
family, friends, and all legitimate pursuits for what has
proved, so far, the veriest illusion.
.PP
It will be seen by a perusal of Mr. Beale's letter to Mr. Morriss 
that he promised, under certain contingences, such as failure
to see or communicate with him in a given time, to furnishing a
key by which the papers would be fully explained.  As the failure
to do either actually occurred, and the promised explanation
has never been received, it may possibly remain in the hands of
some relative or friend of Beale's, or some other person engaged
in the enterprise with him.  That they would attach no importance 
to a seemingly unintelligible writing seems quite natural;
but their attention being called to them by the publication of
this narrative, may result in eventually bringing to light the
missing paper.
.PP
Mr. Beale, who deposited with Mr. Morriss the papers which
form the subject of this history, is described as being a gentleman
well educated, evidently of good family, and with popular
manners.  What motives could have influenced him and so many
others to risk their health and their lives in such an undertaking,
except the natural love of daring adventure, with its
consequent excitement, we can only conjecture.  We may suppose,
and indeed we have his word for so doing, that they were
infatuated with the dangers, and with the wild and roving character
of their lives, the charms of which lured them farther and
farther from civilization, until their lives were sacrificed to their
temerity.  This was the opinion of Mr. Morriss, and in this way
only can we account for the fact that the treasure for which
they sacrificed so much, constituting almost fabulous wealth,
lies abandoned and unclaimed for more than half a century.
Should any of my readers be more fortunate than myself in
discovering its place of concealment, I shall not only rejoice
with them, but feel that I have at least accomplished something 
in contributing to the happiness of others.
.sp 4
.C

The Late Robert Morriss

.CE
.PP
Robert Morriss, the custodian of the Beale papers, was born
in 1778, in the State of Maryland, but removed at an early age,
with his family, to Loudoun county, Va., where, in 1803, he
married Miss Sarah Mitchell, a fine looking and accomplished
young lady of that county.  In obtaining such a wife Mr. Morriss
was peculiarly fortunate, as her subsequent career fully
demonstrated.  As a wife she was without reproach, as a generous
and sympathizing woman she was without an equal; the
poor will long remember her charities, and lament the friend
they have lost.  Shortly after his removal to Lynchburg, Mr.
Morriss engaged in the mercantile business, and shortly thereafter
he became a purchaser and shipper of tobacco to an
extent hitherto unknown in this section.  In these pursuits he
was eminently successful for several years, and speedily accumulated
a comfortable independence.  It was during this period
of his success that he erected the first brick building of which the
town could boast, and which still stands on Main street, a monument
to his enterprise.  His private residence, the house now
owned and occupied by Max Guggenheimer, Esq., at the head
of Main street, I think he also built.  There the most unbounded 
hospitality reigned, and every facility for enjoyment was furnished.
The 
.ul
elite
of the town assembled there more frequently
than elsewhere, and there are now living some whose most
pleasant recollections are associated with that period.
.PP
The happiness of Mr. Morriss, however, was of short duration,
and reverses came when they were least expected.  Heavy
purchases of tobacco, at ruinous figures, in anticipation of an
upward market, which visions were never realized, swept from
him in a moment the savings of years, and left him nothing save
his honor and the sincere sympathy of the community with
which to begin the battle anew.
.PP
It was at this time that Mrs. Morriss exhibited the loveliest
traits of her character.  Seemingly unmindful of her condition,
with a smiling face and cheering words, she so encouraged her
husband that he became almost reconciled to his fate.  Thrown
thus upon his own resources, by the advice of his wife, he leased
for a term of years the Washington Hotel, known now as the
Arlington, on Chruch street, and commenced the business of
hotel keeping.  His kind disposition, strict probity, excellent
management, and well ordered household, soon rendered him
famous as a host, and his reputation extended even to other
States.  His was the house
.ul
par excellence
of the town, and no
fashionable assemblages met at any other.  Finding, in a few
years, that his experiment was successful and his business remunerative,
he removed to the Franklin Hotel, now the Norvell House,
the largest and best arranged in the city.  This house
he conducted for many years, enjoying the friendship and countenance 
of the first men of the country.  Amongst his guests
and devoted personal friends Jackson, Clay, Coles, Witcher,
Chief Justice Marshall, and a host of others scarcely less distinguished,
might be enumerated.  But it was not the wealthy
and distinguished alone who appreciated Mr. Morriss; the poor
and lowly had blessings for the man who sympathized with their
misfortunes, and was ever ready to relieve their distress.  Many
poor but worthy families, whose descendants are now in our
midst, can remember the fact that his table supplied their daily
food, not for days and weeks only, but for months at a time;
and as a farther instance of his forbearance and unparalleled
generosity, there are now living those who will testify to the
fact that he permitted a boarder in no way connected with him,
to remain in his house for more than twenty years, and until he
died, without ever receiving the slightest renumeration, and that
he was never made to feel otherwise than as a favored guest.
.PP
In manner Mr. Morriss was courteous and gentle; but when 
occasion demanded, could be stern and determined, too; he
was emphatically the master of his house, and from his decision
there was no appeal.  As an "old Virginia gentleman," he was
.ul
sans peur et sans reproache,
and to a remarkable extent possessed
the confidence and affection of his friends.  After a checquered
and eventful life of more than eighty years, passed mostly in business,
which brought him in contact with all classes of people,
he died, lamented by all, and leaving not an enemy behind.
His death, which occurred in 1863, was just two years subsequent
to that of his wife.  It can be truly said that no persons
ever lived in a community for such a length of time who accomplished
more good during their lives, or whose death was more
universally regretted.
.PP
It was the unblemished character of the man, and the universal
confidence reposed in him, that induced Beale to entrust
him with his secret, and in certain contingencies select him for
a most important trust;  that his confidence was not misplaced,
every one remembering Mr. Morriss will acknowledge.
.PP
It was in 1862, the second year of the Confederate war, that
Mr. Morriss first intimated the possession of a secret that was
destined to make some persons wealthy.  At first he was not
very communicative, nor did I press him to reveal what he
seemed to speak of with reluctance; in a few weeks, however, his
mind seemed changed, and he voluntarily proffered his confidence.
Inviting me to his room, with no one to interrupt us,
he gave me an outline of the matter, which soon enlisted my
interest and created an intense longing to learn more.  About
this time, however, affairs of importance required my presence
in Richmond, and prevented further communication between
us until after my return, when I found him ready to resume
the interesting subject.  A private interview was soon arranged,
and, after several preliminaries had been complied with, the
papers upon which this history is based were delivered into my
possession.
.PP
The reasons which influenced him in selecting me for the trust,
he gave, and were in substance as follows: First: Friendship
for myself and family, whom he would benefit if he could.
Second: The knowledge that I was young and in circumstances 
to afford leisure for the task imposed; and finally, a confidence
that I would regard his instructions, and carry out his wishes
regarding his charge.  These, and perhaps others, he gave during
our frequent conversations upon the subject, and doubtless
believed he was conferring a favor which would redound greatly
to my advantage.  That is has proved otherwise is a misfortune
to me, but no fault of his.  The conditions alluded to above
were that I should devote as much time as was practicable to
the papers he had given me; master, if possible, their contents,
and if successful in deciphering their meaning and eventually
finding the treasure, to appropriate one-half of his portion as a
remuneration for my services; the other half to be distributed
to certain relatives and connexions of his own, whose names he
gave me; the remainder to be held by me in trust for the benefit
of such claimants as might at any time appear, and be able to
authenticate their claims.  This latter amount, to be left intact,
subject to such demands, for the space of twenty years, when, if
still unclaimed, it should revert to myself or my heirs, as a
legacy from himself.
.PP
As there was nothing objectionable in this, the required
promise was given, and the box and the contents were placed in my
possession.
.PP
When the writer recalls his anxious hours, his midnight vigils,
his toils, his hopes and disappointments, all consequent upon
this promise, he can only conclude that the legacy of Mr. Morriss
was not as he designed it - a blessing in disguise.
.PP
Having assumed the responsibilites and consented to the
requirements of Mr. Morriss, I determined to devote as much
time to the accomplishment of the task as could be consistently
spared from other duties.  With this purpose in view, I requested
from Mr. Morriss a statement of every particular connected
with the affair, or having the slightest bearing upon it, together
with such views and opinions of his own as might ultimately
benefit me in my researches.  In reply, he gave me the following,
which I reduced to writing and filed with the papers for
future reference:
.LM +4
.PP
"It was in the month of January, 1820, while keeping the 
Washington Hotel, that I first saw and became acquainted with
Beale.  In company with two others, he came to my house
seeking entertainment for himself and friends.  Being assured
of a comfortable provision for themselves and their horses,
Beale stated his intention of remaining for the winter, should
nothing occur to alter his plans, but that the gentlemen accompanying
him would leave in a few days for Richmond, near
which place they resided, and that they were anxious to reach
their homes, from which they had long been absent.  They all
appeared to be gentlemen, well born(?), and well educated, with
refined and courteous manners and with a free and independent
air, which rendered then pecu??? attractive.  After remaining
a week or ten days, the two left, after(?) expressions of satisfaction
with their visit.  Beale, who remained, soon became a favored
and popular guest;  his social disposition and friendly demeanor
rendered him extremely popular with every one, particularly
the ladies, and a pleasant and friendly intercourse was quickly
established between them.
.PP
"In person, he was about six feet feet in height, with jet black eyes
and hair of the same color, worn longer than was the style at
that time.  His form was symmetrical, and gave evidence of
unusual strength and activity; but his distinguishing feature was
a dark and swarthy complexion, as if much exposure to the sun
and weather had thoroughly tanned and discolored him; this,
however, did not detract from his appearance, and I thought
him the handsomest man I had ever seen.  Altogether, he was
a model of manly beauty, favored by the ladies and envied by
men.  To the first he was reverentially tender and polite; to the
latter, affable and courteous, when they kept within bounds,
but, if they were supercilious or presuming, the lion was aroused,
and woe to the man who offended him.  Instances of this character
occurred more than once while he was my guest, and
always resulted in his demanding and receiving an apology.  His
character soon became universally known, and he was no longer
troubled by impertinence.
.PP
"Such a man was Thomas J. Beale, as he appeared in 1820, 
and in his subsequent visit to my house.  He registered simply
from Virginia, but I am of the impression he was from some
western portion of the State.  Curiously enough, he never
adverted to his family or to his antecedents, nor did I question
him concerning them, as I would have done had I dreamed of
the interest that in the future would attach to his name.
.PP
"He remained with me until about the latter end of the following
March, when he left, with the same friends who first accompanied
him to my house, and who had returned some days
before.
.PP
"After this I heard nothing from him until January, 1822, 
when he once more made his appearance, the same genial and
popular gentleman as before, but, if possible, darker and
swarthier than ever.  His welcome was a genuine one, as all
were delighted to see him.
.PP
"In the spring, at about the same time, he again left, but before
doing so, handed me this box, as he said, contained
papers of value and importance; and which he desired to leave
in my charge until called for hereafter.  Of course, I did not
decline to receive them, but little imagined their importance
until his letter from St. Louis was received.  This letter I carefully
preserved, and it will be given with these papers.  The
box was of iron, carefully locked, and of such weight as to
render it a safe depository for articles of value.  I placed it in a
safe and secure place, where it could not be disturbed until
such time as it should be demanded by its owner.  The letter
alluded to above was the last communication I ever received 
from Beale, and I never saw him again.  I can only suppose
that he was killed by Indians, afar from his home, though
nothing was heard of his death.  His companions, too, must all
have shared his fate, as no one has ever demanded the box or
claimed his effects.  The box was left in my hands in the Spring
of 1822, and by authority of his letter, I should have examined
its contents in 1832, ten years thereafter, having heard nothing
from Beale in the meantime; but it was not until 1845, some
twenty-three years after it came into my possession, that I
decided upon opening it.  During that year I had the lock
broken, and with the exception of the two letters addressed to
myself, and some old receipts, found only some unintelligible
papers, covered with figures, and totally incomprehensible to
me.
.PP
"According to his letter, these papers convey all the information
necessary to find the treasure he has concealed, and upon
you devolves the responsibility of recovering it.  Should you
succeed you will be amply compensated for your work, and
others near and dear to me will likewise be benefitted.  The
end is worth all your extertions, and I have every hope that success
will reward your efforts."
.LM -4
.PP
Such, in substance, was the statement of Mr. Morriss in answer
to the various interrogations propounded to him; and finding
that I could elicit no further information, I resolved to do the
best I could with the limited means at my disposal.  I commenced 
by reading over and over again the letters to Mr. Morriss,
endeavoring to impress each syllable they contained on my
memory, and to extract from them, if possible, some meaning
or allusion that might give, perhaps, a faint or barely preceptible
hint as a guide; no such clue, however, could I find, and
where or how to commence was a problem I found most difficult
to solve.  To systematize a plan for my work I arranged
the papers in the order of their length, and numbered them, 
designing to commence with the first, and devote my whole attention
to that until I had either unravelled its meaning or was
convinced of its impossibility - afterwards to take up the others
and proceed as before.
.PP
All of this I did in the course of time, but failed so completely
that my hopes of solving the mystery were well nigh abandoned.
My thoughts, however were constantly upon it,
and the figures contained in each paper, in their regular
order, were fixed in my memory.  My impression was
that each figure represented a letter, but as the numbers so
greatly exceeded the letters of the alphabet, that many different
numbers represented the same letter.  With this idea, a test
was made of every book I could procure, by numbering its letters
and comparing the numbers with those of the manuscript;
all to no purpose, however, until the Declaration of Independence
afforded the clue to one of the papers, and revived all my
hopes.  To enable my readers to better understand the explanation
of this paper, the Declaration of Independence is given
herewith, and will be of interest to those designing to follow up
my investigations.  When I first made this discovery, I thought
I had the key to the whole, but soon ascertained that further work
was necessary before my task was completed.  The encouragement 
afforded, however, by this discovery enabled me to proceed, 
and I have persisted in my labors to the present time.  Now,
as I have already said, I am forced by circumstances to devote
my time to other pursuits, and to abandon hopes which were
destined never to be realized.
.PP
The following is the letter addressed to Mr. Morriss by Beale,
and dated St. Louis, May, 1822, and was the latest communication
ever received from him;
.br
.nf
						St. Louis, Mo., May 9th, 1822.

Robt. Morris, Esq.:
.fi
.ti +3
.ul
My Esteemed Friend: -
Ever since leaving my comfortable quarters at your
house I have been journeying to this place, and only succeeded in reaching it
yesterday.  I have had altogether a pleasant time, the weather being fine and
the atmosphere bracing.  I shall remain here a week or ten days longer, then
"ho" for the plains, to hunt the buffalo and encounter the savage grizzlies.
How long I may be absent I cannot now determine, certainly no less than two
years, perhaps longer.
.ti +3
With regard to the box left in your charge, I have a few words to say, and, if
you will permit me, give you some instructions concerning it.  It contains
papers vitally affecting the fortunes of myself and many others engaged in
business with me, and in the event of my death, its loss might be irreparable.
You will, therefore, see the necessity of guarding it with vigilance and care
to prevent so great a catastrophe.  It also contains some letters addressed
to yourself, and which will be necessary to enlighten you concerning the
business in which we are engaged.  Should none of us ever return you will
please preserve carefully the box for the period of ten years from the
date of this letter, and 
if I, or no one with authority from me during that time demands its restoration,
you will open it, which can be done by removing the lock.  You will find,
in addition to the papers addressed to you, other papers which will be
unintelligible without the aid of a key to assist you.  Such a key
I have left in the hands of a friend in this place, sealed, addressed
to yourself, and endorsed not to be delivered until June, 1832.  By
means of this you will understand fully all you will be required to do.
.ti +3
I know you will cheerfully comply with my request, thus adding to the many
obligations under which you have already placed me.  In the meantime,
should death or sickness happen to you, to which all are liable, please
select from among your friends some one worthy, and to him hand this
letter, and to him delegate your authority.  I have been thus particular
in my instructions, in consequence of the somewhat perilous enterprise
in which we are engaged, but trust we shall meet long ere the time
expires, and so save you this trouble.  Be the result what it may,
however, the game is worth the candle, and we will play it to the end.
.ti +3
With kindest wishes for your most excellent wife, compliments to the
ladies, a good word to enquiring friends, if there be any, and assurances
of my highest esteem for yourself, I remain as ever,
.nf

				Your sincere friend,		T.J.B.

.fi
.PP
After the reception of this letter, Mr. Morriss states that he was
particularly careful to see the box securely placed where it could
remain in absolute safety, so long as the exigencies of the case
might require; the letter, too, he was equally careful to preserve
for future use, should it be needed.  Having done all that was 
required of him, Mr. Morriss could only await Beale's return,
or some communication from him.  In either case, he was disappointed.
He never saw Beale again, nor did a line or message
ever reach him.  The two years passed away during which
he said he would be absent, then three, four, and so on to ten;
still not a line or message to tell whether he were living or dead.
Mr. Morriss felt much uneasiness about him, but had had no means
of satisfying his doubts; ten years had passed; 1832 was at hand,
and he was now at liberty to open the box, but he resolved to
wait on, vainly hoping that something definite would reach him.
.PP
During this period rumors of Indian outrages and massacres
were current, but no mention of Beale's name ever occurred.
What became of him and his companions is left entirely to conjecture.
Whether he was slain by Indians, or killed by the
savage animals of the Rocky Mountains, or whether exposure,
and perhaps privation, did its work can never be told.  One
thing at least is certain, that of the young and gallant band, whose
buoyant spirits led them to seek such a life, and to forsake the
comforts of home, with all its enjoyments, for the dangers and
privations they must necessarily encounter, not a survivor remains.
.PP
Though Mr. Morriss was aware of the contents of the box in
1845, it was not until 1862, forty years after he received it, that
he thought proper to mention its existence, and to myself alone
did he then divulge it.  He had become long since satisfied that
the parties were no longer living, but his delicacy of feeling prevented
his assuming as a fact a matter so pregnant with consequences.
He frequently decided upon doing so, and as often
delayed it for another time; and when at last he did speak of
the matter it was with seeming reluctance, and as if he felt he
was committing a wrong.  But the story once told, he evinced
up to the time of his death the greatest interest in my success,
and in frequent interviews always encouraged me to proceed.
.PP
It is now more than twenty years since these papers came
into my hands, and, with the exception of one of them, they
are still as incomprehensible as ever.  Much time was devoted
to this one, and those who engage in the matter will be saved
what has been consumed upon it by myself.
.PP
Before giving the papers to the public, I would say a word to
those who may take an interest in them, and give them a little
advice, acquired by bitter experience.  It is, to devote only such
time as can be spared from your legitimate business to the task,
and if you can spare no time, let the matter alone.  Should you
disregard my advice, do not hold me responsible that the poverty
you have courted is more easily found than accomplishment
of your wishes, and I would avoid the sight of another
reduced to my condition.  Nor is it necessary to devote the
time that I did to this matter, as accident alone, without the
promised key, will ever develop the mystery.  If revealed by
accident, a few hours devoted to the subject may accomplish
results which were denied to years of patient toil.  Again,
never, as I have done, sacrifice your own and your family's
interests to what may prove an illusion; but, as I have already
said, when your day's work is done, and you are comfortably
seated by your good fire, a short time devoted to the subject
can injure no one, and may bring its reward.
.PP
By pursuing this policy, your interests will not suffer, your
family will be cared for, and your thoughts will not be absorbed
to the exclusion of other important affairs.  With this admonition,
I submit to my readers the papers upon which this
narrative is founded.
.PP
The first in order is the letter from Beale to Mr. Morriss,
which will give the reader a clearer conception of all the
facts connected with the case, and enable him to understand
as fully as I myself do, the present status of the affair.
The letter is as follows:
.nf

							Lynchburg, January 4th, 1822.

.fi
.ti +3
.ul
My Dear Friend Morriss: -
You will, doubtless, be surprised when you discover,
from a perusal of this letter, the importance of the trust confided to you,
and the confidence reposed in your honor, by parties whom you have never seen,
and whose names even you have never heard.  The reasons are simple and easily
told; it was imperative upon us that some one here should be selected to
carry out our wishes in case of accident to ourselves, and your reputation as a
man of the sternest integrity, unblemished honor, and business capacity, 
influenced them to select you in place of others better known, but perhaps, not
so reliable as yourself.  It was with this design that I first visited your house,
two years since, that I might judge by personal observation if your reputation
was merited.  To enable me better to do so, I remained with you
more than three months, and until I was fully satisfied as to your character.
This visit was made by the request of my associates, and you can judge from
their action whether my report was a favorable one.
.ti +3
I will now give you some idea of the enterprise in which we are engaged, and
the duties which will be required of you in connection therewith;  first assuring
you, however, that your compensation for the trouble will be ample, as you have
been unanimously made one or our association, and as such are entitled to share
equally with the others.
.ti +3
Some five years since I, in connection with several friends, who, like myself,
were fond of adventure, and if mixed with a little danger all the more acceptable,
determined to visit the great Western plains and enjoy ourselves in hunting
buffalo, grizzly bears, and such other game as the country would afford.  This,
at that time, was our sole object, and we at once proceeded to put it in execution.
On account of Indians and other dangers incident to such an undertaking,
we determined to raise a party of not less than thirty individuals, of good
character and standing, who would be pleasant companions, and financially able to
encounter the expense.  With this object in view, each one of us suggested the
matter to his several friends and acquaintances, and in a few weeks the requisite
number had signed the conditions, and were admitted as members of the party.
Some few refused to join with us, being, doubtless, deterred by the dangers,
but such men we did not want, and were glad of their refusal.
.ti +3
The company being formed, we forthwith commenced our preparations, and,
early in April, 1817, left old Virginia for St. Louis, Mo., where we expected
to purchase the necessary outfits, procure a guide and two or three servants,
and obtain such information and advice as might be beneficial hereafter.  All
was done as intended, and we left St. Louis the 19th of May, to be absent two
years, our objective point being Santa Fe, which we intended to reach in the
ensuing Fall, and there establish ourselves in winter quarters.
.ti +3
After leaving St. Louis we were advised by our guide to form a regular military
organization, with a captain, to be selected by the members, to whom
should be given sole authority to manage our affairs, and, in cases of necessity,
ensure united action.  This was agreed to, and each member of the party bound
himself by a solemn obligation to obey at all times, the orders of their captain,
or, in the event of refusal, to leave the company at once.  This arrangement
was to remain in force for two years, or for the period of our expected absence.
Tyranny, partiality, incompetency, or other improper conduct on the part of the
captain, was to be punished by deposing him from his office, if a majority of the
company desired his dismissal.  All this being arranged, and a set of laws
framed, by which the conduct of the members was to be regulated, the election
was held, and resulted in choosing me as their leader.
.ti +3
It is not my purpose now to give you details of our wanderings, or of the
pleasures or dangers we encountered.  All this I will reserve until we meet
again, when it will be a pleasure to recall incidents that will always be 
fresh in my memory.
.ti +3
About the first of December we reached our destination, Santa Fe, and prepared
for a long and welcome rest from the fatigues of our journey.  Nothing
of interest occurred during the winter, and of this little Mexican town we soon
became heartily tired.  We longed for the advent of weather which would
enable us to resume our wanderings and our exhilerating pursuits.
.ti +3
Early in March some of the party, to vary the monotony of their lives, determined
upon a short excursion, for the purpose of hunting and examining the
country around us.  They expected to be only a few days absent, but days
passed into weeks, and weeks into a month or more before we had any tidings of
the party.  We had become exceedingly uneasy, and were preparing to send
out scouts to trace them, if possible, when two of the party arrived, and gave
an explanation of their absence.  It appears that when the left Santa Fe they
pursued a northerly course for some days, being successful in finding an abundance
of game, which they secured, and were on the eve of returning when they
discovered on their left an immense herd of buffaloes, heading for a valley just
perceptible in the distance.  They determined to follow them, and secure as
many as possible.  Keeping well together, they followed their trail for two
weeks or more, securing many and stampeding the rest.
.ti +3
One day, while following them, the party encamped in a small ravine, some
250 or 300 miles to the north of Santa Fe, and with their horses tethered, were
preparing their evening meal, when one of the men discovered in a cleft of the
rocks something that had the appearance of gold.  Upon showing it to the
others it was pronounced to be gold, and much excitement was the natural
consequence.  Messengers were at once dispatched to inform me of the facts, and
request my presence with the rest of the party, and with supplies for an indefinite
time.  All the pleasures and temptations which had lured them to the
plains were now forgotten, and visions of boundless wealth and future grandeur
were the only ideas entertained.  Upon reaching the locality I found all as it
had been represented, and the excitement intense.  Every one was diligently at
work with such tools and appliances as they had improvised, and quite a little
pile had already accumulated.  Though all were at work, there was nothing
like order or method in their plans, and my first efforts were to systematize
our operations, and reduce everything to order.  With this object, an agreement
was entered into to work in common as joint partners, the accumulations of
each one to be placed in a common receptacle, and each be entitled to an equal
share, whenever he chose to withdraw it - the whole to remain under my
charge until some other disposition of it was agreed upon.  Under this
arrangement the work progressed favorable for eighteen months or more, and a great
deal of gold had accumulated in my hands as well as silver, which had likewise
been found.  Everything necessary for our purposes and for the prosecution of
the work had been obtained from Santa Fe, and no trouble was experienced in
procuring assistance from the Indians in our labors.  Matters went on thus until
the summer of 1819, when the question of transferring our wealth to some secure
place was frequently discussed.  It was not considered advisable to retain so
large an amount in so wild and dangerous a locality, where its very possession
might endanger our lives; and to conceal it here would avail nothing, as we
might at any time be forced to reveal its place of concealment.  We were in a
dilemma.  Some advised one plan, some another.  One recommended Santa Fe
as the safest place to deposit it, while others objected, and advocated its shipment
at once to the States, where it was ultimately bound to go, and where
alone it would be safe.  The idea seemed to prevail, and it was doubtless correct,
that when outside parties ascertained, as they would do, that we kept nothing
on hand to tempt their cupidity, our lives would be more secure than at present.
It was finally decided that is should be sent to Virginia under my charge, and
securely buried in a cave near Buford's tavern, in the county of Bedford, which
all of us had visited, and which was considered a perfectly safe depository.
This was acceptable to all, and I at once made preparations for my departure. The
whole party were to accompany me for the first five hundred miles, when all but
ten would return, these latter to remain with me to the end of the journey.
All was carried out as arranged, and I arrived safely with my charge.
.ti +3
Stopping at Buford's, where we remained for a month, under pretense of
hunting &c.. we visited the cave, and found it unfit for our purpose.  It was
too frequently visited by the neighboring farmers, who used it as a receptacle
for their sweet potatoes and other vegetables.  We soon selected a better place,
and to this the treasure was safely transferred.
.ti +3
Before leaving my companions on the plains it was suggested that, in case of an
accident to ourselves, the treasure so concealed would be lost to their relatives,
without some provision against such a contingency.  I was, therefore instructed
to select some perfectly reliable person, if such an one could be found, who
should, in the event of his proving acceptable to the party, be confided in to carry
out their wishes in regard to their respective shares, and upon my return report
whether I had found such a person.  It was in accordance with these instructions
that I visited you, made your acquaintance, was satisfied that you would
suit us, and so reported.
.ti +3
On my return I found the work still progressing favorably, and, by making large
accessions to our force of laborers, I was ready to return last Fall with an increased
supply of metal, which came through safely and was deposited with the
other.  It was at this time I handed you the box, not disclosing the nature of its
contents, but asking you to keep it safely till called for.  I intend writing you,
however, from St. Louis, and impress upon you its importance still more
forcibly.
.ti +3
The papers enclosed herewith will be unintelligible without the key, which
will reach you in time, and will be found merely to state the contents of our
depository, with its exact location, and a list of the names of our party, with
their places of residence, &c. I thought at first, to give you their names in
this letter, but reflecting that some one may read the letter, and thus be enabled
to impose upon you by personating some member of the party, have decided
the present plan is best.  You will be aware from what I have written, that we
are engaged in a perilous enterprise - one which promises glorious results if
successful - but dangers intervene, and of the end no one can tell.  We can only
hope for the best, and persevere until our work is accomplished, and the sum
secured for which we are striving.
.ti +3
As ten years must elapse before you will see this letter, you may well conclude
by that time that the worst has happened, and that none of us are to be
numbered with the living.  In such an event, you will please visit the place
of deposit and secure its contents, which you will divide into thirty-one
equal parts; one of these parts you are to retain as your own, freely given
to you for your services.  The other shares to be distributed to the parties
named in the accompanying paper.  These legacies, so unexpectedly received,
will at least serve to recall names that may still be cherished, though
partially forgotten.
.ti +3
In conclusion, my dear friend, I beg that you will not allow any false or
idle punctillio to prevent your receiving and appropriating the portion
assigned to yourself.  It is a gift not from myself alone, but from each and
every member of our party, and will not be out of proportion to the
services required of you.
.ti +3
I trust, my dear Mr. Morriss, that we may meet many times in the future,
but if the Fates forbid, with my last communication I would assure you
of the entire respect and confidence of
.nf

				Your friend,
								T.J.B.

.fi
.sp 3
.nf
				Lynchburg, Va., January 5th, 1822.

.fi
.ti +3
.ul
Dear Mr. Morriss. -
You will find in one of the papers, written in cipher, the names of all my
associates, who are each entitled to an equal part of our treasure, and
opposite to the names of each one will be found the names and residences of
the relatives and others, to whom they devise their respective portions.
From this you will be enabled to carry out the wishes of all by distributing
the portion of each to the parties designated.  This will not be difficult,
as their residences are given, and they can easily be found.
.sp 3
.PP
The two letters given above were all the box contained that
were intelligible; the others, consisted of papers closely covered
with figures, which were, of course, unmeaning until they
could be deciphered.  To do this was the task to which I now
devoted myself, and with but partial success.
.PP
To enable my readers to understand the paper numbered "2"
the Declaration of Independence is given, by the assistance of
which its hidden meaning was made plain:
.sp
.C
[Ward's version of the DOI appears here]
.CE
.sp
.PP
The letter, or paper, so often alluded to, and marked "2,"
which is fully explained by the foregoing document, is as
follows:
.sp
.nf
.so 2
.fi
.sp
.PP
By comparing the foregoing numbers with the corresponding numbers
of the initial letters of the consecutive words in the
Declaration of Independence, the translation will be found to be as
follows:
.sp
.ti +3
I have deposited in the county of Bedford, about four miles from Buford's, in
an excavation or vault, six feet below the surface of the ground, the following
articles, belonging jointly to the parties whose names are given in number
"3," herewith:
.ti +3
The first deposit consisted of one thousand and fourteen pounds of gold, and
three thousand eight hundred and twelve pounds of silver, deposited November,
1819.  The second was made December, 1821, and consisted of nineteen hundred
and seven pounds of gold, and twelve hundred and eighty-eight pounds of
silver; also jewels, obtained in St. Louis in exchange FOR SILVER(!!?) to
save transportation, and valued at $13,000.
.ti +3
The above is securely packed in iron pots, with iron covers.  The vault is
roughly lined with stone, and the vessels rest on solid stone, and are 
covered with others.  Paper number "1" describes the exact locality of the
vault so that no difficulty will be had in finding it.
.sp 2
.PP
The following is the paper which, according to Beale's statement,
describes the exact locality of the vault, and is marked 
"1."  It is to this that I have devoted most of my time, but,
unfortunately, without success.
.sp 2
.C
THE LOCALITY OF THE VAULT.
.CE
.nf
.so 1
.fi
.sp 2
.PP
The following paper is marked "3" in the series, and as we
are informed, contains the names of Beale's associates, who are
joint owners of the fund deposited, together with the names of
the nearest relatives of each party, with their several places of
residence.
.sp 2
.C
NAMES AND RESIDENCES.
.CE
.nf
.so 3
.fi
.sp 2
.PP
The papers given above were all that were contained in the
box, except two or three of an unimportant character, and
having no connection whatever with the subject in hand.  They
were carefully copied, and as carefully compared with the originals,
and no error is believed to exist.
.PP
Complete in themselves, they are respectfully submitted to
the public, with the hope that all that is dark in them may
receive light, and that the treasure, amounting to more than three-quarters
of a million, which has rested so long unproductive of
good, in the hands of a proper person, may eventually accomplish
its mission.
.PP
In conclusion it may not be inappropriate to say a few words
regarding myself:  In consequence of the time lost in the above
investigation, I have been reduced from comparative affluence
to absolute penury, entailing suffering upon those it was my
duty to protect, and this, too, in spite of their remonstrances.
My eyes were at last opened to their condition, and I resolved
to sever at once, and forever, all connection with the affair, and
retrieve, if possible, my errors.  To do this, as the best means
of placing temptation beyond my reach, I determined to make public
the whole matter, and shift from my shoulders my responsibility
to Mr. Morriss.
.PP
I anticipate for these papers a large circulation, and, to avoid
the multitude of letters with which I should be assailed from all
sections of the Union, propounding all sorts of questions, and
requiring answers which, if attended to, would absorb my entire
time, and only change the character of my work, I have decided
upon withdrawing my name from the publication, after assuring
all interested that I have given all that I know of the matter,
and that I cannot add one word to the statements herein contained.
.PP
The gentleman whom I have selected as my agent, to publish
and circulate these papers, was well-known to Mr. Morriss;  it
was at his house that Mrs. Morriss died, and he would have been
one of the beneficiaries in the event of my success.  Like every
one else, he was ignorant of this episode in Mr. Morriss' career,
until the manuscript was placed in his hands.  Trusting that he
will be benefited by the arrangement, which, I know, would
have met the approval of Mr. Morriss, I have left the whole
subject to his sole management and charge.  It is needless to say
that I shall await with much anxiety the development of the 
mystery.
!Funky!Stuff!