Cryptography Reference
In-Depth Information
Commands These are the basic elements for manipulating the data.
They must be individually reversible. The set of commands in-
cludes the basic arithmetic, the swap command, the if state-
ment and the for loop tool. These commands take the form of
classic LISP function calls. The prefix notation that places the
command at the front is not as annoying in this case because
arithmetic is reversible, so addition looks like this: (add first
second) . That command adds first and second and places the
result in first .
There are three other arithmetic commands: sub , mul and div ,
which stand for subtraction, multiplication and division, re-
spectively. The only restriction is that you can't multiply a num-
ber by zero because it is not reversible. This is reported by an
error message.
Output Commands There is one special command, chz ,thatuses
the bits that are being hidden to pick an output from a list.
When this command is run in reverse by the recipient, the hid-
den bits are recovered from the choice. The format is simple:
(chz ( tag tag...tag)) . The function builds up a Huffman
tree like the algorithm in Chapter 7 and uses the bits to make a
choice. The current version does not include the capability to
add weights to the choices, but this feature can be added in the
future.
The tags can point to either a variable or a constant. In most
cases, they'll point to strings that are stored as constants. That's
the most efficient case. In some cases, the tags will contain
other tags. In this case, the choose function evaluates that tag
and continues down the chain until it finds a string to output.
For practical reasons, a programmer should be aware of the
problems of reversibility. If two different tags point to the same
string, then there is no way for the hidden bits to be recovered
correctly. This is something that can't be checked in advance.
The program can check this on the fly, but the current imple-
mentation doesn't do it.
Code Branches There is an if statement that can be used to send
the evaluation down different branches. The format is (if
(test if-branch else-branch) .Theprogramevaluatesthe
test and if it is true, then it follows the if-branch otherwise
it follows the else-branch .
The format of the test is quite similar to general LISP. For in-
stance, the test (gtab) returns true if a is greater than b .The
Search WWH ::




Custom Search