Skip to content

from a Desktop

File encryption

Before upload your files need to be encrypted using the crypt4gh tool .

Install crypt4gh

On the terminal run the command:

curl -fsSL https://raw.githubusercontent.com/elixir-oslo/crypt4gh/master/install.sh | sudo sh

Copy UT HPC crypt4gh public key.

The primary function of the key is seal the encryption of the data before transmission to the archive. This encryption process is vital for maintaining the confidentiality and integrity of the information being sent. By utilizing this key, we can ensure that sensitive data remains protected throughout the entire transmission process to the archive. It's important to note that the key is unique to the FEGA instance, not the entire federation.

  • Create file named uthpc-c4gh.pub.pem.
  • Open the created file with text editor and copy the public key into the file:
    -----BEGIN CRYPT4GH PUBLIC KEY-----
    0F59LNcZ5wNSoKyQg0UXGok8i+Pt6r7qCfMhd5WSNmk=
    -----END CRYPT4GH PUBLIC KEY-----
    
  • Save and close the file.

Tip

In Windows it's recommended to create the public key in the same folder, where the crypt4gh is located.

Encrypt a file with the public key.

  • Make sure that the crypt4gh public key (uthpc-c4gh.pub.pem) and the files you want to encrypt are in the same folder.
  • Open terminal (in Windows Command Prompt) and navigate to the folder, where the crypt4gh public key and your files are located.
  • Run command:
    crypt4gh encrypt --file=<my_data_file> --pubkey=uthpc-c4gh.pub.pem
    
    Where:
    • <my_data_file> is the name of your file you want to encrypt,
    • uthpc-c4gh.pub.pem is the crypt4gh public key file name (from the previous step).
  • You will be asked whether you want to continue and for the default choice Yes just press Enter.
  • You should see a Success! message.
  • You should have a new file with the ending .c4gh - this is your encrypted file.

Tip

In Windows it's recommended that crypt4gh program files, crypt4gh public key and your data file are in the same folder.

File upload

File upload is done with the s3cmd tool .

Install s3cmd tool

Detailed installation instructions are available at GitHub .

On the terminal run command:

brew install s3cmd

On the terminal run command:

sudo dnf install s3cmd -y

where X.Y.Z is the most recent s3cmd release version.

On the terminal run command:

sudo pip install s3cmd
  • In Windows you need Python.
  • Test, whether Python has been installed. For this open Command Prompt and write
    python --version
    
  • If you get a message, that Python has not been installed you must install Python:
    • Go to Python homepage .
    • Download the latest Python Windows installer.
    • Install Python (with Python installation add Python to PATH).
    • Restart your computer.
  • Go to the s3cmd tool download and download the latest s3cmd source.
  • Extract the downloaded source to C:\s3cmd location.

Get Server configuration

  • In order to submit data, you have to have an account at EGA test web page .
    • From right top select Register, fill out the form and click Create My Account.
    • You will see a message saying that your account is under review.
    • Contact ´Vlad´, ´Ulvi´ or ´Tommy´, who can add all necessary roles to your account (submitter role).
  • Login into auth.fega.etais.ee with your EGA account .
  • At the bottom of the page click Download inbox s3cmd credentials.
  • You will be given the file s3cmd.conf for download. Save it to the same folder, where your encrypted file is located.

Upload encrypted file

Info

Large files are automatically split into 50 MB chunks during upload and each chunk is uploaded separately.

  • Open terminal and navigate to the folder, where s3cmd.conf and your encrypted file are located.
  • Run command:
    s3cmd -c s3cmd.conf put <my_data_file> s3://<access_key>/<my_data_file_server>
    
    Where:
    • <my_data_file> is the name of your encrypted file (must end with .c4gh),
    • <access_key> is your access key, that is located inside ´s3cmd.conf´ file:
      • open s3cmd.conf file,
      • find the line, that starts with access_key =,
      • copy all the letters and numbers after the equal sign.
    • <my_data_file_server> is the name that file will have on the server (must end with .c4gh) and can be the same as <my_data_file>.
  • Copy s3cmd.conf file and your encrypted file to the s3cmd folder (C:\s3cmd).
  • Open Command Prompt and navigate to the location, where s3cmd is located (C:\s3cmd);
  • Run command:
    python s3cmd -c s3cmd.conf put <my_data_file> s3://<access_key>/<my_data_file_server>
    
    Where:
    • <my_data_file> is the name of your encrypted file (must end with .c4gh),
    • <access_key> is your access key, that is located inside s3cmd.conf file:
      • open s3cmd.conf file,
      • find the line, that starts with access_key =,
      • copy all the letters and numbers after the equal sign.
    • <my_data_file_server> is the name that file will have on the server (must end with .c4gh) and can be the same as <my_data_file>.

Info

You can ignore WARNING and ERROR messages at the beginning of output. The last line shows the upload information.

Next steps

Next, please enter the uploaded files metadata in FEGA (FEGA user submitter portal manual).