This skill helps you write cryptography prose and notation consistently using bibsp.sty conventions, automating acronyms, citations, and math macros.
npx playbooks add skill dbosk/claude-skills --skill writing-crypto
This project uses bibsp.sty (loaded from preamble.tex) to keep cryptography writing consistent: acronyms expand correctly and cite the right source, and common crypto notation is standardized via macro factories.
\input{preamble}
We model the adversary as \ac{PPT} and require \ac{IND-CPA} security.
We use \ac{DH} to establish a shared key and authenticate with a \ac{MAC}.
\autocite{...} for non-acronym citations in running text.bibsp.sty declares many crypto acronyms via \DeclareAcronym{...}{...}.cite = {<bibkey>}. When the acronym is used, acro can attach a citation.preamble.tex should set:\usepackage{bibsp}\acsetup{cite/cmd=\autocite}biblatex is configured so \autocite{...} produces footnote citations.Practical rule: if an acronym exists in bibsp.sty, prefer \ac{...} over spelling it out manually, and let the citation happen automatically when configured.
Use the bibsp.sty factories to define consistent notation in the preamble for each paper/chapter.
Define a scheme identifier that typesets as \mathsf{...} and supports optional “method” suffixes:
\NewScheme{\AE}{AE}
Use it like:
\AE[Enc] \textand \AE[Dec]
Define algorithm/function macros that behave like operators and accept optional argument lists.
\NewAlgorithm{\Enc}{Enc}
\NewAlgorithm{\Dec}{Dec}
\NewFunction{\Hash}{H}
Usage patterns:
c \gets \Enc[m]
\qquad
m \gets \Dec[c]
\qquad
h \gets \Hash[m]
The [...] optional argument adds parentheses, automatically using \left and \right.
Star form convention: most of these macros support a starred form (e.g., \Enc*) that draws an overline, used for “idealized/modified/adversarial” variants when you need that notation.
\NewVariable{\pk}{pk}
\NewVariable{\sk}{sk}
\NewSet{\UU}{U}
Variables typeset as math italic; sets as calligraphic.
Prefer the built-in statement macros for proofs:
We use a \ac{ZKPK} of knowledge:
$\PK[(w)]{\mathrm{stmt}(w)}$.
For Schnorr-style statements, use $\SPK[...]$ when appropriate.
(Exact \PK/\SPK usage depends on whether you include a witness list and/or side conditions; see bibsp.sty definitions if you need a specific shape.)
\ac{IND-CPA}, \ac{IND-CCA}, \ac{SUF-CMA}, \ac{INT-CTXT}, etc.bibsp.sty also provides helpers like \indcpa, \indcca.cite field in bibsp.sty, use \ac{...} and avoid adding a second manual citation.\autocite{BibKey} in prose./home/dbosk/phd/thesis/preamble.tex/home/dbosk/phd/thesis/bibsp.sty.tex files use \autocite{...}, \citeauthor{...}, and \ac{...}.Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.