Commit Graph

918 Commits

Author SHA1 Message Date
Cas Cremers
1df5bf1fc3 Fixing typos. 2012-12-15 00:00:26 +01:00
Cas Cremers
35045adf69 NEW: Scyther input files can now specify any command-line option.
By specifying:

  option "--X=Y";

in the Scyther input file, command-line options can be directly integrated.

For example, one can specify:

  option "--one-role-per-agent";
2012-12-14 23:55:07 +01:00
Cas Cremers
d88402998e NEW: Added '--one-role-per-agent' switch.
This switch disallows agents from performing multiple roles.

Conflicts:
	src/prune_theorems.c
2012-12-14 17:06:55 +01:00
Cas Cremers
8372078d07 Corrected minor comment typos.
Conflicts:
	src/prune_theorems.c
2012-12-14 17:05:20 +01:00
Cas Cremers
fb28a98086 BUGFIX: In case sources are compiled outside of git, ran into error where trying to strip None. 2012-12-14 15:35:01 +01:00
Cas Cremers
6c7493838c Implemented well-formedness check as in the 2012 book.
We check that variables occur first in receive events.
2012-12-06 09:52:13 +01:00
Cas Cremers
ae155f8169 We now also allow macro definitions in roles, and allow for macro overwrite.
In some cases, macro definitions within roles are more readable, for example for
key exchange protocols where the computations are asymmetrical.
2012-11-23 14:34:06 +01:00
Cas Cremers
a71fe51036 BUGFIX: Occurrence of multiple macro symbols in one tuple could lead to infinite loop.
The mechanism with the next pointers for tac's was working fine as long as all
tac's were unique by construction. The macro mechanism made it possible for
the same tac to occur twice in the tree. This could lead to an infinite loop.

Now we make explicit copies of the top-level tac. This should fix the problem
caused by the tuple parsing.

A more fundamental solution is to make a deep copy of the substituted terms.
2012-11-23 14:34:04 +01:00
Cas Cremers
1b4eb7cb54 BUILD: Added flag for Mac builds to enable building on 10.8 but allow also execution on 10.6 and 10.7. 2012-11-23 09:25:27 +01:00
Cas Cremers
1648d14d98 Dropped Mac PPC support for now; only Intel binaries will be available. 2012-11-22 14:35:28 +01:00
Cas Cremers
0fb7e9e24e Added support for macro definitions.
It is now possible to declare syntactic macros at the global level.

  macro ID = TERM;

After this definition, every occurrence of ID will be replaced by TERM.
For example, this can be used to avoid duplicating message definitions
among roles:

  macro M1 = { nI, I}pk(R) ;

  protocol X(I,R) {
    role I {
      send (I,R, M1);
    }
    role R {
      recv (I,R, M1);
    }
  }
2012-11-22 12:30:00 +01:00
Cas Cremers
25da320128 BUGFIX to list-length code: classical case of uninitialized variable. 2012-11-22 12:27:05 +01:00
Cas Cremers
fedd729ab2 Added support for inequality tests.
There is a new event:

  not match(t1,t2)

where t1,t2 are terms.

They are implemented by using a special claim that simply stores the
intended inequality. The pruning theorems (prune_theorems.c) ensure that
these terms never become equal. If there are equal, the constraint is
violated. As long as they are not equal, there exists a solution using
groung terms such that their instantiation is not equal.

Currently not very efficient implemented and the graph out output is
also ugly for now.

Conflicts:
	gui/Scyther/Trace.py
	src/compiler.c
	src/scanner.l
2012-11-21 13:40:15 +01:00
Cas Cremers
d4faeacd1e Implemented equality/pattern matching support.
Introduced a new event:

  match(pattern,groundterm)

This event can only be executed if pattern can be matched to groundterm.
Variable substitutions are persistent with respect to later events in
the same role.

Currently implemented as syntactic sugar, essentially unfolded in role R to:

  fresh x;
  send ( R,R, { groundterm }x );
  recv ( R,R, { pattern }x );

This work is not complete yet in the send that the output still contains
the unfolding. Ideally, the graph rendered detects this syntactic sugar
and renders a simplified event. This should be possible on the basis of
the label name prefix.

Conflicts:
	src/compiler.c
	src/parser.y
	src/scanner.l
	src/tac.h
2012-11-21 13:34:56 +01:00
Cas Cremers
1bbd2f1ab7 Introduced markers in proof output for consistency with book description. 2012-10-02 13:43:30 +02:00
Cas Cremers
fc72b5f6ff Removed remaining 'Const' declarations. 2012-07-12 13:36:40 +02:00
Cas Cremers
bb3cea7548 BUGFIX: Adversary was weakened in a previous commit wrt symmetric-key protocols.
After we merged some concepts from the compromise branch, we forgot to add
for the hardcoded PKI that the adversary also should have access to (some) symmetric
keys.
2012-07-09 11:24:42 +02:00
Cas Cremers
d44e131f63 Improved goal selection heuristic and trivial goal skipping.
After the various changes, we were no longer correctly skipping terms like pk(IV#0),
even though it is a trivial goal. This patch fixes the issue.
2012-06-12 23:12:15 +02:00
Cas Cremers
61c451d7f8 Added public functions list to knowledge structure and added AddFunction for it. 2012-06-12 23:12:15 +02:00
Cas Cremers
214e3ed09f BUGFIX: 'Empty' claims can have any arguments. 2012-06-12 23:12:14 +02:00
Cas Cremers
2ba0de6abc New refactoring of build system for linux, should be clearer.
We also avoid building the w32 binary by default.
2012-06-12 23:12:14 +02:00
Cas Cremers
f408e61b00 Removed obsolete script. 2012-06-12 23:12:14 +02:00
Cas Cremers
b26482feca Started script to describe version. 2012-06-12 23:12:14 +02:00
Cas Cremers
588ae30bef Removing obsolete 'c-minimal' terminology. 2012-05-02 10:15:45 +02:00
Cas Cremers
6fabb3b1b4 Improved checking of required parameters for various claims with informative error reporting. 2012-05-01 16:37:28 +02:00
Cas Cremers
ccae884942 Rephrasing comments. 2012-05-01 15:02:45 +02:00
Cas Cremers
5608b29dc0 Refactored first_origination code. 2012-05-01 14:46:01 +02:00
Cas Cremers
49e34e5167 CLEANUP: Forgotten garbage collection. 2012-05-01 14:27:38 +02:00
Cas Cremers
9b0915441f Synchronising MPA branch with compromise branch where possible. 2012-04-25 17:03:51 +02:00
Cas Cremers
19359f9ba9 Inherited tempfile setup from compromise branch. 2012-04-25 16:19:21 +02:00
Cas Cremers
ab324fcea8 Added syntax check for usage of agreement. 2012-04-25 15:30:15 +02:00
Cas Cremers
2242a5fcbd Fixing read->recv conventions. 2012-04-25 09:53:07 +02:00
Cas Cremers
1cbe9826ac Updated dates. 2012-04-24 13:56:51 +02:00
Cas Cremers
d9eab0bc02 CLEANUP: Remove duplicate check in pruning code. 2012-03-22 10:53:36 +01:00
Cas Cremers
aeafad484f BUGFIX: default PKI setup should have SK(E) in initial knowledge. 2011-09-08 14:49:48 +02:00
Cas Cremers
828058c3b2 BUGFIX: Weak agreement was not implemented according to Lowe's defintion. Now it is. 2011-04-26 11:50:00 +02:00
Cas Cremers
9f60184ba7 Add isTermlistSetEqual code to compare sets that are encoded as lists. 2011-04-26 11:49:40 +02:00
Cas Cremers
8ec1908306 Added cost code to match compromise branch.
Includes some refactoring in cost.c.
2011-04-26 11:49:05 +02:00
Cas Cremers
e23c79f59d CLEANUP: Refactored code. 2011-04-06 10:50:54 +02:00
Cas Cremers
61c905e922 For consistency added termlist prepend macro. 2011-04-01 15:24:55 +02:00
Cas Cremers
93cbb3e0f8 NEW: Added --role-unique switch to enforce that an agent can perform only one role. 2011-04-01 15:24:14 +02:00
Cas Cremers
4ec5ea4232 Added helper protocol support.
This is not a full copy from the compromise branch. In particular,
some counts (in arachne.c) are missing, as well as the modified dot output (dotout.c).
2011-04-01 15:23:20 +02:00
Cas Cremers
a03f06ea41 BUGFIX: Auto-claim naming scheme was context dependent.
The automatic mechanism to assign labels to claims was dependent on the
context. In practice, a claim could get a different label when analyzed in
isolation compared to when analyzed in parallel with some other protocols. This
caused problems for the multi-protocol analysis.
2011-01-27 14:12:51 +01:00
Cas Cremers
fea2bcf477 Reindenting code. 2011-01-25 17:33:12 +01:00
Cas Cremers
1814a2d7b3 BUGFIX: Removed obsolete code that was destroying commit/agreement functionality when filtering.
This is now (and has been for a while) handled by other code.
2011-01-25 17:30:59 +01:00
Cas Cremers
f883499d07 CHANGE: Changed setup of running & commit.
Now:

claim(A,Commit,B,data) => claim(B,Running,A,data) and also B is running the right protocol and role.
2011-01-24 17:32:24 +01:00
Cas Cremers
fda39f7eab BUGFIX: Skipping running/commit signals caused bugs in graphviz output. 2011-01-21 17:40:10 +01:00
Cas Cremers
5f7138c300 BUGFIX: Partial implementation of chosen name attacks could yield false type flaw attacks.
For the typed model, this was not an issue.
2011-01-18 17:03:20 +01:00
Cas Cremers
b7ab9aefeb NEW: Added default SessionKey type. 2011-01-04 15:50:47 +01:00
Cas Cremers
66e18deb3f NEW: Added claims: Commit and Running.
There are two new claims:

  claim(X,Commit,t)  : check for agreement on data
  claim(X,Running,t) : signaling claim

The property checked is that each claim Commit needs to be preceded by a Running
with an identical term t.

Cherry-picked from commit 99a6be00e9d3d219ec73665607e8a3a7d65d04d1
2011-01-04 15:50:25 +01:00
Cas Cremers
2fb0ecde97 NEW: Added Aliveness and Weak Agreement claims. 2011-01-04 15:50:25 +01:00
Cas Cremers
6afcfe1d10 NEW: Added SID & SKR dummy claims.
This allows for input file reuse among branches (i.e. compromise).
2011-01-04 15:50:25 +01:00
Cas Cremers
9624c49885 Disable some aggressive error reporting: unclear why this is actually invalid per se
in the presence of agent name variables (role names) with non-basic typing.
2010-12-31 15:43:00 +01:00
Cas Cremers
266e5fb26b BRUTUS: Added special build script.
Originates in newCompromise branch.
2010-11-11 12:14:49 +01:00
Cas Cremers
01eb5854cf EFFICIENCY: If a new dependency overlaps with an old one, we don't have to recompute the closure. 2010-11-11 10:37:18 +01:00
Cas Cremers
6cd8007ab0 EFFICIENCY: New (default) heuristic.
Given that sk/pk/k are now hardcoded, we can exploit their occurrences with this
new heuristic.

The heuristic can now scan for the lowest term depth at which either sk or k occur.
This will cause the heuristic to favor looking for sk, then sk(x), and only later
other terms. In a small test this was twice as fast. For protocols based on pk only
the performance loss should be negligible.

The old heuristic was 162, now it is 162+512 = 674.
2010-11-11 10:37:18 +01:00
Cas Cremers
fcf694dbd9 CLEANUP: Reindenting code. 2010-11-11 00:09:16 +01:00
Cas Cremers
619ecf7673 Added commented-out code to use llvm as a compiler instead of gcc when needed. 2010-11-11 00:02:36 +01:00
Cas Cremers
c25f6efd6a SPDL: Introduced 'hashfunction f;' construct to input language. 2010-11-11 00:01:31 +01:00
Cas Cremers
4ac74f321f SPDL: Introduced preconstructed PKI with pk/sk/k.
Introduced K(A1...AN) constant function for symmetric pre-shared keys.
Added inverses (pk,sk) as default constructs.
2010-11-11 00:01:31 +01:00
Cas Cremers
03a8a1b6e7 BUGFIX: Redundant parameter to eprint. 2010-11-11 00:01:17 +01:00
Cas Cremers
2557d308bb CLEANUP: Add timing output to proof output. 2010-11-11 00:01:12 +01:00
Cas Cremers
6b3d572e3b BUGFIX: Fixed long-standing bug with timer values, wrongly using CLOCKS_PER_SEC. 2010-11-10 23:55:57 +01:00
Cas Cremers
5c53d4bb9e Better reindent script (from newCompromise branch) 2010-11-10 23:55:21 +01:00
Cas Cremers
6d9d89eca2 Introduced 'fresh' for fresh value generation and added deprecation warning for 'const' usage. 2010-11-10 10:37:57 +01:00
Cas Cremers
519a9d0a81 Added factored-out 'warning_pre' function. 2010-11-10 10:37:57 +01:00
Cas Cremers
d633a62f0d BUGFIX: C-minimality was tripping over claims. 2009-01-28 20:45:58 +01:00
Cas Cremers
f21c02e772 BUGFIX: Build scripts did not always build unix version correctly. 2008-09-15 16:48:39 +02:00
Cas Cremers
6ffdda4a3c BUGFIX: Graph output correct removal of function applications.
The graph output edge remover was incorrect, and would also
remove applications that were not completely triggered by M_0 alone.
2008-08-26 13:25:43 +02:00
Cas Cremers
77cc97c03b Added a note for code cleanup. 2008-08-21 22:32:19 +02:00
Cas Cremers
0c06cb7a30 Added debug build script. 2008-08-21 21:57:42 +02:00
Cas Cremers
3e3c2d7b07 Rewrote some code for humans to read, i.e. strcmp wrapper. 2008-08-21 16:59:05 +02:00
Cas Cremers
8f01637528 Output should also yield 'recv' instead of 'read'. 2008-08-21 16:58:57 +02:00
Cas Cremers
aaf27779a3 Allow for use of RECV instead of READ.
Read will become deprecated later on.
2008-08-21 16:58:53 +02:00
Cas Cremers
739f59174f Removed unused functions. 2008-08-21 16:58:12 +02:00
Cas Cremers
1a7aa73b26 Created a small program that can find unused functions. 2008-08-21 16:56:12 +02:00
Cas Cremers
a0a377a84f Added switch to disable verbose exit codes.
In the near future, the default exit code behavior should be made obsolete anyway,
as the exit codes are not a nice way to report status.
It used to be convenient for shell scripting in early times,
when the parallel tests were run using the forward model
checker, but no modern script should be relying on it.
2008-06-16 18:57:28 +02:00
Cas Cremers
c729d13a00 Reindent of the code revealed that some was not indented nicely yet. Silly. 2008-03-23 15:56:09 +09:00
Cas Cremers
27521d0e87 Added notes. 2008-03-13 10:24:13 +01:00
Cas Cremers
0709539737 Merge branch 'master' of ssh://cremersc@buckleburg.inf.ethz.ch/home/cremersc/repos/scyther 2008-01-28 15:25:46 +01:00
Cas Cremers
a7c1d8c696 Improved handling of cases with untyped variables.
When untyped variables occur, the encryption level depth pruning is for
now unjustified. Maybe we can get a proof later.  Previously this was
hidden, which was a bad design decision.  Now the output is much
clearer.
2008-01-28 15:23:40 +01:00
Cas Cremers
03522b7108 Try to not draw duplicate arrows.
This cleans up some graphs rather nicely. There is only one potential
drawback (not observed in practive):
If two bindings have the same from/to, but different interpretations,
we might lose information. In particular the 'select' intermediate nodes might
pose a problem and we would be better off by not having any interpretation on
what is selected.
2008-01-16 11:55:15 +01:00
Cas Cremers
bf24312fb1 Disabled intruder knowledge computation.
Isolated problem causing segfault identified by Simon Meier.
2008-01-10 16:50:02 +01:00
Cas Cremers
ce9891d351 Disabled well-formedness temporarily.
Simon Meier found some problems with the draft implementation, so it is disabled
for now.
2008-01-10 16:09:24 +01:00
Cas Cremers
2d45daa8ee Introduced '-c,--characterize' switches for complete characterization.
This switch was previously known as '--state-space', but the new name is
much better.

Backwards compatibility:

'-c' was previously used by '--check', so check is now abbreviated to
'-C'.

'-s,--state-space' still works but is from now on considered to be
deprecated.
2007-11-15 21:49:56 +01:00
Cas Cremers
08bbdded3c Minor cleanup. 2007-10-22 21:42:43 +02:00
Cas Cremers
a6370726ef Cleanup. 2007-10-22 21:14:06 +02:00
Cas Cremers
b013440c8b Merge branch 'Todo' 2007-09-18 16:09:05 +02:00
Cas Cremers
2107d76532 Proof output improved for occurrences of the Athena problem. 2007-09-18 15:36:11 +02:00
Cas Cremers
59bcb18fec Caught Athena problem case.
I've added a marked for the Athena problem case, and now no more false 'complete proof' results are produced.
However, the tool reports, 'no attack within bounds', which is slightly inaccurate
depending on the interpretatio of 'bounds'.
2007-09-18 15:27:41 +02:00
Cas Cremers
8a2ae84f35 Added incompleteness marker for the untyped variables and MGDU set problem. 2007-09-17 16:54:17 +02:00
Cas Cremers
a93b555b1a Added cast to solve long-standing compilation warning.
Note that the cast does not seem to be needed after manual inspection, but
the compiler insists.
2007-09-17 16:53:37 +02:00
Cas Cremers
52e23f5c86 Merge branch 'manual' into 'master'. 2007-06-12 14:43:58 +02:00
Cas Cremers
4d1e62fac9 Removed a large number of obsolete files. 2007-06-12 14:39:08 +02:00
Cas Cremers
34ff7e28c6 Added GPL 2 notice to command-line usage of the Scyther backend.
Modified '--version' to report the Scyther license briefly, and
added '--license' to display the full license.
2007-06-11 15:05:49 +02:00
Cas Cremers
7d584cca1e Added GPL 2 License to the C sources.
A first step towards releasing Scyther completely to the public.
2007-06-11 14:01:04 +02:00
Cas Cremers
9f97e1e5d7 Moved todo text into a more sensible place. 2007-05-25 11:18:45 +02:00
Cas Cremers
76c516dee0 Merge branch 'reverting-b7' into release 2007-05-21 16:41:19 +02:00
Cas Cremers
742cbcda60 - Added some ignore patterns. 2007-05-21 13:56:00 +02:00
Cas Cremers
b80de55289 Merge branch 'testing' of cas@roivas.shape9.nl:/export/git/scyther into reverting-b7 2007-05-21 13:48:56 +02:00
Cas Cremers
461895555b - Removed Bin subdirectory and updates scripts. 2007-05-21 13:34:43 +02:00
Cas Cremers
f56a10646f Got rid of obsolete version number encoding.
The old version numbers were retrieved from SVN; of course this no longer works. Now no versions are retrieved on normal building. Instead, this is covered by the dist building script.
2007-05-20 16:08:56 +02:00
Cas Cremers
1542d65def - Big catchup commit to make sure we are up to beta7.
This includes a number of single patches, ranging from the vista fix with the buffers, to the start of many new minor features.
2007-05-18 14:06:29 +02:00
Cas Cremers
5882548643 - Forgot the bool file. 2007-05-18 13:57:33 +02:00
Cas Cremers
46636014c0 - Forgotten tempfile code. 2007-05-18 13:56:43 +02:00
Cas Cremers
7c8ca527b2 - Updates (fast forwarding to latest Scyther from svn) 2007-05-18 13:55:11 +02:00
Cas Cremers
814fbf31cd - Some obsolete bugs removed. 2007-05-18 08:11:54 +02:00
Cas Cremers
04b6ab4b36 - Added ignore patterns
- Removed some obsolete bug reports (but more pruning is needed in the future)
2007-05-18 00:34:02 +02:00
Cas Cremers
19f0019dad - Removed another obsolete file. 2007-05-18 00:13:52 +02:00
Cas Cremers
9bfa17a464 - Added todo. 2007-05-18 00:05:34 +02:00
Cas Cremers
530658b57a - Note about versions. 2007-05-17 17:47:23 +02:00
Cas Cremers
b9e31b6b47 - Got rid of more garbage. 2007-05-17 17:32:10 +02:00
Cas Cremers
a644446f62 - Some fixes. 2007-05-17 17:30:04 +02:00
ccremers
6fb4187369 - Even better. 2007-05-12 06:31:36 +00:00
ccremers
4c06d50747 - Bla. 2007-05-12 06:13:59 +00:00
ccremers
d122ae95fe - Ah, I need to specificy the file by default. Changed. 2007-05-11 23:10:11 +00:00
ccremers
807c702ee7 Tested adding a file in git, seems to work. 2007-05-11 23:10:04 +00:00
ccremers
09419702d8 - New version mechanism in place 2007-05-03 15:52:51 +00:00
ccremers
d414200c3c - Improved build process 2007-05-03 13:21:43 +00:00
ccremers
71e79b5ed7 - New build thing 2007-05-03 12:00:00 +00:00
ccremers
5b528f69ba - Cleanup 2007-05-03 11:40:58 +00:00
ccremers
4529fd4bfd - Cleanup of build files 2007-05-03 11:32:07 +00:00
ccremers
acb3f6b846 - Minor renaming of build scripts 2007-05-03 11:22:00 +00:00
ccremers
9882651f4a - Fixed role comparison bug. 2007-02-01 12:18:38 +00:00
ccremers
eaf4506634 - Warning fixes. 2007-01-31 11:23:53 +00:00
ccremers
41d811a49a - Improved error output with line number syntax. 2007-01-29 17:20:45 +00:00
ccremers
df62d65d5c - Fixes to error output 2007-01-29 15:17:11 +00:00
ccremers
cf84e83f9f - Scanned protocols for new obligatory check. 2007-01-29 15:05:15 +00:00
ccremers
9ca722e3cc - Added automatic checking of label correspondence. This will break [BREAK ALERT] some protocol files, e.g. those with weird roles. Fix them by prefixing the bang 'make' for ignoring labels. 2007-01-29 13:15:35 +00:00
ccremers
72c081c3cd - Cleanup 2007-01-27 11:16:04 +00:00
ccremers
91b52f6b4a - Removed more dead code, improved scantags.py 2007-01-27 11:07:45 +00:00
ccremers
256ec24d87 - Removed some dead code by using scantags.py 2007-01-27 10:33:15 +00:00
ccremers
1eb1e7849e - Fixes, feature additions. 2007-01-27 10:04:18 +00:00
ccremers
435bf9bb9b - Added '--scan-claims switch' 2007-01-27 09:52:44 +00:00
ccremers
139f93746d - Added switch '--max-of-role' to further restrict state space. Added for comparison testing. 2007-01-26 15:31:49 +00:00
ccremers
68047b596a - Added a scanner program to detect possibly unused code.
(Other programs that can do similar stuff seem to hickup on the nested
  functions.)
2007-01-26 13:59:15 +00:00
ccremers
eaa6ef1345 - Added feature for multi-party protocols (weaker precondition on Reachable) 2007-01-16 17:22:51 +00:00
ccremers
f20559210b - We really want a static binary if possible. 2007-01-12 22:15:52 +00:00
ccremers
e97a704e2b - Making new version numbers. 2007-01-11 11:20:55 +00:00
ccremers
888b9b611a - Generated parser/scanner files are no longer needed, as all build platforms (linux/mac) will probably have them installed. 2007-01-09 16:35:42 +00:00
ccremers
c5125fec9e - Fixed problem with dot and xml output for debug version. 2007-01-09 16:07:29 +00:00
ccremers
35bd183a20 - Fixed equality tests and related script problems. 2007-01-09 15:37:43 +00:00
ccremers
eafb56396f - Fixed new naming scheme in copy script 2007-01-09 15:28:03 +00:00
ccremers
4ba6c82968 - Generated new parser. 2007-01-09 15:27:19 +00:00
ccremers
eb7f14c891 - Fixed scanner problem (I forgot the interaction between flex and bison) 2007-01-09 15:22:34 +00:00
ccremers
c125c8f54e - Added dependencies 2007-01-09 14:47:52 +00:00
ccremers
16291579e7 - Fixed malloc problem. 2007-01-09 14:47:33 +00:00
ccremers
3aaffd3110 - Mac building should work fine now. 2007-01-09 10:55:39 +00:00
ccremers
da94176985 - Last few improvements for build scripts. 2007-01-09 09:47:06 +00:00
ccremers
7898de5f15 - Fix to find_file: this needs a path. 2007-01-09 08:54:00 +00:00