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

2020-04-07 Thread Tor Bug Tracker & Wiki
#33291: Making the tor library size smaller
-+-
 Reporter:  gaba |  Owner:  dgoulet
 Type:  project  | Status:
 |  assigned
 Priority:  Medium   |  Milestone:
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-size network-team-roadmap-   |  Actual Points:
  2020Q2 |
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by gaba):

 * keywords:  tor-size network-team-roadmap-2020Q1 => tor-size network-team-
 roadmap-2020Q2


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-03-23 Thread Tor Bug Tracker & Wiki
#33291: Making the tor library size smaller
-+-
 Reporter:  gaba |  Owner:  dgoulet
 Type:  project  | Status:
 |  assigned
 Priority:  Medium   |  Milestone:
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-size network-team-roadmap-   |  Actual Points:
  2020Q1 |
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by gaba):

 * status:  new => assigned
 * owner:  (none) => dgoulet


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-02-20 Thread Tor Bug Tracker & Wiki
#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:  tor-size network-team-roadmap-2020Q1  |  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+
Changes (by gaba):

 * cc: dgoulet, ahf (added)
 * keywords:  tor-size => tor-size network-team-roadmap-2020Q1


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-02-19 Thread Tor Bug Tracker & Wiki
#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:  tor-size  |  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+
Changes (by jnewsome):

 * cc: jnewsome (added)


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-02-19 Thread Tor Bug Tracker & Wiki
#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:  tor-size  |  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by jnewsome):

 Maybe this should be a separate ticket, but another thing to consider
 might be saving space for users that have both TBB and Orbot installed, as
 CrazyAstronaut mentioned in #tor.

 They propose a "thin" version of the Tor Browser that uses Orbot's Tor
 client. Perhaps another possibility would be a "fat" Tor Browser that
 exposes the Tor client for other apps to use (making Orbot unnecessary).
 Assuming doing that adds significant space requirements though, we'd
 presumably want to either offer two versions of TBB (confusing), or...:

 In general a possibility to consider if there's functionality that some,
 but not all, users need, is to separate that functionality into modules
 that can be downloaded and loaded on-demand from within the app itself.
 This would add *significant* complexity of course. Example:
 https://github.com/Instagram/ig-lazy-module-loader.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-02-18 Thread Tor Bug Tracker & Wiki
#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:  tor-size  |  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by nickm):

 ISTR that one of the breakdowns that I saw linked more libevent libraries
 than they needed. Tor only requires libevent_core and libevent_extra.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-02-13 Thread Tor Bug Tracker & Wiki
#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:  tor-size  |  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by teor):

 We could also set tor's CacheDir to an ephemeral location, to reduce the
 disk usage.

 getCacheDir() is the relevant android function:
 https://developer.android.com/training/data-storage/app-specific#internal-
 create-cache

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-02-13 Thread Tor Bug Tracker & Wiki
#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:  tor-size  |  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by teor):

 Replying to [ticket:33291 gaba]:
 > {{{
 > 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.
 > }}}

 Tor also downloads directory documents at runtime. Last time I checked,
 the extra storage was 5-10MB.

 Here are some things we could do to reduce that size:
 * store directory documents compressed, and uncompress them when we want
 to parse them
   * this change uses more CPU, but less disk
   * our directory mmap() changes reduced RAM usage, they may make
 compressed directory documents a bit harder. Does android use Tor's
 mmap()?

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

 Yes, we created a relay module as part of Sponsor 31, and did
 more work on the existing dirauth module.

 But there's still a lot of relay-only code that we could move into
 the relay module.

 And there is a lot more lower-level code that clients never use.
 We could put it in the relay or dirauth modules, or make more
 modules as needed.

 I'll also do a small amount of relay module work as part of
 Sponsor 55, when adding new features, or modifying existing
 code.

 I suggest that other sponsored work adopts a similar policy.

 We can also continue to move config and control code into the
 relay module, as a separate project.

 And we should continue to delete old, unused code, particularly
 code for obsolete options. There's a large amount of IPv6
 DirPort code in tor that we could delete right now.

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

 Does Orbot / Tor Browser for Android use NSS?
 If so, we can use NSS in tor, rather than OpenSSL.

 Do we need to migrate some PTs off OpenSSL as well?

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

 Any re-implementation of tor will probably be
 distinguishable on the network. That's ok, as long as
 enough users are running it.

 But a re-implementation will also come with its own
 bugs, privacy issues, and security issues. And its
 own costs for testing and release management. We
 should think about whether we want to maintain
 two parallel implementations, because that's a huge
 cost.

 As an alternative, we could rewrite tor's client and
 common code in Rust. We could use this Rust code
 in tor on relays, desktops, and mobile.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-02-13 Thread Tor Bug Tracker & Wiki
#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:  tor-size  |  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+
Changes (by gaba):

 * keywords:   => tor-size


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33291 [Core Tor/Tor]: Making the tor library size smaller (was: making the tor library size smaller)

2020-02-13 Thread Tor Bug Tracker & Wiki
#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:  tor-size  |  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-02-12 Thread Tor Bug Tracker & Wiki
#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.
>
> 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?

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: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-02-12 Thread Tor Bug Tracker & Wiki
#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: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

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

2020-02-12 Thread Tor Bug Tracker & Wiki
#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|   Keywords:
Actual Points:|  Parent ID:
   Points:|   Reviewer:
  Sponsor:|
--+
 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?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs