[tor-bugs] #33291 [Core Tor/Tor]: making the tor library size smaller

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Feb 12 22:30:58 UTC 2020


#33291: making the tor library size smaller
--------------------------+------------------------
 Reporter:  gaba          |          Owner:  (none)
     Type:  project       |         Status:  new
 Priority:  Medium        |      Milestone:
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------
Description changed by gaba:

Old description:

> Goal:  To reduce the size of the tor library so that applications that
> are sensitive to download size can link it easily.
>
> '''Possible routes'''
>
> 1. making different parts of tor more optional/modular (like relay mode,
> dirauth mode) . Did we try this before? Is this possible?
>
> 2. Is there a TLS stack you can link on android? Only in Java
>
> 3. A maybe sketchy possibility is to let google to optimize code in the
> cloud...
>
> 4. 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.
>
> 5. libssl - 600kb is the shared library. The Guardian Project's
> experiments on making a smaller binary:
> __[https://github.com/guardianproject/tor-android/issues/18
> https://github.com/guardianproject/tor-android/issues/18]__
>
> Anything else?

New description:

 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.



 }}}
 '''Possible routes'''

  1. making different parts of tor more optional/modular (like relay mode,
 dirauth mode) . Did we try this before? Is this possible?

  2. Is there a TLS stack you can link on android? Only in Java

  3. A maybe sketchy possibility is to let google to optimize code in the
 cloud...

  4. 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.

  5. libssl - 600kb is the shared library. The Guardian Project's
 experiments on making a smaller binary:
 __[https://github.com/guardianproject/tor-android/issues/18
 https://github.com/guardianproject/tor-android/issues/18]__

 Anything else?

--

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33291#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list