Subsections

2. Installation

2.1 Requirements

To use Ganzúa you'll need a full implementation of the Java 2 Runtime Environment, Standard Edition (JRE) version 1.4 or higher with an implementation of the Java API for XML Processing (JAXP) version 1.2 or higher .

  
2.2 Supported Platforms

Ganzúa is a Java application and therefore platform-independent. It should run fine on any platform with a full implementation of the Java 2 Runtime Environment, Standard Edition (JRE) version 1.4 or higher with an implementation of the Java API for XML Processing (JAXP) version 1.2 or higher.

Ganzúa has been tested and is known to work on the following platforms:

If you are able to run Ganzúa successfully on some other platform, please contact me (see chapter 5) so it can be added to this section.

  
2.3 Installing Ganzúa

This section provides information on how to install Ganzúa in the different platforms it is known to work on. Feel free to skip the sections that do not deal with the platform you want to use.

2.3.1 GNU/Linux

Getting ready

In order to run Ganzúa, you'll need an implementation of the Java 2 Runtime Environment, Standard Edition (JRE) version 1.4 or higher. If you don't have one installed on your system, you'll need to get one of the implementations available for GNU/Linux. The one used to test Ganzúa was the implementation by Sun Microsystems, which can be found at http://java.sun.com , but you might want to get IBM's (http://www.ibm.com), Blackdown's (http://www.blackdown.org) or other. Preferably install a JRE for the Java 2 Platform, Standard Edition (J2SE) 5.0 or higher, this way you may avoid updating the JAXP included with the JRE.

Installing Ganzúa

Now you are ready to install Ganzúa. To do so follow these steps:

  1. Download the binary package from Ganzúa's site: http://ganzua.sourceforge.net
  2. Extract the files from the package and place them where you want it to be installed. Check that the path to the installation directory does not include directories with names that contain characters outside the English alphabet or 0-9 (e.g. accented characters or ñ), otherwise the program may not work properly.

You should be able to run Ganzúa by invoking the command java -jar ganzua.jar from the directory Ganzúa was installed to.

Test your installation

Run Ganzúa and select Open from its File menu. Now select a cryptanalysis project from the examples found at the directory GANZÚA_HOME/examples/projects/en where GANZÚA_HOME stands for the directory Ganzúa was installed to.

If the project is opened successfully, congratulations, you may skip the rest of this chapter. But, if the project could not be opened and an error message was displayed asking you to update the version of the Java API for XML Processing (JAXP), quit the program and read the next section, which will guide you through this process.

Update your version of JAXP

If your implementation of the JRE does not include an implementation of the Java API for XML Processing (JAXP) version 1.2 or higher, you'll have to install one. The Xerces2 Java Parser (version 2.6 or higher) provides such implementation. To install it do the following:

  1. Download the application findEndorsedDirs.jar from http://ganzua.sourceforge.net . This executable JAR will tell you which are the Java endorsed standards directories (the directories where you may put the implementation of JAXP) in your implementation of the JRE.
  2. Download the latest release of the Xerces2 Java Parser from
    http://xml.apache.org/xerces2-j/
  3. Extract the files from the compressed archive.
  4. Run findEndorsedDirs with the command
    java -jar findEndorsedDirs.jar
  5. Copy all the JAR files (the files that end in .jar) from Xerces2's archive to any of the directories displayed by findEndorsedDirs. If the directory does not exist, create it.
  6. Quit all active Ganzúa programs.
  7. Run the test outlined in the previous section to confirm that the version of JAXP has been updated.

You will not need findEndorsedDirs.jar or the Xerces2 archive any more, so you may delete them.

If you have any problem, contact me (see chapter 5) so it can be addressed in the documentation in the future.

2.3.2 Mac OS X (10.3 or higher)

Getting ready

Apple's implementation of the Java 2 Runtime Environment, Standard Edition (JRE) version 1.4.1 (or higher) is included in Mac OS X 10.3 (or higher), but downloading any update to the Java platform available through Software Update may improve Ganzúa's performance and make the installation process easier. To run Software Update choose it from the Apple Menu, or choose System Preferences from the Apple menu, then choose Software Update from the View menu, and click Update Now.

Installing Ganzúa

Now you are ready to install Ganzúa. To do so follow these steps:

  1. Download the Mac OS X package from Ganzúa's site: http://ganzua.sourceforge.net
  2. Open the package and drag the directory that contains Ganzúa and some files and directories to wherever you want it installed to. Preferably place it in the Applications directory, since the program may not work properlly otherwise.
    Note that some of the files and directories in Ganzúa's folder are important to the program and you should not move or delete them from the installation directory. This is explained later on, in section 2.4.

That is it. Now you can run Ganzúa by double-clicking its icon.

Test your installation

Run Ganzúa and select Open from its File menu. Now select a cryptanalysis project from the examples found at the directory GANZÚA_HOME/examples/projects/en where GANZÚA_HOME stands for the directory Ganzúa was installed to.

If the project is opened successfully, congratulations, you may skip the rest of this chapter. But, if the project could not be opened and an error message was displayed asking you to update the version of the Java API for XML Processing (JAXP), quit the program and read the next section, which will guide you through this process.

Update your version of JAXP

If the JRE does not include an implementation of the Java API for XML Processing (JAXP) version 1.2 or higher, you'll have to install one, like the Xerces2 Java Parser. To install Xerces 2 you'll need to do the following:

  1. Download the application findEndorsedDirs.jar from http://ganzua.sourceforge.net . This executable JAR will tell you which are the Java endorsed standards directories (the directories where you may put the implementation of JAXP) in your implementation of the JRE.
  2. Download the latest release of the Xerces2 Java Parser from
    http://xml.apache.org/xerces2-j/
  3. Extract the files from the compressed archive.
  4. Run findEndorsedDirs by double-clicking the file
    findEndorsedDirs.jar
  5. Copy all the JAR files (the files that end in .jar) from Xerces2's archive to any of the directories displayed by findEndorsedDirs. If the directory does not exist, create it.
  6. Quit all active Ganzúa programs.
  7. Run the test outlined in the previous section to confirm that the version of JAXP has been updated.

You will not need findEndorsedDirs.jar or the Xerces2 archive any more, so you may delete them.

If you have any problem, contact me (see chapter 5) so it can be addressed in the documentation in the future.

2.3.3 Windows

Getting Ready

In order to use Ganzúa, you'll need an implementation of the Java 2 Runtime Environment, Standard Edition (JRE) version 1.4 or higher. If you don't have one installed on your system, or all you have is the program named Microsoft Java Virtual Machine (which is not an implementation of the JRE), you'll need to get one of the implementations available for Windows. The one used to test Ganzúa was the implementation by Sun Microsystems, which can be found at http://java.sun.com , but you might want to get IBM's (http://www.ibm.com), or other. Preferably, install a JRE for the Java 2, Standard Edition (J2SE) 5.0 or higher, this way you may avoid updating the version of JAXP included with the JRE.

Installing Ganzúa

Now you are ready to install Ganzúa. To do so follow these steps:

  1. Download the binary package from Ganzúa's site: http://ganzua.sourceforge.net
  2. Extract the files from the package and place them where you want it to be installed. Check that the path to the installation directory does not include directories with names that contain characters outside the English alphabet or 0-9 (e.g. accented characters or ñ), otherwise the program may not work properly.
    Note that some of the files and directories in Ganzúa's folder are important to the program and you should not move or delete them from the installation directory. This is explained later on, in section 2.4.

You should be able to run Ganzúa by double clicking ganzua.jar or using the command java -jar ganzua.jar from the directory Ganzúa was installed to.

Test your installation

Run Ganzúa and select Open from its File menu. Now select a cryptanalysis project from the examples found at the directory GANZÚA_HOME/examples/projects/en where GANZÚA_HOME stands for the directory Ganzúa was installed to.

If the project is opened successfully, congratulations, you may skip the rest of this chapter. But, if the project could not be opened and an error message was displayed asking you to update the version of the Java API for XML Processing (JAXP), quit the program and read the next section, which will guide you through this process.

Update your version of JAXP

If your implementation of the JRE does not include an implementation of the Java API for XML Processing (JAXP) version 1.2 or higher you'll have to install one. The Xerces2 Java Parser (version 2.6 or higher) provides such implementation. To install it do the following:

  1. Download the application findEndorsedDirs.jar from http://ganzua.sourceforge.net . This executable JAR will tell you which are the Java endorsed standards directories (the directories where you may put the implementation of JAXP) in your implementation of the JRE.
  2. Download the latest release of the Xerces2 Java Parser from
    http://xml.apache.org/xerces2-j/
  3. Extract the files from the compressed archive.
  4. Run findEndorsedDirs by double-clicking on findEndorsedDirs.jar or with the command
    java -jar findEndorsedDirs.jar
  5. Copy all the JAR files (the files that end in .jar) from Xerces2's archive to any of the directories displayed by findEndorsedDirs. If the directory does not exist, create it.
  6. Quit all active Ganzúa programs.
  7. Run the test outlined in the previous section to confirm that the version of JAXP has been updated.

You will not need findEndorsedDirs.jar or the Xerces2 archive any more, so you may delete them.

  
2.4 Configuring Ganzúa

This section will explain how Ganzúa's files are organized, what they contain and how to customize your installation.

  
2.4.1 Ganzúa's Files and Directories

2.4.1.1 Binary packages

If you downloaded a binary package you should have the following files and directories (folders). In the case of the Mac OS X package, there must be an application package instead of ganzua.jar .

 
Figure: Binary package contents
Binary package contents
COPYING
text file with the GPL, Ganzúa's software license.
ganzua.jar
an executable Java archive that contains Ganzúa.
In Mac OS X this file is inside the application package and can be accessed by selecting Show Package Contents from the contextual menu that appears after doing a Control-click on Ganzúa's icon in Finder.
 
Figure: ganzua.jar is inside the application package in Mac OS X
Show Package Contents
langFreq.jar
the utility to get the frequencies of characters, bigrams and trigrams of a language packed in an executable Java archive.
schemata
a directory that contains the W3C XML schemata used to validate that the XML files used by Ganzúa (to load ongoing projects, relative frequencies of languages, etc.) are well formed.
frequencies
a directory with relative frequencies of languages. This is the directory where Ganzúa looks for language frequencies by default.
examples
a directory with examples.
manual
the directory where you can find this manual in PDF format and the list of changes since previous versions.

2.4.1.2 Source Code Package

If you downloaded the source code package you should have the following files and directories:

 
Figure: Source code package contents
Source code package contents
COPYING
text file with the GPL, Ganzúa's software license.
build.xml
a buildfile used to compile Ganzúa using the Apache Ant build tool.
src
the directory with Ganzúa's source code.
schemata
a directory that contains the W3C XML schema files used to verify that the XML files used by Ganzúa (to load ongoing projects, relative frequencies of languages, etc.) are well formed. Just like in the binary packages.
frequencies
a directory with relative frequencies of languages. This is the directory where Ganzúa looks for language frequencies by default. Just like in the binary packages.
examples
a directory with examples. Just like in the binary packages.
manual
the directory where you can find this manual in PDF format and the list of changes since previous versions.

  
2.4.2 Required Files and Directories

To use Ganzúa you need the JAR files ganzua.jar and langFreq.jar, the schemata files they use and a default directory with language frequencies, the rest of the files are dispensable.

Ganzúa makes extensive use of XML (eXtensible Markup Language) files, they are used to save and load projects, language frequencies, and give instructions to the application langFreq.jar. XML files are similar to HTML files in that both are text files with markup tags. Ganzúa checks the structure of these files using W3C XML schemata (which are XML files themselves) that specify their build. This way, Ganzúa lets you access the data you have created and make new Ganzúa-compatible documents with any text editor, and if you use an XML editor that can use W3C XML schemata, you can validate the documents as you write them.

You can rename or move the schemata and frequencies directories if you want to put the schemata with some other W3C XML schema files or if you just don't like them where they are, but you'll have to tell the program about the changes by editing a couple of configuration files.

Moving The Schemata and Language Frequencies Directories

If you move or rename the schemata and/or language frequencies directories, you'll have to close all active Ganzúa programs and edit two configuration files to notify the program about the changes.

The configuration files are inside the JAR files, one inside ganzua.jar, the other in langFreq.jar, both are named config.properties and have the same structure. To edit these files do as you would to edit a text file in a ZIP archive (JAR files can be handled as ZIP files). If you know how to use the EMACS editor you can use it to open the JAR files and edit the config.properties files directly.

If you change the name of the schemata directory or move it, you'll have to edit the line

#schemataDir = /usr/local/share/ganzua/schemata/

Remove the # character at the beginning of the line and change the path after the = character to the full path of the directory where you put the schemata.

If you change the name of the language frequencies directory or move it, you'll have to edit the line

#langFreqDir = /usr/local/share/ganzua/frequencies/

Remove the # character at the beginning of the line and change the path after the = character to the full path of the directory where you put the language frequencies.

Remember that this has to be done on both JAR files.

  
2.5 About The Source Code Package

Since this is an open source program, the source code is available at Ganzúa's site (http://ganzua.sourceforge.net) for you to download, modify, redistribute, etc. as specified in the General Public License (GPL).

To compile the source code you'll need a compiler for the Java programming language version 1.4 or higher, and the Apache Ant build tool (http://ant.apache.org) version 1.5 or higher.

During the development of Ganzúa version 1.01, two compilers were used:

There are two Apache Ant buildfiles in Ganzúa's source code package. The first one is at the root of the package and can be used to generate the executable JARs and documentation. The second one can generate the bytecode and is in the src directory. For more information on these build files use the command ant -projecthelp in the directories where the files are located.

If you plan to run Ganzúa outside of a JAR package (as compiled by the buildfile in the src directory) you'll have to edit the file config.properties found in src/net/sourceforge/ganzua, as explained in section 2.4.2, even if you don't move the schemata or language frequencies directories. To run the program this way, you should use the command

java net.sourceforge.ganzua.Analyzer

from the src directory (Analyzer is the name of the class that contains Ganzúa's main program), or

java net.sourceforge.ganzua.LangFreq 

if you want to use the language frequencies utility.

Jesús Adolfo García Pasquel 2004-10-04