By Zoff · February 1, 2025
We are thrilled to announce that a community contributor has picked up maintaining a fork of IOCipher and updated to IOCipher 1.0, designed to enhance your development experience and empower you to create more secure applications with ease. Here’s what’s new and why it matters to you:
We introduced a few new features. Most notably IOCipher is also available on Desktop Java for Linux and Windows now. (Although not all IOCipher features are fully supported on Windows). The latest release even includes some example code for accessing IOCipher VFS using Python.
We updated to the newest SQLCipher and OpenSSL.
Now your virtual files can be as large as you want, there is no longer a hard limit at 4 GB. We fixed some bugs that testing the JNI code with ASAN has found.
IOCipher is a virtual encrypted disk for apps without requiring the device to be rooted. It uses a clone of the standard java.io API for working with files. Just password handling & opening the virtual disk are what stand between developers and fully encrypted file storage. It is based on libsqlfs and SQLCipher.
IOCipher is based on transactions in SQLite, which means that it does not require being mounted in the normal sense. There is no open state once a transaction is complete. Each read or write operation is a self-contained SQLite transaction, so if the file system is forcably quit, SQLite’s transactions prevent the whole file system from being corrupted. This is important in Android since an Activity or Service can be killed at any moment without warning.
VirtualFileSystem.get(), VirtualFileSystem.mount(dbFile, password), and VirtualFileSystem.unmount()Here’s a minimal example for using IOCipher to encrypt all files your app is storing on a phone:
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://jitpack.io"
}
}
}
implementation 'com.github.zoff99:pkgs_guardianprojectIOCipher:1.0.5'
VirtualFileSystem.get()VirtualFileSystem.createNewContainer(dbFile, password)VirtualFileSystem.mount(dbFile, password)java.io import statements with info.guardianproject.iocipherimport info.guardianproject.iocipher.File; import info.guardianproject.iocipher.FileOutputStream; import info.guardianproject.iocipher.FileReader; import info.guardianproject.iocipher.IOCipherFileChannel; import info.guardianproject.iocipher.VirtualFileSystem; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.nio.channels.Channels; import java.nio.channels.ReadableByteChannel;
For a full Android example project see: https://github.com/zoff99/iocipher_pack/tree/master/007_example_android