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.
Before encrypting your files please make sure that any files that will be uploaded to EGA do not use special characters in their naming convention as this can cause issues with the archiving process and also create problems for end users.
The required jar files can be obtained by downloading EgaCrytptor jar file
After the file has been downloaded, extraction is required
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) :
- Download the unlimited strength JCE policy files (JRE 6 / JRE 7/ JRE 8)
- Uncompress and extract the downloaded file.
- 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
- Install the two policy JAR files by replacing the existing ones in your java home directory.
- The standard place for JCE jurisdiction policy JAR files is:
Install the two policy JAR files by replacing the existing ones in your
The standard place for JCE jurisdiction policy JAR files is:
/lib/security [Unix]or \lib\security [Win32]
Below we are presenting 3 possible worked examples on the usage of the EgaCryptor toolEncrypting a single file :
java -jar ../EgaCryptor.jar -file example1.bamEncrypting multiple files :
java -jar ../EgaCryptor.jar -file example1.bam example2.bamEncrypting all the files within a folder
java -jar ../EgaCryptor.jar -file *
The tool will output three files per input file:
- *file.gpg ( encrypted file )
- *file.md5( file md5 sum value file )
- *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
- Remember to provide the path to EgaCryptor.jar and run the command from within the directory the file/s are located.
- 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.
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