Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This repository contains Android build files for Wei Dai's Crypto++. It supplies and for Crypto++ for those who want to use Android build tools.

The purpose of Crypto++ Android build is two-fold:

  1. better support Android distributions
  2. supplement the GNUmakefile which is reaching its limits with repsect to GNUmake-based configuration

The initial and based on Alex Afanasyev's pull request at The pull request went unmerged because we did not want to add the directory structure to accommodate Android builds. Though we did not merge Afanasyev's pull request, Afanasyev should get the credit for this work.

There is a wiki page available that discusses the Android build system and the Crypto++ project files in more detail at (Command Line).


The Android build files are a work in progress, so use them at your own risk. With that said is used to test the build system.

In September 2016 the library added to help test the gear. The script is located in Crypto++'s TestScripts directory. The script downloads the project files and builds the library.

If you want to use to drive things then perform the following steps.

cd cryptopp
cp -p TestScripts/ .


The general workflow is clone Wei Dai's crypto++, fetch the Android files, and then build using ndk-build:

git clone
cd cryptopp

wget -O
wget -O
wget -O

# Create *.neon source files for armeabi-v7a


ZIP Files

If you are working from a Crypto++ release zip file, then you should download the same cryptopp-android release zip file. Both Crypto++ and this project use the same release tags, such as CRYPTOPP_8_0_0.

If you mix and match Master with a release zip file then things may not work as expected. You may find the build project files reference a source file that is not present in the Crypto++ release.


Before running the Android project please ensure you have the following installed:

  1. Android NDK
  2. Android SDK
  3. ANDROID_NDK_ROOT envar set
  4. ANDROID_SDK_ROOT envar set

ANDROID_NDK_ROOT and ANDROID_SDK_ROOT are NDK and SDK environmental variables used by the Android tools. They should be set whenever you use Android's command line tools. The project does not use environmental variables from Eclipse or Android Studio like ANDROID_HOME or ANDROID_SDK_HOME. Also see Recommended NDK Directory? on the Android NDK mailing list.


The Android build files require an unusal filesystem layout. Your Crypto++ source files will be located in a folder like <project root>/cryptopp-7.1. and will be located in a folder like <project root>/jni. You must set CRYPTOPP_ROOT in to a value like ../cryptopp-7.1/. The trailing slash is important because the build system uses GNU Make's addprefix which is a simple concatenation.

To run the script issue ndk-build with several NDK build variables set. NDK_PROJECT_PATH and NDK_APPLICATION_MK are required when not using Android default paths like jni/.

cd cryptopp

According to NDK Build you should set NDK_DEBUG=1 for debug builds and NDK_DEBUG=0 for release builds. You can also set NDK_LOG=1 and V=1 for verbose NDK builds which should help with diagnostics.


We would like all maintainers to be collaborators on this repo. If you are a maintainer then please contact us so we can send you an invite.

If you are a collaborator then make changes as you see fit. You don't need to ask for permission to make a change. Noloader is not an Android expert so there are probably lots of opportunities for improvement.

Keep in mind other folks may be using the files, so try not to break things for the other guy. We have to be mindful of different versions of the NDK and API versions.

Everything in this repo is release under Public Domain code. If the license or terms is unpalatable for you, then don't feel obligated to commit.