EGACryptor

EgaCryptor is a JAVA based client, which enables submitters to produce EGA compliant files by encrypting each file to be submitted and generating the encrypted and unencrypted md5sum for each file. The resulting encrypted data and md5sum files may then be uploaded to your submission account using FTP or Aspera.

Download EgaCryptor

The required jar files can be obtained by downloading EgaCrytptor jar file

After the file has been downloaded, extraction is required

Install the EgaCryptor

The EgaCryptor tool requires Java JRE 6 or OpenJDK

To enable file encryption, unlimited strength JCE policy files must be installed if you are using JAVA JRE.

Installing the JCE policy files (due to licensing terms and conditions the required policy files must be downloaded direct from the ORACLE website) :

  1. Download the unlimited strength JCE policy files (JRE 6 / JRE 7/ JRE 8)
  2. Uncompress and extract the downloaded file.
  3. This will create a subdirectory called JCE. This directory contains the following files: README.txt, COPYRIGHT.html, local_policy.jar and US_export_policy.jar
  4. Install the two policy JAR files by replacing the existing ones in your java home directory.
  5. The standard place for JCE jurisdiction policy JAR files is:
  6. Install the two policy JAR files by replacing the existing ones in your directory.
  7. The standard place for JCE jurisdiction policy JAR files is: /lib/security [Unix] or \lib\security [Win32]

Notes: refers to the directory where the Java SE Runtime Environment (JRE) was installed.

Using the EgaCryptor

Below we are presenting 3 possible worked examples on the usage of the EgaCryptor tool

Encrypting a single file :
java -jar ../EgaCryptor.jar -file example1.bam
Encrypting multiple files :
java -jar ../EgaCryptor.jar -file example1.bam example2.bam
Encrypting all the files within a folder
java -jar ../EgaCryptor.jar -file *

The tool will output three files per input file:

  1. *file.gpg ( encrypted file )
  2. *file.md5( file md5 sum value file )
  3. *file.gpg.md5 ( encrypted file md5 sum value file )

All output files must then be uploaded to your submission account using Aspera or FTP. To perform such operation please follow the documentation present in the FTP and Aspera pages.

Points to note

  1. Remember to provide the path to EgaCryptor.jar and run the command from within the directory the file/s are located.
  2. EgaCryptor writes files to the source directory of your local file system, as a result you must have write-access permissions for the source directory.

Troubleshooting

UnixFileSystem.createFileExclusively (Native Method)

The error is thrown by UNIX (“UnixFileSystem.createFileExclusively(Native Method)”). It appears that the user does not have write-access to the file system where the file to be uploaded is located.EgaCryptor always writes MD5 checksums into files before uploading them to the server, and these files are created in the same location where the uploaded file itself resides.Solution: address your directory permission issue and re-run the command.

Install JCE Unlimited Strength Jurisdiction Policy files

The JCE policy unlimited strength jurisdiction files should be installed according to your current java version