tweaks to documentation and Salsa20 fix from Sean

This commit is contained in:
Dylan McNamee 2014-09-10 14:27:08 -07:00
parent 86918fb0f2
commit 81adb95a37
5 changed files with 16 additions and 7 deletions

View File

@ -10,6 +10,8 @@
%=====================================================================
\chapter{The Cryptol Grammar}
\label{cha:cryptol-grammar}
This appendix to be filled in soon.
%% \input{appendices/CryptolEBNF.tex}
%%% Local Variables:

View File

@ -2472,7 +2472,7 @@ that you might be familiar from other languages, such as C:
-- C-like Pseudo-code!
y = i; // running value, start with i
idx = 0; // walk through the xs "array" using idx
while(idx <= length (xs)) \{
while(idx < length (xs)) \{
y = f (xs[idx], y); // compute next elt using the previous
++idx;
\}

View File

@ -33,6 +33,7 @@
%\usepackage[paperwidth=5.5in,paperheight=8.5in]{geometry}
\usepackage{geometry}
% for bound books:
%\setlength{\textwidth}{340pt}
%\setlength{\textheight}{502pt}
@ -42,7 +43,8 @@
pdftitle = \titleline,
pdfkeywords = {Cryptol, Cryptography, Programming},
pdfauthor = {Galois, Inc.},
pdfpagemode = UseOutlines
pdfpagemode = UseOutlines,
pdfborder = 0 0 0
}
\input{utils/Indexes.tex}
@ -131,10 +133,13 @@ without loss of continuity.}\end{minipage}}\end{center}}
\pagenumbering{roman}
\includepdf[pages={1},scale=1.0]{cover/CryptolSmallCover.pdf}
%% \includepdf[pages={1},scale=1.0]{cover/CryptolSmallCover.pdf}
\includepdf[pages={1},scale=1.0]{cover/ProgrammingCryptolCover.pdf}
\advance\voffset by -26pt
\setlength{\hoffset}{-26pt}
%\advance\voffset by -26pt
%\setlength{\hoffset}{-26pt}
% for bound-books
% \setlength{\oddsidemargin}{36pt}
% \setlength{\evensidemargin}{-36pt}
@ -355,6 +360,7 @@ include "../aes/AESCode.tex";
}
%%%% Grammar
%% TODO: make this not empty
\input{appendices/grammar.tex}
%%%% Glossary

View File

@ -180,9 +180,10 @@ Salsa20_expansion(k, n) = z
where
[s0, s1, s2, s3] = split("expand 32-byte k") : [4][4][8]
[t0, t1, t2, t3] = split("expand 16-byte k") : [4][4][8]
x = if(`a == 2) then s0 # (take`{16} k) # s1 # n # s2 # (take`{16} k) # s3
else t0 # (take`{16} k) # t1 # n # t2 # (take`{16} k) # t3
x = if(`a == 2) then s0 # k0 # s1 # n # s2 # k1 # s3
else t0 # k0 # t1 # n # t2 # k0 # t3
z = Salsa20(x)
[k0, k1] = (split(k#zero)):[2][16][8]
Salsa20_encrypt : {a, b} (a >= 1, 2 >= a, fin b) => ([16*a][8], [8][8], [b][8]) -> [b][8]
Salsa20_encrypt(k, v, m) = c