guardianproject / luks Goto Github PK
View Code? Open in Web Editor NEWno longer maintained, check the forks for maintained versions
License: GNU General Public License v3.0
no longer maintained, check the forks for maintained versions
License: GNU General Public License v3.0
I’m having trouble compiling Sigkill’s luksunlock pre-boot authentication mechanism. I apologize if this post is inappropriate in this forum, please contact me so we can discuss the issue over email or another channel.
I can launch the prebuilt luksunlock binary from my init.rc on an HTC Desire with CyanogenMod 7.1 using GuardianProject’s cryptsetup and luksunlock binaries. luksunlock fails to unlock the volumes after providing a passphrase. LUKS is working properly on loopback devices and SD card partitions from a shell (after the Android framework is loaded). My volumes are set up according to the xda-forum (http://forum.xda-developers.com/showpost.php?p=11616180&postcount=12) and the luksunlock code / init.rc.
My problem is compiling the luksunlock source. I’m using android-ndk-r6b cross-compiler toolchain. I can successfully compile static and dynamically linked applications that run on my phone. I experience eabi-gcc build errors on minui functions when compiling luksunlock.c.
Any advice for compiling luksunlock with the NDK would be greatly appreciated (or any information on incorporating the Android recovery minui into a similar application). I can provide any further details on request (init.rc file, build environment, etc.).
Sincerest Thanks.
Hi,
I just tried to cross compile the LUKS, few issues occur as mentioned below
Can you please help me out on how can I go ahead on this.
First I had to edit external/Makefile as follows:
NDK_TOOLCHAIN=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(NDK_UNAME)-x86_64
Then, compilation failed at libgcrypt-1.4.6:
/bin/bash ../libtool --tag=CC --mode=link /opt/android-ndk//toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk//platforms/android-9/arch-arm -I/usr/local/include -I/tmp/LUKS/external/include -fvisibility=hidden -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wextra -Wbad-function-cast -Wwrite-strings -Wdeclaration-after-statement -Wno-missing-field-initializers -Wno-sign-compare -Wpointer-arith -L/tmp/LUKS/external/lib -Wl,--rpath,/tmp/LUKS/external/lib -o register register.o ../src/libgcrypt.la
/opt/android-ndk//toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk//platforms/android-9/arch-arm -I/usr/local/include -I/tmp/LUKS/external/include -fvisibility=hidden -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wextra -Wbad-function-cast -Wwrite-strings -Wdeclaration-after-statement -Wno-missing-field-initializers -Wno-sign-compare -Wpointer-arith -Wl,--rpath -Wl,/tmp/LUKS/external/lib -o .libs/register register.o -L/tmp/LUKS/external/lib ../src/.libs/libgcrypt.so
register.o:register.c:function check_run: error: undefined reference to 'gpg_strerror'
register.o:register.c:function check_run: error: undefined reference to 'gpg_strerror'
register.o:register.c:function check_run: error: undefined reference to 'gpg_strerror'
collect2: error: ld returned 1 exit status
Makefile:432: recipe for target 'register' failed
make[3]: *** [register] Error 1
make[3]: Leaving directory '/tmp/LUKS/external/libgcrypt-1.4.6/tests'
Makefile:317: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/tmp/LUKS/external/libgcrypt-1.4.6'
Makefile:247: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/tmp/LUKS/external/libgcrypt-1.4.6'
Makefile:110: recipe for target 'libgcrypt-build' failed
make: *** [libgcrypt-build] Error 2
Not really sure if this is where I should post this but...
I have been trying for a while to get Android LUKS to work. Here is my setup:
I tried to configure a file container with info from the guardianproject README. I fail on the "luksOpen /dev/loop0" step with a message: "Device /dev/loop0 is too small". I have tried connecting the loopback device with files ranging from 5MB to 25MB and always the same error.
Any help would be greatly appreciated.
Also, if anyone has any advice on compiling the stock Android 2.3.x kernel with the necessary crypto, loopback, and device mapper modules I would be very thankful. I tried simply taking the generic linux 2.6.3x modules and placing them in the Android kernel module directory, but I can't get them to compile.
Thanks.
I realize this is a big complex undertaking, and if there's a better place to put this, please say so, especially if somebody is already doing it.
Guardian Project LUKS should use hardware acceleration where possible, to save on power consumption and CPU use (vs. other processes running). Many of the target platforms include ways to accelerate AES with built in hardware. e.g.:
Older TI parts can use the C64x DSP for AES acceleration
http://ti.com/tool/c64xpluscrypto
TI's e-book platform (OMAP 36xx) has the M-Shield part with hardware AES.
http://focus.ti.com/pdfs/wtbu/SWPT045.pdf
Newer ARMv9 chips have AES instructions natively.
It may mean we need patches for Linux (I know Intel AES and Via Padlock are currently supported) which isn't trivial and could take a while to trickle down, but one must start somewhere.
when using a luks partition as a seperate user linked into the home directory. when deleting other users files on the non encrypted drive the recycle bin eats them and the undo trash from a filebrowser does not work. (tested with caja possibly a caja issue - will investigate more)
Just curious, such an important project
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.