Giter Site home page Giter Site logo

htslib-crypt4gh's Introduction

Plug-in implementing the crypt4gh file encryption standard for HTSlib.

Building

See INSTALL for full build instructions.

To make HTSlib use plug-ins, it must be configured using:

./configure --enable-plugins

The environment variable HTS_PATH can be used to tell HTSlib where to find the plug-in (hfile_crypt4gh.so).

Using the plug-in.

First the agent process (crypt4gh_agent) needs to be started. The agent holds the keys used to read and write encrypted files. It also handles the job of decrypting and encrypting the crypt4gh file headers, so that processes using the plug-in do not need to access the keys themselves.

Starting the agent with the -g option will make it generate a key pair:

crypt4gh-agent -g mykey

It will prompt for a passphrase, and then create files mykey.pub containing the public key (used for writing files) and mykey.sec containing the secret key (used for reading files).

Alternatively, existing keys can be imported into crypt4gh_agent using the -k option:

crypt4gh-agent -k mykey.pub -k mykey.sec

When run, crypt4gh-agent will start up a new shell process with some environment variables set that the plug-in uses to find out how to communicate with the agent. The agent will keep running for as long as this process exists, and will automatically terminate when it finishes.

Inside this shell, programs that use HTSlib (for example samtools) will be able to read and write data encrypted with the keys loaded into the agent. A crypt4gh: prefix should be used on file names so that they get routed through the plug-in.

htslib-crypt4gh's People

Contributors

daviesrob avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.