cpsa

Symbolic cryptographic protocol analyzer

Latest on Hackage:3.3.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed
Maintained by mliskov@mitre.org
CPSA: Cryptographic Protocol Shapes Analyzer

This program has been built and tested using Haskell Platform.
It is available from <http://haskell.org> or from an operating
system specific source. The name of the Linux package is usually
haskell-platform.

If the Internet is available, install CPSA with:

$ cabal update
$ cabal install cpsa

Find the documentation directory by typing "cpsa -h" in a command
shell, and view index.html in a browser.

INSTALLING FROM A TARBALL

QUICK START (Linux)

: To build and install CPSA type:
$ make
$ make install

: To analyze a protocol you have put in prob.scm type:
$ cpsa -o prob.txt prob.scm
$ cpsagraph -o prob.xhtml prob.txt
$ firefox -remote "openFile(`pwd`/prob.xhtml)"

: Documentation and samples are in the directory given by
$ cpsa -h

: To view the user guide:
$ firefox -remote "openFile($HOME/share/cpsa-X.Y.Z/doc/cpsauser.html)"
: where X.Y.Z is the CPSA version number.

QUICK START (Mac)

: To build and install CPSA type:
$ make
$ make install

: To analyze a protocol you have put in prob.scm type:
$ cpsa -o prob.txt prob.scm
$ cpsagraph -o prob.xhtml prob.txt
$ open prob.xhtml

: Documentation and samples are in the directory given by
$ cpsa -h

: To view the user guide:
$ open $HOME/share/cpsa-X.Y.Z/doc/cpsauser.html
: where X.Y.Z is the CPSA version number.

QUICK START (Windows)

The software has been tested on a Windows system on which neither
MinGW or Cygwin has been installed. Install GHC and then run the
"setup.bat" batch file with administrator privileges.

If you do not have administrator privileges, run:

C:\...> runghc Setup.hs configure --user
C:\...> runghc Setup.hs build

The executables will be found in the dist\build subdirectories.

Documentation and samples are in the directory given by
C:\...> cpsa -h

The installed programs can be run from the command prompt or via a
batch file. Alternatively, copy doc/Make.hs into the directory
containing your CPSA problem statements, and load it into a Haskell
interpreter. Read the source for usage instructions.

MAKEFILE

The file $HOME/share/cpsa-X.Y.Z/doc/cpsa.mk contains useful GNU Make
rules for inclusion, where X.Y.Z is CPSA version number.

Alternatively, copy the file Make.hs in the same directory into the
directory containing your CPSA problem statements. The source file
has usage instructions.

PARALLELISM

CPSA is built so it can make use of multiple processors. To make use
of more than one processor, start CPSA with a runtime flag that
specifies the number of processors to be used, such as "+RTS -N4
-RTS". The GHC documentation describes the -N option in detail.

DOCUMENTATION

The starting point for CPSA documentation doc/index.html. Most users
should read it and skip the rest of this section.

To build the documentation, the file supp-pdf.tex must be installed.
It is part of the TexLive texmf ConTeXt package. On Linux, the name
of the package is context or texlive-context. The design document and
the specification document require the xy-pic package, which is
included in texlive-pictures.

The documentation includes a user guide as an XHTML document, and
three LaTeX documents. The CPSA Primer provides the background
required to make effective use of the CPSA tool collection. For those
interested in the implementation, The CPSA Theory contains a
high-level description of the algorithm and the current state of the
effort to show that when program terminates, it produces a description
of every possible execution of the protocol consistent with the
initial point-of-view skeleton. The CPSA Specification formally
describes the implemented algorithm as a term reduction system. The
CPSA Design describes implementation details and assumes The CPSA
Specification has been read. The CPSA Design should be read if one is
interested in reading the Haskell source for the tool collection.

TEST SUITE

: To run the test suite type:
$ ./cpsatst

Tests with the .scm extension are expected to complete without error,
tests with the .lsp extension are expected to fail, and tests with the
.lisp extension are not run. New users should read tst/README, and
then browse the files it suggests while reading CPSA documentation.

Don't develop your protocols in the tst directory. The Makefile is
optimized for testing the cpsa program, not analyzing protocols.

ADDITIONAL PROGRAMS

The src directory of the source distributions includes programs
written in Scheme, Prolog, and Elisp for performing tasks. Use them
as templates for your special purpose CPSA analysis and transformation
needs. Also, when given the --json option, the CPSA pretty printer
cpsapp will transform CPSA S-expressions into JavaScript Object
Notation (JSON).

On Linux, the GHC runtime can request so much memory that thrashing
results. The script in src/ghcmemlimit sets an environment variable
that limits memory to the amount of free and reclaimable memory on
your machine.

KNOWN BUGS

Variable separation in generalization fails to separate variables in
terms of the form (ltk a a).

Changes

2016-06-22 John D. Ramsdell <ramsdell@mitre.org>

* cpsa.cabal (Extension): Add allow ambiguous types when compiling
with GHC 8.0.0 or later.

2016-06-21 Moses D. Liskov <mliskov@mitre.org>

* src/CPSA/DiffieHellman/Algebra.hs: Added code to implement the
"tag" sort, which quoted string tags belong to.

2016-06-03 Moses D. Liskov <mliskov@mitre.org>

* doc/examples/IKE_variants.tar.gz: Added this compressed archive
of IKEv1 and IKEv2 variant input files.

2016-03-30 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/SAS/SAS.hs: Added support for fringe skeletons so that
cpassas makes use of depth limited output. When a tree depth
limit is exceeded, a fringe labeled skeleton is printed. cpsasas
produces a sentence with a right-hand-side that encodes both the
shapes and the fringe. Thus, when cpsa is running the a tree
depth limit of one, cpsasas computes a cohort analysis sentence.

2016-03-29 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Reduction.hs (LPreskel): Added a depth field, so
that CPSA aborts when the depth of one branch exceeds a bound.

* src/CPSA/Lib/Algebra.hs: Added escapeSet to Term class and remove
protectors, thus computing the escape set in a more
straightforward way.

2015-11-23 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/SAS/Main.hs (main): Changed start up so that the herald
is read and used to find the correct algebra for further
processing.

2015-10-02 John D. Ramsdell <ramsdell@mitre.org>

* doc/{index,cpsauser}.html: Added width limit of 48em.

2015-07-09 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Graph/ExpandedView.hs (purgeTraces): By default, the
graph program now does not show traces in skeletons. Added
--show-traces option to the graph program, which restores the
previous behavior and traces are displayed in skeletons.

2015-07-02 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Algebra.hs: Added constituent to the algebra
interface and the algebras. An atom is a constituent of a term if
the atom is among the set of atoms required to construct the term.
Changed occursIn so that it just applies to variables.

2015-07-01 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/{Basic,DiffieHellman}/Algebra.hs (occursIn): Restricted
first argument of occursIn to variables and atoms and corrected
the implementation.

2015-06-30 John D. Ramsdell <ramsdell@mitre.org>

* cpsa3.cabal (Version): Tagged as 3.2.2.

2015-06-25 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Strand.hs (geq): Removed dynamic role specific test
because it erroneously reports violations. The existing static
role specific test correctly does the job.

2015-05-26 John D. Ramsdell <ramsdell@mitre.org>

* cpsa3.cabal (Version): Tagged as 3.2.1.

* src/CPSA/DiffieHellman/Algebra.hs (displayTerm): Made it so
that CPSA prints each bltk atoms in a canonical form so that the
graph program draws solid arrows when it should.

2015-04-27 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Loader.hs (ReturnFail): Added ReturnFail Monad so
that fail is correctly handled. Added Functor and Applicative
instance to support GHC 7.10 base library.

2015-04-20 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Characteristic.hs (mkDcls): Fixed tag for non-orig
and pen-non-orig.

2015-04-10 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Strand.hs (mkListener): The role used for listener
strands is now the one stored in the protocol. It has a single
variable x of sort mesg as its set of variables. This change
enables satisfaction checking on skeleton that include listeners.

2015-04-07 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Strand.hs (toSkeleton): Removed hulling to the
process of converting an input preskeleton into a skeleton as it
causes bugs in printing.

* Imported CPSA2's implementation of goals and expunged support
for subgoals.

2015-03-27 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Strand.hs (toSkeleton): Added hulling to the
process of converting an input preskeleton into a skeleton.

2015-03-25 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Goal.hs: Added uniq to goal language.

2015-03-17 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/SAS/SAS.hs (form): Generate a defsas form rather than a
naked sentence.

* src/CPSA/Lib/Loader.hs (loadPrimary): Renamed equals function
symbol to =.

2015-03-05 John D. Ramsdell <ramsdell@mitre.org>

* cpsa3.cabal (Version): Tagged as 3.2.0.

2015-02-20 John D. Ramsdell <ramsdell@mitre.org>

* Added support for subgoals within point-of-view skeletons. The
subgoals are evaluated for each shape, and (satisfies-a-subgoal)
is added to a shape when it satisfies one of the subgoals.

2014-12-11 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Entry.hs (defaultOptions): Changed the default
strand bound to 12.

2014-11-15 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/SAS/SAS.hs: Changed the language used for a shape
analysis sentence to be node-oriented.

2014-11-07 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Loader.hs (loadPriorities): Allowed priority
declarations on state synchronization nodes other than
initiatizers.

2014-11-07 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Cohort.hs (explainable): Added the nodes reachable
by strand succession so that a transition can be explained by a
previous transition within a strand.

2014-10-31 John D. Ramsdell <ramsdell@mitre.org>

* Changed the name of the logic producing program to cpsa3sas.

2014-09-01 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/Strand.hs (noStateSplit): An observer node should have
at most one transition node after it too.

2014-08-31 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/State.hs: Made labels optional. Use "tran" for
state synchronization events with labels, and "sync" for ones
without.

2014-08-29 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/Lib/*.hs: Added support for analyzing protocols with
state. A state synchronization event sync was added to the events
that can occur in a trace, along with a new method for state-based
augmentation. An example using sync events is in
tst/envelope.scm.

2014-08-26 John D. Ramsdell <ramsdell@mitre.org>

* cpsa3.cabal: Removed cpsaparameters program.

2014-08-25 John D. Ramsdell <ramsdell@mitre.org>

* src/split.py: Added the skeleton split program that copies the
skeletons in a CPSA source file into separate files.

2014-08-23 John D. Ramsdell <ramsdell@mitre.org>

* src/cpsajson.py (load): Added a reader in Python for JSON
produced by CPSA's pretty printer program cpsa3pp -j.

2014-08-22 John D. Ramsdell <ramsdell@mitre.org>

* src/CPSA/JSON/Main.hs: Added the program cpsa3json that
translates JSON encoded CPSA into CPSA S-Expressions. It expects
the JSON input to follow the conventions of the JSON produced by
the cpsapp program when given the -j option.

* src/CPSA/Lib/SExpr.hs (numOrSym): Enabled parsing a number with
a plus sign by removing the sign before translating the string of
digits into a number.

2014-06-12 John D. Ramsdell <ramsdell@mitre.org>

* cpsa3.cabal (Version): Tagged as 3.0.3.

2014-02-06 John D. Ramsdell <ramsdell@mitre.org>

* cpsa3.cabal (Version): Tagged as 3.0.2.

2013-12-14 John D. Ramsdell <ramsdell@mitre.org>

* cpsa3.cabal (Version): Tagged as 3.0.1.

* cpsa3.cabal (Extra-Source-Files): Added more DH tests

2013-03-12 John D. Ramsdell <ramsdell@mitre.org>

* src/CPET/Annotations/Annotations.hs (obligation): Replaced an
irrefutable pattern that raised an exception with a maybeToList.

2013-02-21 John D. Ramsdell <ramsdell@mitre.org>

* src/CPET/DiffieHellman/Algebra.hs: Added the Diffie-Hellman
algebra based on Abelian groups.

* src/CPET/Basic/Algebra.hs: Removed support for GHC 6.x.

2013-02-06 John D. Ramsdell <ramsdell@mitre.org>

* cpet.cabal (Version): Tagged as 0.0.0.
Depends on:
Used by 1 package:
comments powered byDisqus