\documentclass[12pt]{article}
\usepackage[
    web={pro,forpaper,tight},
    eforms
]{aeb_pro}
% private package
%\usepackage[usecmtt]{myriadpro}

\DeclareDocInfo
{
    title={Certification Signing using AeB Pro},
    author=D. P. Story,
    university=Acro\negthinspace\TeX.Net,
    email=dpstory@acrotex.net,
    subject={How to sign a signature field},
    keywords={digital signatures, signing},
    talksite=\url{http://www.acrotex.net},
    talkdate={\today},
    copyrightStatus=True,
    copyrightNotice={Copyright (C) \the\year, D. P. Story},
    copyrightInfoURL=http://www.acrotex.net
}
\preparedLabel{AeB Blog}
\talkdateLabel{Published:}
\nocopyright

\DeclareInitView
{%
    windowoptions={showtitle}
}

\DeclarePageLayout
{%
    textwidth=\paperwidth-3in,
    oddsidemargin=.5in,
    evensidemargin=0pt,
    marginparwidth=0pt,
    marginparsep=0pt,
}

\newcommand{\cs}[1]{\texttt{\char`\\#1}}

\pagestyle{empty}
\parskip\medskipamount
\parindent0pt

\begin{docassembly}
\sigInfo{
    cSigFieldName: "sigOfDPS",
    cert: "D_P_Story.pfx", password: "mypassword",
    cLegalAttest: "Trust me and be at ease.",
    oInfo: { location: "Niceville, FL",
             reason: "This is a reason",
             contactInfo: "dpstory@acrotex.net",
             appearance: "My Signature" },
    sv: { mdp: "defaultAndComments" }
};
\signatureSign
\end{docassembly}


\begin{document}

\maketitle


\hfill\smash{\raisebox{-\baselineskip}{March 23, 2009}}

\begin{tabular}{@{}ll}
To:         &Honorable Barrister Maxwell Frimpong\\
From:       &D. P. Story\\
Subject:    &On Business Proposal\\
\end{tabular}

\vspace{2\baselineskip}

Dear Mr.\ Frimpong;

Thank you for thinking of me concerning an ``important business
proposal'' in your recent and brief email to me on March 23, 2009.
Recovering \$12,000,000 (twelve million  Us dollars) in claims
sounds intriging and exciting to me. Such a large amount of money
would certainly come in handy in these tough times. Yet,
regrettably, I must decline you kind offer; though I am in
retirement, I am, none-the-less, quite busy lately sorting my button
collection, and don't really have the time to pick up all this easy
money.

Thank you again, Barrister Frimpong, for your offer. Please keep me
in mind should future opportunities arise.

\vspace{2\baselineskip}

Regards,\\
\sigField{sigOfDPS}{2.5in}{4\baselineskip}\\[3pt]
Dr.\ D. P. Story\\
Department of Mathematics,\\
The Talking University\\
Talkville, FL 12345\\
\texttt{dpstory@uakron.edu}

\newpage

\section{Creating and Signing a Certification Signature Field}

The \textsf{eforms} package can create a signature field with the \cs{sigField} command, and
using the \textsf{aeb\_pro} package with its \texttt{docassembly} environment, can also sign the field
from a {\LaTeX} source.

The {\LaTeX} code for creating the signature field of this document is
\begin{small}
\begin{verbatim}
Best regards,\\
\sigField{sigOfDPS}{2.5in}{4\baselineskip}\\[3pt]
Dr.\ D. P. Story\\
Department of Mathematics,\\
Talking University\\
Talkville, FL 12345\\
\texttt{dpstory@uakron.edu}
\end{verbatim}
\end{small}
The \cs{sigField} command appears in the second line, and uses the usual syntax
for form fields, as defined in the \textsf{eforms} package. The optional parameter,
shown used in this example, is used to change the appearance of the (unsigned) field,
and to associate JavaScript actions.

Once the field is created, it can be signed using the Acrobat user
interface, or programmatically, from the {\LaTeX} source file.

What is certification signing? To quote \textsl{Digital Signature
User Guide for Acrobat 9.0 and Adobe Reader 9.0} found at the
\href{http://www.adobe.com/go/acrobat_security}{Acrobat Security}
\begin{quote}
Certifying a document enables the first signer attest to its
contents and specify the types of changes permitted for the document
to remain certified. Certification helps document authors and
recipients determine that documents are legitimate and tamper-proof,
thereby enabling trustworthy online transactions and more secure
communications.
\end{quote}

To obtain certification signing, the field method
\texttt{signatureSetSeedValue} is used to seed the field (before
signing) with the \texttt{mpd} key which is used to force a
certification signature. The values of \texttt{mdp} can be
\texttt{allowNone}, \texttt{default}, \texttt{defaultAndComments},
and \texttt{allowAll}. Again from \textsl{Digital Signature
User Guide for Acrobat 9.0 and Adobe Reader 9.0}
\begin{itemize}
\item \texttt{allowAll}: Do not use \texttt{allowAll} unless you
    want to force an approval signature since this value results in MDP
    not being used for the signature and therefore doesn't force a
    certifying signature.
\item \texttt{allowNone}: Document changes invalidate the signature
    and lock the author's signature. \texttt{allowNone} bypasses any
    custom \texttt{legalAttestations} because no document changes can occur and
    the user does not therefore need to be warned about malicious
    content. Do not use with \texttt{legal\-Attestations}.
\item \texttt{default}: Allow form field fill-in if fields are
    present in the document as well as additional signatures. Other
    changes to the document invalidates the signature.
\item \texttt{defaultAndComments}: Allow form field fill-in if
    fields are present in the document and allows annotations (comments)
    to be added, deleted, or modified as well as additional signatures.
    Other changes to the document invalidates the signature. Note that
    annotations can be used to obscure portions of a document and
    thereby affect the visual presentation of the document.
\end{itemize}

The code for the signature field of this document is

\begin{small}
\begin{verbatim}
\begin{docassembly}
\sigInfo{
    cSigFieldName: "sigOfDPS",
    cert: "D_P_Story.pfx", password: "mypassword",
    cLegalAttest: "Trust me and be at ease.",
    oInfo: { location: "Niceville, FL",
             reason: "This is a reason",
             contactInfo: "dpstory@acrotex.net",
             appearance: "My Signature" },
    sv: { mdp: "defaultAndComments" }
};
\signatureSign
\end{docassembly}
\end{verbatim}
\end{small}%
where I have changed the value of the \texttt{password} key to
protect my secrets. The first command, \cs{sigInfo}, creates an
JavaScript object, \texttt{oSigInfo}. The command \cs{signatureSign}
uses the information in this object to sign the field designated by
the \texttt{cSigFieldName} property. When \cs{signatureSign} is expanded,
the JavaScript created tests where there is a \texttt{sv} property
in the \texttt{oSigInfo} object; if so, it gathers the data from the
\texttt{sv} property, and calls \texttt{oSigField.signatureSetSeedValue},
where \texttt{oSigField} is the field object of the signature field.

Notice that the value of \texttt{mdp} is
\texttt{"defaultAndComments"}, so form fill-in are available, and
comments are allowed without invalidating the certification signature.

Additional information on signatures can be found
at the \href{http://www.adobe.com/go/acrobat_developer}{Acrobat Developer Center};
or go to the \href{http://www.adobe.com/go/acrobat_security}{Acrobat Security} page;
look for the document titled \textsl{Digital Signature User Guide for Acrobat 9.0
and Adobe Reader 9.0}.

The \emph{JavaScript for Acrobat API Reference}\footnote{Available through the
\href{http://www.adobe.com/go/acrobat_developer}{Acrobat Developer Center}.} for details
on these methods and their parameters.

Now, back to my retirement.

\end{document}

