Re: [tor-dev] HSv3 descriptor work in stem

2019-12-04 Thread George Kadianakis
Hello Damian,

I reported a bug report here:
https://trac.torproject.org/projects/tor/ticket/31823#comment:19

I just reopened the old trac ticket but I think this is suboptimal.

Would you prefer me to open new tickets in the future, or maybe open an
issue on Github? I can do whatever is convenient for you!

Thanks for all the code! So far it works great!
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] HSv3 descriptor work in stem

2019-10-29 Thread George Kadianakis
George Kadianakis  writes:

> Damian Johnson  writes:
>
>> Thanks George! Yup, work on that branch is in progress:
>>
>> https://gitweb.torproject.org/user/atagar/stem.git/log/?h=hsv3
>
> Hello Damian,
>
> thanks for the reply here! I'm now back and ready to start working again
> on onionbalance/stem.
>
> What is your plan with the hsv3 branch? Should I start reviewing your
> changes already, or give you more time to do more?
>
> Thanks a lot for all the work! :)

Hello again,

I took a super quick look (particularly at the easy parts of your
changes). Thanks for all the changes!

My only feedback so far is that the python2 port commits have broken
python3 for me (particularly the ed25519 blinding implementation). In
general, the ed25519 blinding implementation is very hairy Python3
crypto code and it won't be easy to support both versions I think.

Would it be egregious to provide hsv3 support only for python3 users so
that we can use python3 features as we wish?

I personally plan to use HSv3 support for onionbalance and that will be
in python3, so I wouldn't mind that at all. Not sure who else is gonna
use hsv3 support in the near future.

Cheers!

PS: From now on perhaps we can use #31823 for code related discussions
(sorry for the medium mixing)
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] HSv3 descriptor work in stem

2019-10-28 Thread George Kadianakis
Damian Johnson  writes:

> Thanks George! Yup, work on that branch is in progress:
>
> https://gitweb.torproject.org/user/atagar/stem.git/log/?h=hsv3

Hello Damian,

thanks for the reply here! I'm now back and ready to start working again
on onionbalance/stem.

What is your plan with the hsv3 branch? Should I start reviewing your
changes already, or give you more time to do more?

Thanks a lot for all the work! :)
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] HSv3 descriptor work in stem

2019-10-17 Thread Damian Johnson
Thanks George! Yup, work on that branch is in progress:

https://gitweb.torproject.org/user/atagar/stem.git/log/?h=hsv3

On Thu, Oct 17, 2019 at 8:01 AM George Kadianakis  wrote:
>
> Damian Johnson  writes:
>
> >>Can I use `_descriptor_content()` to do that? Or should I call
> >>`_descriptor_content()` to generate the whole thing _without_ the
> >>sig, and then do the signature computation on its result and
> >>concatenate it after?
> >
> > Hi George. Yup, to create a signed descriptor we create the bulk of
> > the content then append the signature. Server and extrainfo
> > descriptors already do this so I suspect you can do something
> > similar...
> >
> > https://gitweb.torproject.org/stem.git/tree/stem/descriptor/server_descriptor.py#n902
> > https://gitweb.torproject.org/stem.git/tree/stem/descriptor/__init__.py#n1388
> >
> > Will this do the trick?
> >
> > PS. Sorry about the duplicate. Hit reply rather than reply-all
> > forgetting that you included the list.
>
> Thanks for the reply Damian! That was super useful!
>
> The current state of affairs can be found here: 
> https://trac.torproject.org/projects/tor/ticket/31823#comment:1
> (just in case you didn't check IRC that day)
>
> peace
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] HSv3 descriptor work in stem

2019-10-17 Thread George Kadianakis
Damian Johnson  writes:

>>Can I use `_descriptor_content()` to do that? Or should I call
>>`_descriptor_content()` to generate the whole thing _without_ the
>>sig, and then do the signature computation on its result and
>>concatenate it after?
>
> Hi George. Yup, to create a signed descriptor we create the bulk of
> the content then append the signature. Server and extrainfo
> descriptors already do this so I suspect you can do something
> similar...
>
> https://gitweb.torproject.org/stem.git/tree/stem/descriptor/server_descriptor.py#n902
> https://gitweb.torproject.org/stem.git/tree/stem/descriptor/__init__.py#n1388
>
> Will this do the trick?
>
> PS. Sorry about the duplicate. Hit reply rather than reply-all
> forgetting that you included the list.

Thanks for the reply Damian! That was super useful!

The current state of affairs can be found here: 
https://trac.torproject.org/projects/tor/ticket/31823#comment:1
(just in case you didn't check IRC that day)

peace
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] HSv3 descriptor work in stem

2019-10-02 Thread Damian Johnson
>Can I use `_descriptor_content()` to do that? Or should I call
>`_descriptor_content()` to generate the whole thing _without_ the
>sig, and then do the signature computation on its result and
>concatenate it after?

Hi George. Yup, to create a signed descriptor we create the bulk of
the content then append the signature. Server and extrainfo
descriptors already do this so I suspect you can do something
similar...

https://gitweb.torproject.org/stem.git/tree/stem/descriptor/server_descriptor.py#n902
https://gitweb.torproject.org/stem.git/tree/stem/descriptor/__init__.py#n1388

Will this do the trick?

PS. Sorry about the duplicate. Hit reply rather than reply-all
forgetting that you included the list.
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


[tor-dev] HSv3 descriptor work in stem

2019-10-02 Thread George Kadianakis
Hello atagar,

I'm starting this thread to ask you questions about stem and the HSv3
work we've been doing over email so that we don't do it over IRC.

Here is an initial question:

   I'm working on HSv3 descriptor encoding, and I'm trying to understand
   how `_descriptor_content()` works. In particular, I want to compute the
   signature of a descriptor, but I see that `descriptor_content()`
   fills it with random bytes in all the `content()` methods I managed
   to find:

('signature', _random_crypto_blob('SIGNATURE')),

   What's the right way to compute the signature for such objects? In
   particular, I would need a method that first generates the whole
   descriptor body, and then computes the signature of that with a given
   private key.

   Can I use `_descriptor_content()` to do that? Or should I call
   `_descriptor_content()` to generate the whole thing _without_ the
   sig, and then do the signature computation on its result and
   concatenate it after?


Thanks! :)
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev