[tor-bugs] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-04-05 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
---+
 Reporter:  dgoulet|  Owner:
 Type:  enhancement| Status:  new
 Priority:  Medium |  Milestone:  Tor: 0.3.2.x-final
Component:  Core Tor/Tor   |Version:
 Severity:  Normal |   Keywords:  tor-hs, prop224
Actual Points: |  Parent ID:
   Points:  1  |   Reviewer:
  Sponsor:  SponsorR-must  |
---+
 It turns out that we might have miscalculated the legacy feature for
 introduction point.

 Currently, proposal 224 looks like this for legacy encryption keys:

 {{{
 Encryption key is specified as follow:

 [Exactly once enc-key per introduction point]

"enc-key" SP "ntor" SP key NL

  The key is a base64 encoded curve25519 public key used to
 encrypt
  the introduction request to service.

"enc-key" SP "legacy" NL key NL

  Base64 encoded RSA key, wrapped in "BEGIN RSA PUBLIC
  KEY-" armor, for use with a legacy introduction point as
  described in [LEGACY_EST_INTRO] and [LEGACY-INTRODUCE1]
 below.
 }}}

 This doesn't make much sense because this encryption key is used to
 encrypt the `ENCRYPTED` section of the INTRODUCE1 cell (section 3.2.1. and
 3.2.2.). That section can only be decrypted by the service so the
 introduction point, being legacy or not, doesn't touch it at all, it just
 passes along the bytes.

 So, the descriptor should always contain a ntor key per intro point
 because we still want the ntor handshake to happen since both client and
 service do speak the prop224 protocol.

 If the intro point is a legacy one, it should also have a "legacy key"
 which is an extra RSA public key needed in the INTRODUCE1 legacy cell and
 used by the intro point to relay the cell on the right circuit (used in
 the ESTABLISH_INTRO):

 {{{
LEGACY_KEY_ID[20 bytes]
[...]
Here, LEGACY_KEY_ID is the hash of the introduction point legacy
encryption key that was included in the hidden service descriptor.
 }}}

 In the legacy `ESTABLISH_INTRO`:
 {{{
 PK   Bob's public key or service key[KL octets]
 }}}

 In the current legacy code, the intro point validates that this PK field
 is an ASN.1 encoded RSA key (`rend_mid_establish_intro_legacy()`).

 Fortunately for us, this code is getting release in 030 *but* only be
 actually used in 032 (#12424).

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-04-05 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:
 Type:  enhancement  | Status:  needs_review
 Priority:  Medium   |  Milestone:  Tor: 0.3.2.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:   | Points:  1
 Reviewer:   |Sponsor:  SponsorR-must
-+
Changes (by dgoulet):

 * status:  new => needs_review


Comment:

 Here is my proposed patch to proposal 224: `ticket21871_01`

 If this makes sense, let's put this ticket in `accepted` state so we can
 proceed with the code change.

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-04-06 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  accepted
 Priority:  Medium   |  Milestone:  Tor: 0.3.2.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:   | Points:  1
 Reviewer:   |Sponsor:  SponsorR-must
-+
Changes (by dgoulet):

 * owner:   => dgoulet
 * status:  needs_review => accepted


Comment:

 Worked on this with asn on IRC, some changes happened in that branch. It
 should now be the up to date one. Moving to `accepted` so we can do the
 code patch.

 Torspec: `ticket21871_01`

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-04-06 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  accepted
 Priority:  Medium   |  Milestone:  Tor: 0.3.2.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #20657   | Points:  1
 Reviewer:   |Sponsor:  SponsorR-must
-+
Changes (by dgoulet):

 * parent:   => #20657


Comment:

 This will be part of #20657 work since it has too much implications to re-
 merge in that branch after an upstream merge on 031.

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-04-07 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  needs_review
 Priority:  Medium   |  Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #21888   | Points:  3
 Reviewer:   |Sponsor:  SponsorR-must
-+
Changes (by dgoulet):

 * status:  accepted => needs_review
 * points:  1 => 3
 * parent:  #20657 => #21888
 * milestone:  Tor: 0.3.2.x-final => Tor: 0.3.1.x-final


Comment:

 Ok, I made it happen afterall but it is built on top of #21895 because it
 needed to extract the private key out of the descriptor and doing that in
 two moves is less messy.

 TOP 2 commits are the one for this branch. Last 2 commits are from #21895.

 Torspec: `ticket21871_01`
 Tor code: `ticket21871_031_01`
 Gitlab review: https://gitlab.com/dgoulet/tor/merge_requests/23

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-04-12 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  needs_revision
 Priority:  Medium   |  Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #21888   | Points:  3
 Reviewer:   |Sponsor:  SponsorR-must
-+
Changes (by asn):

 * status:  needs_review => needs_revision


Comment:

 Thanks for the code here dgoulet!
 Did an initial review!

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-04-18 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  needs_review
 Priority:  Medium   |  Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #21888   | Points:  3
 Reviewer:   |Sponsor:  SponsorR-must
-+
Changes (by dgoulet):

 * status:  needs_revision => needs_review


Comment:

 Here is a version 2. I had to squash two commits together because the
 first one (which was the remove private key from hs_descriptor.h) didn't
 make sense at all with the next commit which changes the descriptor format
 of encryption keys. It was actually just more complicated to deal with
 both in two commits and not adding any useful semantic.

 I've fixed one of the comment in the merge request, the two others are in
 discussion mode I guess.

 Torspec: `ticket21871_01`
 Tor code: `ticket21871_031_02`
 Gitlab: https://gitlab.com/dgoulet/tor/merge_requests/25

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-05-04 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  needs_revision
 Priority:  Medium   |  Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #21888   | Points:  3
 Reviewer:   |Sponsor:  SponsorR-must
-+
Changes (by asn):

 * status:  needs_review => needs_revision


Comment:

 Did a review and added some nitpicks to gitlab. I think we are almost
 there.

 I'm setting this to `needs_revision` but feel free to set it back to
 `merge_ready` if you think none of my comments are worth addressing.

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-05-08 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  needs_information
 Priority:  Medium   |  Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #21888   | Points:  3
 Reviewer:   |Sponsor:  SponsorR-must
-+
Changes (by dgoulet):

 * status:  needs_revision => needs_information


Comment:

 Responded. It pushed two fixup commits but an open question for the last
 comment on the certificate reject time.

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-05-09 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  merge_ready
 Priority:  Medium   |  Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #21888   | Points:  3
 Reviewer:  asn  |Sponsor:  SponsorR-must
-+
Changes (by dgoulet):

 * status:  needs_information => merge_ready
 * reviewer:   => asn


Comment:

 Ok, extra fixup commit pushed to address the last comment about the
 certificate expiry lifetime check. This is ready for merge.

 Branch: `ticket21871_031_02`
 Rebased on master and fixup squashed branch: `ticket21871_031_03`
 Spec: `ticket21871_01`

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-05-11 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  merge_ready
 Priority:  Medium   |  Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #21888   | Points:  3
 Reviewer:  asn  |Sponsor:  SponsorR-must
-+

Comment (by nickm):

 Spec merged.

 Tried to merge ticket21871_031_03, but the unit tests fail for me; do they
 work for you?

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-05-11 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  needs_revision
 Priority:  Medium   |  Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #21888   | Points:  3
 Reviewer:  asn  |Sponsor:  SponsorR-must
-+
Changes (by nickm):

 * status:  merge_ready => 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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-05-11 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  needs_review
 Priority:  Medium   |  Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #21888   | Points:  3
 Reviewer:  asn  |Sponsor:  SponsorR-must
-+
Changes (by dgoulet):

 * status:  needs_revision => needs_review


Comment:

 Oh my that's embarrassing... Sorry about that!

 Fixup commit `b8452e20` in `ticket21871_031_03`

--
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] #21871 [Core Tor/Tor]: prop224: Change descriptor format for legacy encryption key

2017-05-11 Thread Tor Bug Tracker & Wiki
#21871: prop224: Change descriptor format for legacy encryption key
-+
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  enhancement  | Status:  closed
 Priority:  Medium   |  Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:  implemented
 Keywords:  tor-hs, prop224  |  Actual Points:
Parent ID:  #21888   | Points:  3
 Reviewer:  asn  |Sponsor:  SponsorR-must
-+
Changes (by nickm):

 * status:  needs_review => closed
 * resolution:   => implemented


Comment:

 Tests pass now.  Merging.  Thanks!

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