Making the tor library size smaller
Goal: To reduce the size of the tor library so that applications that are sensitive to download size can link it easily.
Information from The Guardian Project on data from their "Orbot mini" app:
The Android APK for the arm 32-bit build is about 5MB. An APK is a JAR file, which is basically a ZIP file. This means everything gets compressed. Below, then you can see the version of Tor built into this (this is the old 0.4.0.4 without any of the more recent size optimizations) is almost 7MB. However, it is compressed 67%, ending up somewhere closer to 2.2MB in actual distribution form. Archive: Orbot-mini-mini-1.0.0-BETA-1-tor-0.4.0.4-rc-mini-armeabi-v7a-release.apk Zip file size: 4998235 bytes, number of entries: 623 -rw---- 2.4 fat 6911768 b- 67% defN 80-000-00 00:00 lib/armeabi-v7a/tor.so Now, distribution size is thing for sure, the second is amount of space on disk when it is unpacked and running. Users of inexpensive phones with limited storage will often scroll through installed apps and look at actual storage size being used, and uninstall apps based on that. This means we should be concerned with both distribution size an runtime total storage use.
making different parts of tor more optional/modular (like relay mode, dirauth mode) . Did we try this before? Is this possible?
Is there a TLS stack you can link on android? Only in Java
A maybe sketchy possibility is to let google to optimize code in the cloud...
A small java implementation of core onion routing. Would applications be able to run it?
- java ones, easily
- other ones with some (considerable?) effort. JNI makes it possible, but not necessarily so easy.
- libssl - 600kb is the shared library. The Guardian Project's experiments on making a smaller binary: https://github.com/guardianproject/tor-android/issues/18