| 1 | |
|---|
| 2 | Expi2Java |
|---|
| 3 | --------- |
|---|
| 4 | This is the README for Expi2Java, an extensible code generator for security |
|---|
| 5 | protocols. |
|---|
| 6 | |
|---|
| 7 | The protocols are written in a variant of Spi calculus. A type system is used to |
|---|
| 8 | provide the needed type information and low-level implementation details for |
|---|
| 9 | every term and perform consistency checks. |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | LICENSE |
|---|
| 13 | -------------------------------------------------------------------------------- |
|---|
| 14 | Expi2Java is free software: you can redistribute it and/or modify it under the |
|---|
| 15 | terms of the GNU General Public License as published by the Free Software |
|---|
| 16 | Foundation, either version 3 of the License, or (at your option) any later |
|---|
| 17 | version. |
|---|
| 18 | |
|---|
| 19 | Expi2Java is distributed in the hope that it will be useful, but WITHOUT ANY |
|---|
| 20 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
|---|
| 21 | A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | Copyright (c) 2008-2011 Alex Busenius |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | Expi2Java originated as an extension of the Spi2Java framework and still uses |
|---|
| 28 | some of the Spi2Java code. |
|---|
| 29 | |
|---|
| 30 | Copyright (c) 2002-2008 Davide Pozza, Alfredo Pironti, Riccardo Sisto |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | See COPYING for the copy of GPL-3 license. |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | CONTACT & INFO |
|---|
| 37 | -------------------------------------------------------------------------------- |
|---|
| 38 | Expi2Java is a research prototype and is continuously under development. Feel |
|---|
| 39 | free to contact us if you encounter some problems, feedback and suggestions are |
|---|
| 40 | very appreciated. |
|---|
| 41 | |
|---|
| 42 | The homepage of the project is: |
|---|
| 43 | |
|---|
| 44 | http://www.infsec.cs.uni-sb.de/projects/expi2java |
|---|
| 45 | |
|---|
| 46 | Bugs can be reported using the public bug tracker at: |
|---|
| 47 | |
|---|
| 48 | http://www.infsec.cs.uni-sb.de/projects/expi2java/newticket |
|---|
| 49 | |
|---|
| 50 | We have a mailing list for announcements and discussions about Expi2Java: |
|---|
| 51 | |
|---|
| 52 | http://groups.google.com/group/expi2java |
|---|
| 53 | |
|---|
| 54 | If you do not have a google account, you can join the mailing group by sending |
|---|
| 55 | a mail to: |
|---|
| 56 | |
|---|
| 57 | expi2java-subscribe@googlegroups.com |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | BUILD & INSTALL |
|---|
| 61 | -------------------------------------------------------------------------------- |
|---|
| 62 | You can either build Expi2Java from source or use the provided JARs. |
|---|
| 63 | Building from source is necessary if you want to extend the provided set of |
|---|
| 64 | supported implementations of cryptographic primitives and data types. |
|---|
| 65 | |
|---|
| 66 | NOTE (especially WINDOWS users): |
|---|
| 67 | Expi2Java is written in Java and will (probably) also work on any operating |
|---|
| 68 | systems. However, it was only tested on Linux and MacOS X. |
|---|
| 69 | The provided shell scripts are NOT needed for the Expi2Java to work, their |
|---|
| 70 | purpose is only to simplify invocation by setting some default options and Java |
|---|
| 71 | class path. |
|---|
| 72 | |
|---|
| 73 | |
|---|
| 74 | Build prerequisites: |
|---|
| 75 | |
|---|
| 76 | * Ant 1.7 or newer |
|---|
| 77 | * Java JDK 1.6 |
|---|
| 78 | |
|---|
| 79 | |
|---|
| 80 | To build Expi2Java, type |
|---|
| 81 | |
|---|
| 82 | $ ant |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | To install in /usr/bin and /usr/share (WARNING: Linux-only), type as root |
|---|
| 86 | |
|---|
| 87 | $ ant install |
|---|
| 88 | |
|---|
| 89 | To install somewhere else, e.g. in /xxx/yyy (Linux and MacOS), type (as root if needed) |
|---|
| 90 | NOTE: The prefix should not contain shell extensions like ~ |
|---|
| 91 | |
|---|
| 92 | $ ant install -Dprefix=/xxx/yyy |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | To uninstall, type as root |
|---|
| 96 | |
|---|
| 97 | $ ant uninstall |
|---|
| 98 | |
|---|
| 99 | OR, if you have installed into /xxx/yyy, type (as root if needed) |
|---|
| 100 | |
|---|
| 101 | $ ant uninstall -Dprefix=/xxx/yyy |
|---|
| 102 | |
|---|
| 103 | |
|---|
| 104 | To remove all generated files, type |
|---|
| 105 | |
|---|
| 106 | $ ant clean |
|---|
| 107 | |
|---|
| 108 | |
|---|
| 109 | USAGE |
|---|
| 110 | -------------------------------------------------------------------------------- |
|---|
| 111 | The bin/ directory contains two JAR files, eXpi2Java.jar and eXpiLibrary.jar |
|---|
| 112 | |
|---|
| 113 | eXpi2Java.jar |
|---|
| 114 | Is the main program, it needs jalopy.jar, log4j.jar and bcprov-jdk16-141.jar |
|---|
| 115 | from the lib/ directory. |
|---|
| 116 | |
|---|
| 117 | eXpiLibrary.jar |
|---|
| 118 | Is the library, containing the implementations of cryptographic primitives and |
|---|
| 119 | data types used by the generated code. |
|---|
| 120 | |
|---|
| 121 | |
|---|
| 122 | The implementation of cryptographic primitives rely on Java cryptographic |
|---|
| 123 | providers. The default configurations in configs.exdef use SunJCE, SUN and |
|---|
| 124 | BC (bouncy castle, see lib/bcprov-*.jar) providers. |
|---|
| 125 | |
|---|
| 126 | |
|---|
| 127 | Expi2Java can perform 4 basic actions: |
|---|
| 128 | * pretty-print an *.exdef file |
|---|
| 129 | * pretty-print an *.expi file |
|---|
| 130 | * type-check a protocol given as an *.expi file |
|---|
| 131 | * generate Java implementation of a protocol |
|---|
| 132 | |
|---|
| 133 | Run the main program with the -h or --help switch to print the help on possible |
|---|
| 134 | parameters. |
|---|
| 135 | |
|---|
| 136 | |
|---|
| 137 | Linux/MacOSX/*n?x users can also use the provided scripts (run them without |
|---|
| 138 | parameters for short usage help): |
|---|
| 139 | * expi2java - Encapsulates the main program. |
|---|
| 140 | * parseExdef - Preselects parameter for parsing exdef files |
|---|
| 141 | * parseExpi - Preselects parameter for parsing expi files |
|---|
| 142 | * typeCheckExpi - Preselects parameter for running type-checker |
|---|
| 143 | * generateAllTests.sh - Generates Java implementation of several examples (no help screen available) |
|---|
| 144 | * generateTlsChannel.sh - Generates Java implementation of the TLS channel in the library (no help screen available) |
|---|
| 145 | * run-protocol.sh - Runs one of the generated protocol implementations |
|---|
| 146 | * generate-key-and-cert.sh - Creates the keys, certificate and CA key used by TLS server |
|---|
| 147 | |
|---|
| 148 | |
|---|
| 149 | DOCUMENTATION |
|---|
| 150 | -------------------------------------------------------------------------------- |
|---|
| 151 | Please refer to the user manual for more detailed description of usage, calculus, |
|---|
| 152 | customizing Expi2Java and extending the implementation library. |
|---|
| 153 | |
|---|
| 154 | We provide a code generation tutorial with a detailed explaination of the code |
|---|
| 155 | generation process on example of the Perrig-Song protocol. |
|---|
| 156 | The tutorial covers all needed steps from writing a formal protocol |
|---|
| 157 | specification to running the generated code. |
|---|
| 158 | |
|---|
| 159 | JavaDoc development documentation can be generated by running |
|---|
| 160 | |
|---|
| 161 | $ ant docs |
|---|
| 162 | |
|---|
| 163 | The generated files are placed in docs/javadoc/, to view it, open the file |
|---|
| 164 | docs/javadoc/index.html with your favorite browser. |
|---|
| 165 | |
|---|
| 166 | |
|---|
| 167 | CONTENTS |
|---|
| 168 | -------------------------------------------------------------------------------- |
|---|
| 169 | The Expi2Java distribution contains: |
|---|
| 170 | |
|---|
| 171 | - In the root directory: |
|---|
| 172 | This README, NEWS file describing important changes, GPL license, various helper scripts |
|---|
| 173 | |
|---|
| 174 | - bin/ directory: |
|---|
| 175 | JAR files with the main program (eXpi2Java.jar) and the library (eXpiLibrary.jar) |
|---|
| 176 | These JARs are generated when building the project |
|---|
| 177 | |
|---|
| 178 | - data/ directory: |
|---|
| 179 | Various code template files used in code generation phase |
|---|
| 180 | |
|---|
| 181 | - docs/ directory: |
|---|
| 182 | The user manual, code generation tutorial and JavaDoc development documentation |
|---|
| 183 | |
|---|
| 184 | - lib/ directory: |
|---|
| 185 | Some JAR files used by the Expi2Java framework, in particular, a Java code |
|---|
| 186 | formatter, its dependencies, additional ANT tasks and the BouncyCastle |
|---|
| 187 | security provider. |
|---|
| 188 | All shipped libraries are released under GPL-compatible licenses. More |
|---|
| 189 | details can be found in lib/lib_info.txt |
|---|
| 190 | |
|---|
| 191 | - manifests/ directory: |
|---|
| 192 | Manifests generated during the build and used to create JAR files. |
|---|
| 193 | |
|---|
| 194 | - src/ directory: |
|---|
| 195 | Expi2Java source |
|---|
| 196 | |
|---|
| 197 | - testCode/ directory: |
|---|
| 198 | The protocol implementations generated by the generateAllTests.sh script are |
|---|
| 199 | placed into this directory |
|---|
| 200 | |
|---|
| 201 | - testData/ directory: |
|---|
| 202 | Various examples of *.exdef and *.expi files. |
|---|
| 203 | Most important, the set of default configurations (exdef/configs.exdef), |
|---|
| 204 | type definitions (exdef/default.exdef) and some annotated protocol |
|---|
| 205 | definitions (expi/tls.expi, expi/perrigsong.expi, expi/http.expi, |
|---|
| 206 | expi/needham.expi, expi/andrew.expi, expi/fiaba.expi) |
|---|
| 207 | |
|---|
| 208 | - vim/ directory: |
|---|
| 209 | VIM syntax highlighting file for *.exdef, *.expi and *.pvi (ProVerif) files. |
|---|
| 210 | Some scripts and vim settings files for JavaDoc warnings filtering. |
|---|
| 211 | |
|---|
| 212 | |
|---|
| 213 | vim: tw=80 |
|---|