BGZF block-level encryption for VCF, BCF, BAM
This page describes a proof of concept implementation of BGZF block-level
encryption which works for VCF, BCF, BAM and in general anything compressed with bgzip.
The key requirement is that 1) the files remain .tbi and .csi indexable and
2) no changes to existing tools relying on HTSlib are required.
For more please check this PDF presentation.
Download and compiling
To download, compile and test the functionality, run the following sequence of commands:
In order to test with bcftools and samtools, the openssl-aware version of htslib must be linked
with pkg-config openssl --libs. For BCFtools, there is a modified version of Makefile
which you can test here
- # get the software
- git clone --branch=crypto git://github.com/pd3/htslib.git
- cd htslib
- # the autotools are used only to make openssl optional
- ./configure --enable-openssl
- # compile
- # test
- git clone --branch=crypto git://github.com/pd3/bcftools.git
- cd bcftools