Re: [tor-bugs] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-07-01 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
-+-
 Reporter:  asn  |  Owner:  dgoulet
 Type:  enhancement  | Status:  closed
 Priority:  High |  Milestone:  Tor:
Component:  Core Tor/Tor |  0.2.9.x-final
 Severity:  Normal   |Version:
 Keywords:  tor-hs, review-group-3, review-  | Resolution:  fixed
  group-4|  Actual Points:
Parent ID:  #8244| Points:  6
 Reviewer:  nickm|Sponsor:
 |  SponsorR-must
-+-
Changes (by dgoulet):

 * status:  merge_ready => closed
 * resolution:   => fixed


Comment:

 Wow code, Much feature, Such closing!

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-07-01 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
-+-
 Reporter:  asn  |  Owner:  dgoulet
 Type:  enhancement  | Status:
 Priority:  High |  merge_ready
Component:  Core Tor/Tor |  Milestone:  Tor:
 Severity:  Normal   |  0.2.9.x-final
 Keywords:  tor-hs, review-group-3, review-  |Version:
  group-4| Resolution:
Parent ID:  #8244|  Actual Points:
 Reviewer:  nickm| Points:  6
 |Sponsor:
 |  SponsorR-must
-+-

Comment (by nickm):

 m
  e
   r
g
 e
  d
   !

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-07-01 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
-+-
 Reporter:  asn  |  Owner:  dgoulet
 Type:  enhancement  | Status:
 Priority:  High |  merge_ready
Component:  Core Tor/Tor |  Milestone:  Tor:
 Severity:  Normal   |  0.2.9.x-final
 Keywords:  tor-hs, review-group-3, review-  |Version:
  group-4| Resolution:
Parent ID:  #8244|  Actual Points:
 Reviewer:  nickm| Points:  6
 |Sponsor:
 |  SponsorR-must
-+-
Changes (by dgoulet):

 * status:  needs_review => merge_ready


Comment:

 Ok, the fully squashed branch is in `ticket16943_029_05-squashed`. The
 following returns an empty set for me that is the diff between the
 squashed and the current branch being reviewed with fixup commits:

 {{{
 $ git diff ticket16943_029_05..ticket16943_029_05-squashed
 $
 }}}

 Unit tests pass, chutney works and our test network is currently running
 this branch for my dirauth. Once merged upstream, I'll inform the testnet
 operatorsyy to update to master so we can track any bug from now on.

 @nickm, finally, you won't be able to close this ticket because of opened
 child tickets. Just say so here once it's merged, I'll take care of moving
 the tickets to another parent and closing the appropriate child.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-07-01 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
-+-
 Reporter:  asn  |  Owner:  dgoulet
 Type:  enhancement  | Status:
 Priority:  High |  needs_review
Component:  Core Tor/Tor |  Milestone:  Tor:
 Severity:  Normal   |  0.2.9.x-final
 Keywords:  tor-hs, review-group-3, review-  |Version:
  group-4| Resolution:
Parent ID:  #8244|  Actual Points:
 Reviewer:  nickm| Points:  6
 |Sponsor:
 |  SponsorR-must
-+-
Changes (by dgoulet):

 * status:  needs_revision => needs_review


Comment:

 Please see discussion on the merge request.

 Fixup commits in `ticket16943_029_05` (also pushed on the gitlab).

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-06-29 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
-+-
 Reporter:  asn  |  Owner:  dgoulet
 Type:  enhancement  | Status:
 Priority:  High |  needs_revision
Component:  Core Tor/Tor |  Milestone:  Tor:
 Severity:  Normal   |  0.2.9.x-final
 Keywords:  tor-hs, review-group-3, review-  |Version:
  group-4| Resolution:
Parent ID:  #8244|  Actual Points:
 Reviewer:  nickm| Points:  6
 |Sponsor:
 |  SponsorR-must
-+-
Changes (by nickm):

 * status:  needs_review => needs_revision


Comment:

 added more comments.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-06-29 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
-+-
 Reporter:  asn  |  Owner:  dgoulet
 Type:  enhancement  | Status:
 Priority:  High |  needs_review
Component:  Core Tor/Tor |  Milestone:  Tor:
 Severity:  Normal   |  0.2.9.x-final
 Keywords:  tor-hs, review-group-3, review-  |Version:
  group-4| Resolution:
Parent ID:  #8244|  Actual Points:
 Reviewer:  nickm| Points:  6
 |Sponsor:
 |  SponsorR-must
-+-
Changes (by dgoulet):

 * status:  needs_revision => needs_review


Comment:

 Everything has been address except one detail, please see the merge
 request comments.

 Fixup commits in `ticket16943_029_05` (also pushed on the gitlab).

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-06-29 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
-+-
 Reporter:  asn  |  Owner:  dgoulet
 Type:  enhancement  | Status:
 Priority:  High |  needs_revision
Component:  Core Tor/Tor |  Milestone:  Tor:
 Severity:  Normal   |  0.2.9.x-final
 Keywords:  tor-hs, review-group-3, review-  |Version:
  group-4| Resolution:
Parent ID:  #8244|  Actual Points:
 Reviewer:  nickm| Points:  6
 |Sponsor:
 |  SponsorR-must
-+-
Changes (by nickm):

 * status:  needs_review => needs_revision


--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-06-29 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
-+-
 Reporter:  asn  |  Owner:  dgoulet
 Type:  enhancement  | Status:
 Priority:  High |  needs_review
Component:  Core Tor/Tor |  Milestone:  Tor:
 Severity:  Normal   |  0.2.9.x-final
 Keywords:  tor-hs, review-group-3, review-  |Version:
  group-4| Resolution:
Parent ID:  #8244|  Actual Points:
 Reviewer:  nickm| Points:  6
 |Sponsor:
 |  SponsorR-must
-+-

Comment (by nickm):

 Okay, I made a few comments. Only found a couple things that look like
 possible bugs

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-30 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_review
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  6
   |Sponsor:  SponsorR-must
---+---
Changes (by dgoulet):

 * points:   => 6


Comment:

 Hrm wait, putting points back on this one since this is related to a huge
 chunk of code.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-30 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_review
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:
   |Sponsor:  SponsorR-must
---+---
Changes (by dgoulet):

 * points:  6 =>


--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-26 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_review
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  6
   |Sponsor:  SponsorR-must
---+---
Changes (by dgoulet):

 * status:  needs_revision => needs_review


Comment:

 Branch ready for review at:
 https://gitlab.com/dgoulet/tor/merge_requests/5

 See description for some extra info about last review since this one has
 been squashed and rebased on master.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-26 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  6
   |Sponsor:  SponsorR-must
---+---

Comment (by dgoulet):

 Latest branch with all the fixes discussed: `ticket16943_029_05`

 I still have to incorporate #19012 and push it on the gitlab for code
 review. Should be coming soon.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-24 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  6
   |Sponsor:  SponsorR-must
---+---

Comment (by asn):

 OK, did another review of `dgoulet/ticket16943_029_02` up to `b9b9022`. I
 like the new changes!

 Please see my branch `ticket16943_029_04`, which addresses some more
 issues. Specifically, it fixes the first two points from comment:65, and
 also it folds in teor's patch from #19126 (which fixes tests in platforms
 where time_t is 32bits).

 What else remains to be done?

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-19 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  6
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 I just split off #19134 because we're doing the SRV hash wrong: we're
 meant to use 8 bytes of reveal_num and version in network order, not 8
 bits. This obsoletes #19126.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-19 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  6
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 Logged #19132 for a missing initialiser error in clang.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-19 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  6
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 I've split off everything that hasn't been included in
 dgoulet/ticket16943_029_02 into child tickets.

 Here's what has happened to T1-T9 and my branch sr-commit-fixes:

 37655c1 Improve log messages for SR commit lines (T5)
 has been fixup'd into another commit in dgoulet/ticket16943_029_02

 520e14f Fix a bug in shared random version parsing on 32-bit platforms
 (T6)
 has been fixup'd into another commit in dgoulet/ticket16943_029_02

 2fd8a21 Consistently use uint32_t for integers in shared random structs
 (T7)
 Split off into #19126, rebased on the latest dgoulet/ticket16943_029_02

 d6487a3 Silence a clang warning about shared random buffer sizes (T1)
 issue was fixed by b9b9022 prop250: Pass the dst length to sr_srv_encode()

 bc7160c Make a shared random log message easier to understand (T3)
 has been fixup'd into another commit in dgoulet/ticket16943_029_02

 add23bd Move the SR flag to the same place as the other SR ns string
 constants
 has been fixup'd into another commit in dgoulet/ticket16943_029_02

 3731984 Don't crash authorities when they have 254 or more shared random
 reveals
 Split off into #19126

 8a84070 Sort commits in lexicographical order in votes (T4)
 cherry-picked as 4d956a6 prop250: Sort commits in lexicographical order in
 votes

 The unit test fixes in ticket16943_029_02 have a bug on platforms where
 time_t is 32 bit (T9)
 Split off into #19125

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-17 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  6
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 T9: The unit test fixes in `ticket16943_029_02` have a bug on platforms
 where time_t is 32 bit.

 When running `src/test/test --debug shared-random/state_load_from_disk` on
 32 bit OS X, I see:
 {{{
 [warn] tor_timegm: Bug: Result does not fit in tor_timegm (on Tor 0.2.9.0
 -alpha-dev )
 [warn] SR: Reading state error: Invalid time '2666-04-19 07:16:00' for
 keyword 'ValidAfter'
 }}}

 This was introduced with the unit tests in commit e931fef2, let's use 2037
 instead.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-16 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 Please see my branch sr-commit-fixes on
 https://github.com/teor2345/tor.git

 37655c1 Improve log messages for SR commit lines (T5)
 520e14f Fix a bug in shared random version parsing on 32-bit platforms
 (T6)
 2fd8a21 Consistently use uint32_t for integers in shared random structs
 (T7)
 d6487a3 Silence a clang warning about shared random buffer sizes (T1)
 2fd8a21 Make a shared random log message easier to understand (T3)
 add23bd Move the SR flag to the same place as the other SR ns string
 constants
 3731984 Don't crash authorities when they have 254 or more shared random
 reveals (T8, T7)
 8a84070 Sort commits in lexicographical order in votes (T4)

 T2 was fixed by 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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-16 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by asn):

 Here is some TODO from my meeting notes:

 - Commit `prop250: Only trust known authority when computing SRV` seems to
 reject votes that contain commits by unknown dirauths. This can happen
 naturally in the network. Instead of handling unknonw commits during
 parsing in `extract_shared_random_commits()` maybe we should handle them
 in `should_keep_commit()`.

 - I got this message on my notice level logs:
   {{{[notice] SR: State loaded successfully from file
 /home/user/data_directory/sr-state}}}.
   I think this  message should be demoted to a lesser severity.

 - It would be nice for debugging, to order commits in votes based on
 authority fpr, so that they are all in the same order in different votes.
 If it's too hard, let's not do that.

 - We discussed treating SRVs in votes the same way we treat consensus
 parameters. That is, not needing a real majority, and if at least 3
 dirauths agree on the same SRV on their votes, it is copied on the
 consensus. This is controversial security-wise, so it needs some thinking.

 - Make a state diagram of the SRV protocol for greater understanding. We
 already have one in the bottom of the
 [https://trac.torproject.org/projects/tor/wiki/doc/TorNotes notes page],
 but we might be able to make a better one.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-16 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 T8: In networkstatus_parse_vote_from_string(), we check if it's a vote,
 then check K_SR_FLAG, then parse commits and reveals. But we don't do the
 same for SRVs. What if buggy authorities include SRVs in their vote
 without the K_SR_FLAG? What if a consensus includes SRVs without the SR
 flag?

 Can we be consistent, and check the SR flag, then parse commits and SRVs
 as appropriate?
 {{{
   /* If this is a vote document, check if information about the shared
  randomness protocol is included, and extract it. */
   if (ns->type == NS_TYPE_VOTE) {
 /* Does this authority participates in the SR protocol? */
 tok = find_opt_by_keyword(tokens, K_SR_FLAG);
 if (tok) {
   ns->sr_info.participate = 1;
   /* Get the SR commitments and reveals from the vote. */
   if (extract_shared_random_commits(ns, tokens) < 0) {
 log_warn(LD_DIR, "SR: Unable to parse commits in vote.");
 goto err;
   }
 }
   }
   /* For both a vote and consensus, extract the shared random values. */
   if (ns->type != NS_TYPE_OPINION) {
 if (extract_shared_random_srvs(ns, tokens) < 0) {
   log_warn(LD_DIR, "SR: Unable to parse SRV(s)");
   goto err;
 }
   }
 }}}

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-16 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 T8: In `sr_compute_srv()`, we limit the number of SR authorities to 255,
 and crash if there are more. This seems brittle: why not warn instead?
 {{{
 tor_assert(reveal_num < UINT8_MAX);
 }}}

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-16 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 Let's call the bug above T6.

 T7: In `sr_parse_srv()` you parse a string as a long between 0 and
 INT32_MAX, then cast and assign it to an int. It's good you limit the
 value to INT32_MAX rather than INT_MAX, which varies by architecture. Can
 you also use an int32_t for `num_reveals` and `sr_srv_t.num_reveals` to
 make this limit clearer?
 {{{
 int num_reveals, ok, ret;
 sr_srv_t *srv = NULL;
 ...
 num_reveals = (int)tor_parse_long(smartlist_get(args, 0),
10, 0, INT32_MAX, , NULL);
 ...
 srv->num_reveals = num_reveals;
 }}}

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-16 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 You probably want `tor_parse_ulong()` here, because on i386, min is 1, and
 max is effectively `(long)UINT32_MAX`, which is -1.
 {{{
 long tor_parse_long(const char *s, int base, long min,
 long max, int *ok, char **next);
 ...
 uint32_t version;
 ...
 version = (uint32_t) tor_parse_long(value, 10, 1, UINT32_MAX, NULL, NULL);
 }}}

 I think we could warn in the tor_parse_* functions when this happens, see
 #19063.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-16 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 T5: please cherry-pick 37655c1 from my branch sr-commit-debug on
 https://github.com/teor2345/tor.git

 I added some logging to track down the i386 issue. It appears that i386
 tors can't parse the shared random commits correctly. The commit 37655c1
 adds some extra logging, and escapes all the strings that are logged.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-10 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 T4: please sort the shared-rand-commit lines in each vote in a stable
 order (by fingerprint).

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-09 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 Let's call the last two comments T1 ans T2.

 T3: This log message is confusing, please fix it:
 {{{
 sr_state_update(): SR: State prepared for new voting
 period (2016-05-10 00:00:00). Current phase is commit (1/0).
 }}}

 I'd prefer commit phase 1, reveal phase 0.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-09 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 #19006 records the following crash on dgoulet's ticket16943_029_02:
 {{{
 Application Specific Information:
 crashed on child side of fork pre-exec
 *** error for object 0x7fb203c032c0: pointer being freed was not allocated


 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
 0   libsystem_kernel.dylib  0x7fff9d1a6f06 __pthread_kill
 + 10
 1   libsystem_pthread.dylib 0x7fff8daa84ec pthread_kill +
 90
 2   libsystem_c.dylib   0x7fff903bb6e7 abort + 129
 3   libsystem_malloc.dylib  0x7fff8b468041 free + 425
 4   tor 0x0001060086b1 config_free_all
 + 321 (config.c:841)
 5   tor 0x00010606e233 tor_free_all +
 179 (main.c:3170)
 6   tor 0x00010606e479 tor_cleanup +
 313 (main.c:3239)
 7   tor 0x000106067c31
 consider_hibernation + 129 (hibernate.c:971)
 8   tor 0x00010606c7ce
 second_elapsed_callback + 590 (main.c:1467)
 9   libevent-2.0.5.dylib0x000106261aa2 event_base_loop
 + 1871
 10  tor 0x00010606c245 do_main_loop +
 1525 (main.c:2560)
 11  tor 0x00010606e586 tor_main + 230
 (main.c:3660)
 12  tor 0x000105fd8ce9 main + 25
 (tor_main.c:30)
 13  libdyld.dylib   0x7fff982e35ad start + 1
 }}}

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-09 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by teor):

 With clang on OS X:
 {{{
 src/or/shared_random.c:855:28: warning: size argument in 'strlcpy' call
 appears
   to be size of the source; expected the size of the destination
   [-Wstrlcpy-strlcat-size]
   strlcpy(dst, buf, sizeof(buf));
 }}}

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-05 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---
Changes (by nickm):

 * status:  needs_review => needs_revision


Comment:

 I am done reviewing the branch!

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-05 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_review
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by dgoulet):

 Squashed version with new merge request. There was an issue with one fixup
 commit that didn't apply at the right commit.

 https://gitlab.com/dgoulet/tor/merge_requests/4

 See branch: `ticket16943_029_02`

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-05-03 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_review
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---
Changes (by dgoulet):

 * status:  needs_revision => needs_review


Comment:

 Ok new and clean branch for this in `ticket16943_029_01`

 Gitlab merge request is here:
 https://gitlab.com/dgoulet/tor/merge_requests/3

 The current branch contains the fixup from the first pass made by nickm.
 Since the first commit was a bit of a mess, the fixup now applies to
 multiple commit (instead of the first one).

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-04-27 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201605  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---
Changes (by asn):

 * keywords:  tor-hs, TorCoreTeam201604 => tor-hs, TorCoreTeam201605


--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-04-25 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  needs_revision
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201604  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---
Changes (by nickm):

 * status:  merge_ready => needs_revision


Comment:

 dgoulet is revising based on early review. More review to follow.

--
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] #16943 [Core Tor/Tor]: Implement prop250 (Random Number Generation During Tor Voting)

2016-04-20 Thread Tor Bug Tracker & Wiki
#16943: Implement prop250 (Random Number Generation During Tor Voting)
---+---
 Reporter:  asn|  Owner:  dgoulet
 Type:  enhancement| Status:  merge_ready
 Priority:  High   |  Milestone:  Tor:
Component:  Core Tor/Tor   |  0.2.9.x-final
 Severity:  Normal |Version:
 Keywords:  tor-hs, TorCoreTeam201604  | Resolution:
Parent ID:  #8244  |  Actual Points:
 Reviewer:  nickm  | Points:  large
   |Sponsor:  SponsorR-must
---+---

Comment (by dgoulet):

 Since this one is humongeous, here is an experiment for code review on
 Gitlab using the merge request feature:

 https://gitlab.com/dgoulet/tor/merge_requests/1

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