Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Hatzen authored Apr 8, 2021
1 parent 0615226 commit 6aae452
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@
This is an unofficial test app for https://github.com/open-quantum-safe/liboqs .
This app shows how to use liboqs on android devices. Usually you would use the openssl implementation but for end to end encryption using it locally may be useful.

Currently constant copies of https://github.com/open-quantum-safe/liboqs and https://github.com/open-quantum-safe/liboqs-java are used as android needs further configurations to build them for the correct abi.

The prebuild liboqs.so files (https://github.com/Hatzen/LibOQSTestApp/tree/master/app/jni/jniLibs) are generated with https://github.com/open-quantum-safe/liboqs/blob/main/scripts/build-android.sh manually.
There seems to be an issue (or further configuration) with compiling for 32 Bit abis like x86 and arm-7 (https://github.com/Hatzen/LibOQSTestApp/issues/2 and https://github.com/Hatzen/LibOQSTestApp/issues/3). Because of this the local emulator (x86) might not compile as no .so file is provided.
## Project structure

The jni files (https://github.com/Hatzen/LibOQSTestApp/tree/master/app/jni/jni) are slightly modified (package name changes and a minor fix) to compile successfully.
And the way of loading the liboqs.so files had to be changed: https://github.com/Hatzen/LibOQSTestApp/blob/master/liboqs-android/src/main/java/com/example/liboqs/Common.java#L31

The project is split into

1) the module which wraps the JNI Interface to use liboqs on android (https://github.com/Hatzen/LibOQSTestApp/tree/master/liboqs-android).
The package name "com.example.liboqs.*" will change in future and may produce a breaking change.

2) and an example app (https://github.com/Hatzen/LibOQSTestApp/tree/master/app) showing the usage with a fictional example
<img src="https://user-images.githubusercontent.com/21283655/114078514-53566d00-98a9-11eb-919e-b587c62e41bd.png" height="300">

## Description of sources and modifications

Currently constant copies of https://github.com/open-quantum-safe/liboqs and https://github.com/open-quantum-safe/liboqs-java are used as android needs further configurations to build them for the correct abi.

The prebuild liboqs.so files (https://github.com/Hatzen/LibOQSTestApp/tree/master/app/jni/jniLibs) are generated with https://github.com/open-quantum-safe/liboqs/blob/main/scripts/build-android.sh manually.
There seems to be an issue (or further configuration) with compiling for 32 Bit abis like x86 and arm-7 (https://github.com/Hatzen/LibOQSTestApp/issues/2 and https://github.com/Hatzen/LibOQSTestApp/issues/3). Because of this the local emulator (x86) might not compile as no .so file is provided.

The jni files (https://github.com/Hatzen/LibOQSTestApp/tree/master/app/jni/jni) are slightly modified (package name changes and a minor fix) to compile successfully.
And the way of loading the liboqs.so files had to be changed: https://github.com/Hatzen/LibOQSTestApp/blob/master/liboqs-android/src/main/java/com/example/liboqs/Common.java#L31

## TODOs
- [ ] Setup CI to use newest versions of jni and liboqs

0 comments on commit 6aae452

Please sign in to comment.