[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #33428 [Core Tor/Chutney]: Make chutney check for relay microdescriptors before verifying



#33428: Make chutney check for relay microdescriptors before verifying
-------------------------------------------+-------------------------------
 Reporter:  teor                           |          Owner:  (none)
     Type:  enhancement                    |         Status:  new
 Priority:  Medium                         |      Milestone:
Component:  Core Tor/Chutney               |        Version:
 Severity:  Normal                         |     Resolution:
 Keywords:  ipv6, prop311, outreachy-ipv6  |  Actual Points:
Parent ID:  #33050                         |         Points:  1
 Reviewer:                                 |        Sponsor:  Sponsor55-can
-------------------------------------------+-------------------------------

Comment (by anuradha1904):

 Replying to [comment:6 teor]: Hey teor, all thanks to you, I am done with
 majority of the task of the function, can you please guide me "set
 ed25519-id in the Environ to that value" step. Thank you.
 > Replying to [comment:5 anuradha1904]:
 > > Hey teor, what do you think is appropriate issue for me to start from
 a beginner perspective, and I do know how to code in C but am more
 comfortable with python, so would like to start my work in python. Thank
 you.
 >
 > I have looked at all the current outreachy-ipv6 issues, and this is the
 best Python issue. Here are some hints to get you started:
 >
 > We don't want to wait for the new ed25519-identity file in #30642, so
 here's how you can read the binary data from the key file, and encode it
 in base64:
 > {{{
 > $ chutney/tools/test-network.sh
 > # the last 32 bytes of the key file is the key data
 > # we want to remove the newline and the trailing "=" from the base64
 output
 > $ cat chutney/net/nodes/000a/keys/ed25519_master_id_public_key | tail -c
 32 | base64 | head -c -2
 > Hqp2E6Pi0BAWmip+2XEowl/CgjGesgfC0jNipORQ37A
 > $ grep "Hqp2E6Pi0BAWmip+2XEowl/CgjGesgfC0jNipORQ37A" chutney/net/nodes
 /*/cached-microdescs*
 > net/nodes/000a/cached-microdescs.new:id ed25519
 Hqp2E6Pi0BAWmip+2XEowl/CgjGesgfC0jNipORQ37A
 > net/nodes/001a/cached-microdescs.new:id ed25519
 Hqp2E6Pi0BAWmip+2XEowl/CgjGesgfC0jNipORQ37A
 > ...
 > }}}
 > The key data is random, so the exact values will be different in every
 chutney network. You'll need to take the script `cat
 chutney/net/nodes/000a/keys/ed25519_master_id_public_key | tail -c 32 |
 base64 | head -c -2`, and translate it into Python.
 >
 > You can start by writing a function called _setEd25519Id(), which should
 be called at the end of _genRouterKey():
 >
 https://github.com/torproject/chutney/blob/master/lib/chutney/TorNet.py#L741
 >
 > The function should:
 > * read keys/ed25519_master_id_public_key from datadir, if that file
 exists
 > * extract the key data
 > * convert it to base64
 > * discard the trailing "="
 > * set `ed25519-id` in the Environ to that value
 >
 > You can check you have the right value, by printing it out, then
 searching for it in the cached-microdescs and cached-microdescs.new files
 in the datadir.
 >
 > After you've written _setEd25519Id(), we can move on to the rest of this
 task.
 >
 > I hope that's enough to get you started!

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33428#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs