• This repository has been archived on 25/Jan/2018
  • Stars
    star
    297
  • Rank 140,075 (Top 3 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created almost 13 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A port of gnupg to Android (UNMAINTAINED!)

Gnu Privacy Guard for Android

A port of the whole GnuPG 2.1 suite to Android.

If you are using these tools in your own apps, we'd love to hear about it. Email us at [email protected].

Gnu Privacy Guard (GPG) gives you access to the entire GnuPG suite of encryption software. GnuPG is GNU’s tool for end-to-end secure communication and encrypted data storage. This trusted protocol is the free software alternative to PGP. GnuPG 2.1 is the new modularized version of GnuPG that now supports OpenPGP and S/MIME.

Using Gnu Privacy Guard's Android Integration

One of the core goals of Gnu Privacy Guard is to provide integrated encryption support in a way that feels natural on Android. That means it tries to be as transparent as possible, and only pop up with there is no other way:

  • if you want to send someone an encrypted file, find them in your Contacts/People app, and click on "Encrypt File To"
  • if you want encrypt something, then share it to Gnu Privacy Guard
  • if you want to view an encrypted file, share it with Gnu Privacy Guard and it'll prompt you for your password and the app to view it with
  • if you want to import keys into your keyring, there are a few ways to do it:
    • click on a .pkr, .skr, .key, or pubring.gpg file in your email, dropbox, SD card, etc.
    • click on a fingerprint URL, for example: openpgp4fpr:9F0FE587374BBE81
    • scan a fingerprint QRCode

Look for more features in the Android integration, and please post your ideas in our issues tracker: https://dev.guardianproject.info/projects/gpgandroid/issues

Using Gnu Privacy Guard from the Terminal

Before using Gnu Privacy Guard, be sure to launch the app and let it finish its installation process. Once it has completed, then you're ready to use it. The easiest way to get started with Gnu Privacy Guard is to install Android Terminal Emulator. gpgcli will automatically configure Android Terminal Emulator as long as you have the "Allow PATH extensions" settings enabled. Get the Android Terminal Emulator at https://play.google.com/store/apps/details?id=jackpal.androidterm

Currently, this app offers the full gnupg suite of commands in the terminal. When you run the GnuPG tools in an app, a GNUPGHOME folder will be created for that specific app. Because of the Android permissions model, its not possible to create a shared GNUPGHOME without having it world-writable.

Use in Android Terminal Emulator

The app automatically configures Android Terminal Emulator to use the GnuPG tools, as long as you have the Allow PATH extensions preference set.

Manual configuration and using it with other apps

In order to use the GnuPG tools in your app, preferred terminal emulator, or adb shell, you need to set the PATH to include the full path to the GnuPG aliases, for example:

export PATH=$PATH:/data/data/info.guardianproject.gpg/app_opt/aliases

Or you can call the aliases using the full path:

/data/data/info.guardianproject.gpg/app_opt/aliases/gpg --encrypt secretfile.txt

WARNING: The above method stores key material inside the data dir of Gnu Privacy Guard

Gnu Privacy Guard is not able to read your key material, only root or your app can, but the material will remain after the app is uninstalled. If this is not desirable for you then you should set the environment variables managed in

/data/data/info.guardianproject.gpg/app_opt/aliases/common

and set the PATH to /data/data/info.guardianproject.gpg/app_opt/bin:$PATH instead of using the aliases method described above.

At a minimum you should set the environment variables LD_LIBRARY_PATH, HOME, GNUPGHOME, and PATH.

GNUPGHOME should be set to a secure path inside your app's data directory, for example you could call getDir("gnupghome") from your Activity.

Setting up all of the tools

To enable the whole suite of tools, including dirmngr to work with keyservers, you need to set another environment variable:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/data/info.guardianproject.gpg/app_opt/lib:/data/data/info.guardianproject.gpg/lib

The technical reason why is that GnuPG uses a lot of shared libraries, and the only way Android has for finding shared libraries is the LD_LIBRARY_PATH environment variable. GNU/Linux has rpath, Mac OS X has install names, but Android has none of this stuff.

Please Report Bugs

This is an early release of a big project, so there will inevitable be bugs. Help us improve this software by filing bug reports about any problem that you encounter. Feature requests are also welcome! https://dev.guardianproject.info/projects/gpgandroid/issues

Target Platform

We would like to target as many Android platforms as possible. Currently there are three limiting APIs:

  • regex - provided in Android 2.2, SDK android-8 and above
  • pthread_rwlock* - provided in Android 2.3, SDK android-9 and above
  • pthread_atfork - provided in Android 4.0, SDK android-14 and above

regex could easily be included in the build, pthread_rwlock\* would be more difficult. pthread_atfork is not really fully required, but might be in the future.

Build Setup

Debian/wheezy (try others at your own peril)

sudo apt-get install build-essential autoconf automake1.11 libtool \
    transfig wget patch texinfo ant gettext bison

Fedora 17 x64

sudo yum install autoconf automake libtool transfig wget patch texinfo \
    ant gettext bison \
    ncurses-libs.i686 libstdc++.i686 libgcc.i686 zlib.i686 gcc.i686

You might need to apply some patches to get GnuPG subprojects building with newer versions of automake:

Android SDK, NDK, appcompat

Install the Android NDK v9b or newer for the command line version, and the Android SDK for the Android app version:

If you are building in Eclipse or IntelliJ, you need to also set up the android-support-v7-appcompat library project:

Building

First the get all of the source code from git:

git clone https://github.com/guardianproject/gnupg-for-android
git submodule update --init --recursive

How to build the whole app

The easiest way to get started is to use the script we made to make our release builds. It deletes all changes from this project, then runs all the steps needed to build the APK:

./make-release-build

Otherwise, you can break out the steps and run them individually while you are working on the code:

make -C external/ distclean clean-assets
make -C external/
ndk-build clean
ndk-build
./setup-ant.sh
ant clean debug

Running the GnuPG tests

The GnuPG subprojects all include their own test suites. They end up being quite large, so they are not included in the APK by default. If you want to include all of the tests, then run make -C external/ assets-tests before ndk-build. That gives you the same sequence as used in jenkins-build.sh, which is how we run our tests:

make -C external/ distclean clean-assets
make -C external/
make -C external/ assets-tests
ndk-build clean
ndk-build
./setup-ant.sh
ant clean debug

Then to run the tests, first install the APK and run it so that it sets up all of its included assets. Once the Android app has completed its initial setup, run:

./assets/tests/launch_run-tests_on-android.sh

How to Build Individual Components

To compile the components individually you can use commands like (the order that you run them is important):

make -C external/ gnupg-install
make -C external/ gnupg-static
make -C external/ gpgme-install

The results will be in external/data/data/info.guardianproject.gpg

Hacking Notes

Please conform to our code format standard.

For C files use format-code.sh.

For Java, please apply the official Android formatter profile

More Repositories

1

haven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
Java
6,626
star
2

orbot

The Github home of Orbot: Tor on Android (Also available on gitlab!)
Java
2,121
star
3

ChatSecureAndroid

This project has ended, but ChatSecure iOS continues. For Android, please use Conversations or Zom instead
Java
1,074
star
4

android-ffmpeg

a system for building custom ffmpeg binaries for Android
Shell
966
star
5

NetCipher

mirror of https://gitlab.com/guardianproject/NetCipher/
Java
661
star
6

libsqlfs

a library that implements a POSIX style filesystem on top of an SQLite database
C
560
star
7

android-ffmpeg-java

Android Java wrapper around ffmpeg command line binary
Java
553
star
8

ObscuraCam

Photo and Video Filtering App for Privacy
Java
300
star
9

lildebi

UNMAINTAINED please adopt! we can no longer maintain this
Java
228
star
10

tor-android

Tor binary and library for Android
Java
211
star
11

ripple

A "panic button" app for triggering a "ripple effect" across apps that are set up to respond to panic events
Java
209
star
12

proofmode-android

THIS REPOSITORY IS MIRROR OF: https://gitlab.com/guardianproject/proofmode/proofmode-android
Java
198
star
13

orbot-apple

Orbot VPN app for iOS
Swift
197
star
14

PixelKnot

Image stego app using the F5 algorithm
Java
188
star
15

IOCipher

make non-root mountable encrypted disk shares
Java
139
star
16

OSTel

Open Secure Telephony platform (no longer maintained)
JavaScript
117
star
17

notecipher

a simple notepad with all stored encrypted using SQLCipher and Cacheword
Java
104
star
18

Orweb

We are EOL this project. Please use Lightning Browser or wait for Orfox instead
Java
91
star
19

LUKS

no longer maintained, check the forks for maintained versions
Shell
91
star
20

OrbotVPN

THIS IS A DEPRECATED PROJECT AND CLOSED! SEE WEBSITE LINK FOR LATEST ORBOT WITH VPN SUPPORT!
Java
85
star
21

CameraV

CameraV: InformaCam Default Android App
Java
85
star
22

keysync

convert OTR keystores into other keystore formats for moving keys into a new IM app
Python
85
star
23

fdroid-repo

a mirror of https://guardianproject.info/fdroid, usable in F-Droid.
CSS
82
star
24

cacheword

a password caching and management service for Android
Java
81
star
25

TrustedIntents

library for flexible trusted interactions between Android apps
Java
77
star
26

cacert

A slightly more vetted version of the Android CACert keystore
Java
69
star
27

LocationPrivacy

a transparent filter for all of the various ways of sharing location
Java
67
star
28

InformaCore

InformaCam Android Core Service Library
Java
46
star
29

PanicKit

a framework for providing trusted connections between panic button apps and other apps that should be triggered by them
Java
46
star
30

checkey

moved to https://gitlab.com/guardianproject/checkey
Java
43
star
31

ProxyMob

THIS PROJECT IS DEPRECATED. PLEASE SEE ORFOX (TOR BROWSER FOR ANDROID)
JavaScript
39
star
32

open-mobile-developers-guide

Our effort to create a general, broad developers guide for open-source mobile security and our SDKs
Shell
38
star
33

GuardianProjectPublic

Guardian Project's Public SparkleShare
Java
34
star
34

pluto

Pluggable Library (for) Using Traffic Obfuscation: DEPRECATED - SEE LINK FOR NEW PROJECT
Java
29
star
35

AndroidPluggableTransports

Android Pluggable Transports (aka PLUTO2)
Java
28
star
36

OtRChat

UPDATE 2011/2/15: WE ARE NOT USING THIS REPO ANYMORE. FIND THE NEW REPO AT THE LINK BELOW.
Java
28
star
37

SSCVideoProto

This project has been merged into ObscuraCam v2 which you can find at the link below
Java
28
star
38

jtorctl

deprecated fork of Java Tor Control Library
Java
28
star
39

OpenCircle

Open-source Circle of 6 with improved security and privacy features. PLEASE NOTE: For the new Circulo app please visit: https://gitlab.com/circuloapp/circulo-android
Java
28
star
40

linphone-ios-secure

A build of Linphone with all security features enabled (ZRTP, TLS)
C
26
star
41

OrfoxGeckoView

THIS PROJECT IS NOW DEPRECATED IN FAVOR OF OUR NEW TOR-BROWSER BASED REPO
Java
26
star
42

wind

Wind general project repo
24
star
43

Orlib

THIS LIBRARY IS DEPRECATED. PLEASE USE NETCIPHER.
Java
23
star
44

fdroid-repo-tools

scripts for maintaining our F-Droid repos
Shell
19
star
45

viento

Viento or "Wind": Off-Grid and Constrained Computing Optimization Effort
15
star
46

OrbotTalk

Experimental Tor-based P2P Messaging and File Exchange
Java
15
star
47

securereader

Java
13
star
48

network-utils

setup to build a collection of command line network utils for Android
Shell
13
star
49

securereaderlibrary

Core Engine for the Guardian Project Secure Reader platform
Java
13
star
50

securereader_ios

Secure Tor-enabled RSS reader for iOS devices.
Objective-C
13
star
51

CamCipher

Camera Cipher Library for encrypted photo and video capture based on IOCipher
Java
12
star
52

info

our website (mirror of https://gitlab.com/guardianproject/info)
CSS
12
star
53

smartcard-apk-signing

scratchpad for working out a full paranoid Android APK/Jar signing procedure
Shell
12
star
54

binary_transparency_log

A binary transparency log of all Android apps that we release.
10
star
55

courier

Courier, a secure, private news reader
Java
10
star
56

wind-repo

mirror of https://gitlab.com/guardianproject/wind-repo
Python
9
star
57

torservices

mirror of https://gitlab.com/guardianproject/torservices
Java
9
star
58

poe

POE Tor Onboarding Library
Swift
8
star
59

haven-nightly

Nightly builds for Haven app.
8
star
60

luksunlock

Minimal UI for LUKS encryption on the Wildfire
C
8
star
61

IOCipherExample

example file browser app built with IOCipher
Java
8
star
62

guardianproject.github.com

8
star
63

gpmaven

Maven Repository for Gradle-based projects using Guardian Project CipherKit Libraries
8
star
64

orbotkit

Orbot client library for iOS
Swift
7
star
65

OReport

secure citizen journalism
Java
7
star
66

pgpbenchmark

Android app for comparing performance of different OpenPGP implementations.
Java
7
star
67

Activate

Guardian Project Android Installer
Java
7
star
68

tormobiledev

Tor Mobile Developer Guide
7
star
69

cleanroom

Utilities for using TAILS as a distro for managing offline keys
6
star
70

powerup

tool for activating, installing, configuring new apps and capabilities on Android phones
6
star
71

ostn

Open Secure Telephony Network
6
star
72

GuardianProjectPressKit

Guardian Project Press Kit
5
star
73

android-support-library

A github clone of https://android.googlesource.com/platform/frameworks/support/
Java
5
star
74

pinentry

password entry system for GnuPG
C
5
star
75

InformaRepo

InformaCam Storage, Analytics, Dashboard system
5
star
76

FakePanicResponder

an example app to demonstrate receiving triggers from the panic framework
Java
4
star
77

tutorial-gibberbot

An interactive tutorial on how to chat securely on Android mobile with Gchat, Facebook, XMPP & more via OTR encryption using the Guardian Project app, Gibberbot.
4
star
78

StoryMakerLessons

StoryMaker Lesson Curriculum
JavaScript
4
star
79

android-database-sqlcipher

android-database-sqlcipher has moved to the SQLCipher org repo. You can update your local clone to point to the new remote/------------------------------------------------------> git remote set-url origin [email protected]:sqlcipher/android-database-sqlcipher.git
4
star
80

gnupg-for-android-tests

tests for the GnuPrivacyGuard suite for Android
Java
3
star
81

fastlane-hugo-theme

A Hugo theme for generating localized sites based on Fastlane metadata for Android apps.
HTML
3
star
82

fdroid-metadata

collection of our apps that are built with fdroidserver
CSS
3
star
83

ChatSecurePluginOpenEmoji

"Phantom" Open Emoji Plugin for ChatSecure
Java
3
star
84

Adios

The fastest way to remove all sensitive, personal, private data on your Android device
3
star
85

jitsi-monitor

mirror of https://gitlab.com/guardianproject/jitsi-monitor
Python
3
star
86

FakePanicButton

example app for the Panic Framework
Java
2
star
87

JustPayPhone

Java
2
star
88

tutorial-portal

What do you want to do on your Android today?
JavaScript
2
star
89

openwrtfilternet

OpenWRT-based simple "FilterNet" configuration
2
star
90

securereaderlibrary_ios

2
star
91

IOCipherServer

https / webdav server for accessing IOCipher shares
Java
2
star
92

informacam-guide

Trainer and end-user guide to using InformaCam and CameraV app
HTML
2
star
93

ecvrs-guides

Our work on best practices for security electronic civil registration and vital statistics services
2
star
94

f-droid.org_binary_transparency_log

a binary transparency log of https://f-droid.org
2
star
95

.github

default community health files
2
star
96

IOCipherTests

tests for the IOCipher library
Java
2
star
97

nptornews

NPToR News: an OnionKit-enabled version of the NPR News app. Sample project to demonstrate media stream proxying.
Java
2
star
98

ODKFormParser

quick-and-dirty android library for OpenDataKit/JavaRosa forms. Only supports input text and selections so far, but it's a work in progress
Java
1
star
99

milton-iocipher

Repository for core milton modules
Java
1
star
100

InformaCam-Server-DEPRECATED

THIS REPO IS NOW DEPRECATED DO NOT USE
JavaScript
1
star