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

Re: [tor-relays] Issues with offline master key functionality



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Thank you s7r for helping!

On 03/02/2016 17:53, s7r wrote:
> Hello - see inline
> 
> On 2/3/2016 3:49 PM, Riccardo Mori wrote:
>> Hi everyone,
> 
>> Two months ago I decided to try the new ed25519 key introduced
>> in Tor 2.7 with OfflineMasterKey set so I can keep the master key
>> in a different place and just upload the medium-term signing key
>> every month. Last month everything went ok: I renewed the key and
>> Tor accepted it. This time instead after generating the new
>> signing key with
> 
>> # tor --datadirectory path_to_my_master_key --signingkeylifetime 
>> '1 months' --keygen
> 
> 
> Why do you use such a value for SigningKeyLifetime when the default
> is 30 days already? You can just skip --signingkeylifetime and
> have medium term signing key valid for 30 days (1 month). I am not
> totally sure *1 months* is a valid argument here (could be, not
> sure) - why not the default 30 days or more than 1 month?


I wasn't sure about the default value and in case that after an update
the default value were changed mine would still be 1 month.
Anyway there's no important reason.

In the two text files attached there's the history of the commands I
typed (made with script), so if you want you can find more details there
.
I am going to reply to your question here anyway


> - path_to_my_master_key is the path to the folder containing a
> 'keys' subfolder which contains the ed25519_master_id_secret_key or
> (_encrypted)?
> 
> - the user running the 'tor --keygen' command has read/write 
> permissions to the targeted folder from --datadirectory?


yes to both of them, the folder contains
ed25519_master_id_secret_key_encrypted and ed25519_master_id_public_key


> - is the date on the server where the 'tor --keygen' command runs
> correct?


Yeah, the date is synchronized with ntp in both systems (the Tor node
and my laptop that contains the master key), the only thing that could
be an issue is that the two systems are on different time zones: one
is UTC+1 and the other is CST (UTC-6)


> - fixing the permissions you mean changing the owner of the files
> to the user actually running the Tor daemon on your system?
> (debian-tor, _tor, etc.)

yes, it's debian-tor, Tor node is running on debian 8.3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWskQYAAoJEE1LNuolWAxgQr0QAISu2/uDFJaRQOCpT3IAeR1i
KOLCZn0+V/0AOWQHnDH58/KT3m4cqE8ELhJLD3zuWJUqZI6ABr8r8wP30bJVW8JO
hjhaECK88ziwmk+7JR9MNugnbfTDHCyl+PYkSJZTfal04sdY59JaOWTgyHHp1c/P
UxXbvbGawxDPvlR+WvphsVgXcy3C4Ws3P5Xxkdk5P9jwAYn5rTCVWT4/2KpokHGr
wUxsxDPM/Z13oOaKIPkFp+/4zzWf0GhiCVT6x3OrG27z1+9aweMhlt/tgRMC5dQC
d8NE/tTLqnPVOtS/9PICKmpUwI0IswQSGmEaNOPho8yraZltFEpAcZyhV4MkzrdX
rnfX+DV7aYL8rICDuggh9GbSvqgFiD3Y0y8ZN12K1Po+mkb55DTiLd1sUh3yAGUk
HWbV+LipVIjlkn7wLKL9Ehi5+v2v3e0YnGHNdX4skCrdVV2i9lv+ts2j6mmUg2DE
xD0wmolVZCXxJ6il9IdFGC63Dghp1kofeDvFbULsnk410IyDdz1f8BngVmfJjksb
EwoSjktOQW0U2lEgZpADS9//Y8nCnivju6MjWkwg0WKRW3BHnu11byIhGxWjFOAx
AxPPSm07uMyn+ShEJjFCY/ccRp8n+s0Ki6m1cOoZQou+R/qa4b0yof5XMqk9NBLq
33zWVJlySKIsWU1Ia6nd
=n4Z0
-----END PGP SIGNATURE-----
Script iniziato su mer 03 feb 2016 18:58:43 CET
]0;root@patacca-laptop:~/jah_keysroot@patacca-laptop jah_keys # ll
  totale 52
  drwx------  3 root    root    4096  3 feb 18.56 .
  drwxr-x--- 20 root    root    4096  3 feb 18.56 ..
  drwx------  2 root    root    4096  3 feb 18.09 keys
  -rw-r--r--  1 patacca patacca 2468 30 nov 11.15 keys.tar.gz
  -rw-r--r--  1 root    root       0  3 feb 18.58 patacca-laptop.log
  -rw-------  1 root    root     887  4 nov 22.29 secret_id_key
  -rw-------  1 root    root     887 25 nov 23.06 secret_onion_key
  -rw-------  1 root    root      96 25 nov 23.06 secret_onion_key_ntor
  -rw-------  1 root    root      96 18 nov 23.06 secret_onion_key_ntor.old
  -rw-------  1 root    root     887 18 nov 23.06 secret_onion_key.old
//DIRED// 62 63 114 116 167 195 246 284 335 355 406 432 483 487 538 549 600 618 669 682 733 749 800 821 872 897 948 968
//DIRED-OPTIONS// --quoting-style=literal
]0;root@patacca-laptop:~/jah_keysroot@patacca-laptop jah_keys # ll keys
  totale 24
  drwx------ 2 root root 4096  3 feb 18.09 .
  drwx------ 3 root root 4096  3 feb 18.56 ..
  -rw------- 1 root root   64  3 feb 13.25 ed25519_master_id_public_key
  -rw------- 1 root root  227  3 feb 13.25 ed25519_master_id_secret_key_encrypted
  -rw------- 1 root root  172  3 feb 18.09 ed25519_signing_cert
  -rw------- 1 root root   96  3 feb 18.09 ed25519_signing_secret_key
//DIRED// 55 56 100 102 146 174 218 256 300 320 364 390
//DIRED-OPTIONS// --quoting-style=literal
]0;root@patacca-laptop:~/jah_keysroot@patacca-laptop jah_keys # pwd
/root/jah_keys
]0;root@patacca-laptop:~/jah_keysroot@patacca-laptop jah_keys # whoami
root
]0;root@patacca-laptop:~/jah_keysroot@patacca-laptop jah_keys # timedatectl 
      Local time: mer 2016-02-03 18:59:03 CET
  Universal time: mer 2016-02-03 17:59:03 UTC
        RTC time: mer 2016-02-03 17:59:03
       Time zone: Europe/Rome (CET, +0100)
 Network time on: no
NTP synchronized: yes
 RTC in local TZ: no
]0;root@patacca-laptop:~/jah_keysroot@patacca-laptop jah_keys # tor --datadirectory /root/jah_keys/ --keygen
Feb 03 19:01:24.065 [notice] Tor v0.2.7.6 running on Linux with Libevent 2.0.22-stable, OpenSSL 1.0.2f and Zlib 1.2.8.
Feb 03 19:01:24.065 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Feb 03 19:01:24.065 [notice] Read configuration file "/etc/tor/torrc".
Feb 03 19:01:24.067 [warn] You are running Tor as root. You don't need to, and you probably shouldn't.
Feb 03 19:01:24.068 [notice] It looks like I need to generate and sign a new medium-term signing key, because you asked me to make one with --keygen. To do that, I need to load the permanent master identity key.
Enter pasphrase for master key:
]0;root@patacca-laptop:~/jah_keysroot@patacca-laptop jah_keys # ll keys
  totale 24
  drwx------ 2 root root 4096  3 feb 19.01 .
  drwx------ 3 root root 4096  3 feb 18.56 ..
  -rw------- 1 root root   64  3 feb 13.25 ed25519_master_id_public_key
  -rw------- 1 root root  227  3 feb 13.25 ed25519_master_id_secret_key_encrypted
  -rw------- 1 root root  172  3 feb 19.01 ed25519_signing_cert
  -rw------- 1 root root   96  3 feb 19.01 ed25519_signing_secret_key
//DIRED// 55 56 100 102 146 174 218 256 300 320 364 390
//DIRED-OPTIONS// --quoting-style=literal
]0;root@patacca-laptop:~/jah_keysroot@patacca-laptop jah_keys # scp -i /home/patacca/.ssh/id_ed25519_ermes_root ed25519_signing_* root@xxxxxxxxxxxxxxx:root/root/
Enter passphrase for key '/home/patacca/.ssh/id_ed25519_ermes_root': 

ed25519_signing_cert                                                                                                                                                               0%    0     0.0KB/s   --:-- ETA
ed25519_signing_cert                                                                                                                                                             100%  172     0.2KB/s   00:00    

ed25519_signing_secret_key                                                                                                                                                         0%    0     0.0KB/s   --:-- ETA
ed25519_signing_secret_key                                                                                                                                                       100%   96     0.1KB/s   00:00    
]0;root@patacca-laptop:~/jah_keysroot@patacca-laptop jah_keys # exit

Script effettuato su mer 03 feb 2016 19:02:33 CET
Script started on Wed Feb  3 12:04:08 2016
root@jah ~ # timedatectl
      Local time: Wed 2016-02-03 12:04:45 CST
  Universal time: Wed 2016-02-03 18:04:45 UTC
        RTC time: Wed 2016-02-03 18:04:45
       Time zone: America/Chicago (CST, -0600)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: no
 Last DST change: DST ended at
                  Sun 2015-11-01 01:59:59 CDT
                  Sun 2015-11-01 01:00:00 CST
 Next DST change: DST begins (the clock jumps one hour forward) at
                  Sun 2016-03-13 01:59:59 CST
                  Sun 2016-03-13 03:00:00 CDT
root@jah ~ # ll /root/ed25519_signing_*
  -rw------- 1 root root 172 Feb  3 12:02 /root/ed25519_signing_cert
  -rw------- 1 root root  96 Feb  3 12:02 /root/ed25519_signing_secret_key
//DIRED// 42 68 111 143
//DIRED-OPTIONS// --quoting-style=literal
root@jah ~ # mv /root/ed25519_signing_* /var/lib/tor/keys/
root@jah ~ # ll /var/lib/tor/keys/
  total 32
  drwx--S--- 1 debian-tor debian-tor 338 Feb  3 12:05 .
  drwx--S--- 1 debian-tor debian-tor 330 Feb  3 11:12 ..
  -rw------- 1 debian-tor debian-tor  64 Feb  3 06:36 ed25519_master_id_public_key
  -rw------- 1 root       root       172 Feb  3 12:02 ed25519_signing_cert
  -rw------- 1 root       root        96 Feb  3 12:02 ed25519_signing_secret_key
  -rw------- 1 debian-tor debian-tor 887 Dec 18 10:21 secret_id_key
  -rw------- 1 debian-tor debian-tor 891 Jan 29 11:41 secret_onion_key
  -rw------- 1 debian-tor debian-tor 887 Jan 22 11:41 secret_onion_key.old
  -rw------- 1 debian-tor debian-tor  96 Jan 29 11:41 secret_onion_key_ntor
  -rw------- 1 debian-tor debian-tor  96 Jan 22 11:41 secret_onion_key_ntor.old
//DIRED// 65 66 121 123 178 206 261 281 336 362 417 430 485 501 556 576 631 652 707 732
//DIRED-OPTIONS// --quoting-style=literal
root@jah ~ # chown debian-tor:debian-tor /var/lib/tor/keys/ed25519_signing_*
root@jah ~ # systemctl restart tor
root@jah ~ # tail -f /var/log/tor/log
Feb 03 12:05:34.000 [notice] Not disabling debugger attaching for unprivileged users.
Feb 03 12:05:34.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Feb 03 12:05:34.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Feb 03 12:05:34.000 [notice] Configured to measure statistics. Look for the *-stats files that will first be written to the data directory in 24 hours from now.
Feb 03 12:05:34.000 [warn] Could not open "/etc/tor/tor-exit-notice.html": No such file or directory
Feb 03 12:05:34.000 [warn] DirPortFrontPage file '/etc/tor/tor-exit-notice.html' not found. Continuing anyway.
Feb 03 12:05:34.000 [notice] It looks like I need to generate and sign a new medium-term signing key, because the one I have is expired. To do that, I need to load the permanent master identity key.
Feb 03 12:05:34.000 [warn] We needed to load a secret key from /var/lib/tor/keys/ed25519_master_id_secret_key, but couldn't find it. Did you forget to copy it over when you copied the rest of the signing key material?
Feb 03 12:05:34.000 [warn] Can't load master identity key; OfflineMasterKey is set.
Feb 03 12:05:34.000 [err] Error initializing keys; exiting
Feb 03 12:05:35.000 [notice] Tor 0.2.7.6 (git-605ae665009853bd) opening log file.
Feb 03 12:05:35.652 [notice] Tor v0.2.7.6 (git-605ae665009853bd) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1k and Zlib 1.2.8.
Feb 03 12:05:35.653 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Feb 03 12:05:35.653 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Feb 03 12:05:35.653 [notice] Read configuration file "/etc/tor/torrc".
Feb 03 12:05:35.657 [notice] Opening Socks listener on 127.0.0.1:9050
Feb 03 12:05:35.657 [notice] Opening Control listener on 127.0.0.1:9051
Feb 03 12:05:35.658 [notice] Opening Control listener on /var/run/tor/control
Feb 03 12:05:35.658 [notice] Opening OR listener on 0.0.0.0:9001
Feb 03 12:05:35.658 [notice] Opening Directory listener on 0.0.0.0:9030
Feb 03 12:05:35.000 [notice] Not disabling debugger attaching for unprivileged users.
Feb 03 12:05:35.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Feb 03 12:05:35.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Feb 03 12:05:35.000 [notice] Configured to measure statistics. Look for the *-stats files that will first be written to the data directory in 24 hours from now.
Feb 03 12:05:35.000 [warn] Could not open "/etc/tor/tor-exit-notice.html": No such file or directory
Feb 03 12:05:35.000 [warn] DirPortFrontPage file '/etc/tor/tor-exit-notice.html' not found. Continuing anyway.
Feb 03 12:05:35.000 [notice] It looks like I need to generate and sign a new medium-term signing key, because the one I have is expired. To do that, I need to load the permanent master identity key.
Feb 03 12:05:35.000 [warn] We needed to load a secret key from /var/lib/tor/keys/ed25519_master_id_secret_key, but couldn't find it. Did you forget to copy it over when you copied the rest of the signing key material?
Feb 03 12:05:35.000 [warn] Can't load master identity key; OfflineMasterKey is set.
Feb 03 12:05:35.000 [err] Error initializing keys; exiting
Feb 03 12:05:36.000 [notice] Tor 0.2.7.6 (git-605ae665009853bd) opening log file.
Feb 03 12:05:36.627 [notice] Tor v0.2.7.6 (git-605ae665009853bd) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1k and Zlib 1.2.8.
Feb 03 12:05:36.627 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Feb 03 12:05:36.628 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Feb 03 12:05:36.628 [notice] Read configuration file "/etc/tor/torrc".
Feb 03 12:05:36.632 [notice] Opening Socks listener on 127.0.0.1:9050
Feb 03 12:05:36.632 [notice] Opening Control listener on 127.0.0.1:9051
Feb 03 12:05:36.633 [notice] Opening Control listener on /var/run/tor/control
Feb 03 12:05:36.633 [notice] Opening OR listener on 0.0.0.0:9001
Feb 03 12:05:36.633 [notice] Opening Directory listener on 0.0.0.0:9030
Feb 03 12:05:36.000 [notice] Not disabling debugger attaching for unprivileged users.
Feb 03 12:05:36.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Feb 03 12:05:36.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Feb 03 12:05:36.000 [notice] Configured to measure statistics. Look for the *-stats files that will first be written to the data directory in 24 hours from now.
Feb 03 12:05:36.000 [warn] Could not open "/etc/tor/tor-exit-notice.html": No such file or directory
Feb 03 12:05:36.000 [warn] DirPortFrontPage file '/etc/tor/tor-exit-notice.html' not found. Continuing anyway.
Feb 03 12:05:36.000 [notice] It looks like I need to generate and sign a new medium-term signing key, because the one I have is expired. To do that, I need to load the permanent master identity key.
Feb 03 12:05:36.000 [warn] We needed to load a secret key from /var/lib/tor/keys/ed25519_master_id_secret_key, but couldn't find it. Did you forget to copy it over when you copied the rest of the signing key material?
Feb 03 12:05:36.000 [warn] Can't load master identity key; OfflineMasterKey is set.
Feb 03 12:05:36.000 [err] Error initializing keys; exiting
Feb 03 12:05:37.000 [notice] Tor 0.2.7.6 (git-605ae665009853bd) opening log file.
Feb 03 12:05:37.646 [notice] Tor v0.2.7.6 (git-605ae665009853bd) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1k and Zlib 1.2.8.
Feb 03 12:05:37.646 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Feb 03 12:05:37.646 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Feb 03 12:05:37.646 [notice] Read configuration file "/etc/tor/torrc".
Feb 03 12:05:37.650 [notice] Opening Socks listener on 127.0.0.1:9050
Feb 03 12:05:37.650 [notice] Opening Control listener on 127.0.0.1:9051
Feb 03 12:05:37.651 [notice] Opening Control listener on /var/run/tor/control
Feb 03 12:05:37.651 [notice] Opening OR listener on 0.0.0.0:9001
Feb 03 12:05:37.651 [notice] Opening Directory listener on 0.0.0.0:9030
Feb 03 12:05:37.000 [notice] Not disabling debugger attaching for unprivileged users.
Feb 03 12:05:37.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Feb 03 12:05:37.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Feb 03 12:05:37.000 [notice] Configured to measure statistics. Look for the *-stats files that will first be written to the data directory in 24 hours from now.
Feb 03 12:05:37.000 [warn] Could not open "/etc/tor/tor-exit-notice.html": No such file or directory
Feb 03 12:05:37.000 [warn] DirPortFrontPage file '/etc/tor/tor-exit-notice.html' not found. Continuing anyway.
Feb 03 12:05:37.000 [notice] It looks like I need to generate and sign a new medium-term signing key, because the one I have is expired. To do that, I need to load the permanent master identity key.
Feb 03 12:05:37.000 [warn] We needed to load a secret key from /var/lib/tor/keys/ed25519_master_id_secret_key, but couldn't find it. Did you forget to copy it over when you copied the rest of the signing key material?
Feb 03 12:05:37.000 [warn] Can't load master identity key; OfflineMasterKey is set.
Feb 03 12:05:37.000 [err] Error initializing keys; exiting
Feb 03 12:05:38.000 [notice] Tor 0.2.7.6 (git-605ae665009853bd) opening log file.
Feb 03 12:05:38.646 [notice] Tor v0.2.7.6 (git-605ae665009853bd) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1k and Zlib 1.2.8.
Feb 03 12:05:38.646 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Feb 03 12:05:38.646 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Feb 03 12:05:38.646 [notice] Read configuration file "/etc/tor/torrc".
Feb 03 12:05:38.650 [notice] Opening Socks listener on 127.0.0.1:9050
Feb 03 12:05:38.650 [notice] Opening Control listener on 127.0.0.1:9051
Feb 03 12:05:38.651 [notice] Opening Control listener on /var/run/tor/control
Feb 03 12:05:38.651 [notice] Opening OR listener on 0.0.0.0:9001
Feb 03 12:05:38.651 [notice] Opening Directory listener on 0.0.0.0:9030
Feb 03 12:05:38.000 [notice] Not disabling debugger attaching for unprivileged users.
Feb 03 12:05:38.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Feb 03 12:05:38.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Feb 03 12:05:38.000 [notice] Configured to measure statistics. Look for the *-stats files that will first be written to the data directory in 24 hours from now.
Feb 03 12:05:38.000 [warn] Could not open "/etc/tor/tor-exit-notice.html": No such file or directory
Feb 03 12:05:38.000 [warn] DirPortFrontPage file '/etc/tor/tor-exit-notice.html' not found. Continuing anyway.
Feb 03 12:05:38.000 [notice] It looks like I need to generate and sign a new medium-term signing key, because the one I have is expired. To do that, I need to load the permanent master identity key.
Feb 03 12:05:38.000 [warn] We needed to load a secret key from /var/lib/tor/keys/ed25519_master_id_secret_key, but couldn't find it. Did you forget to copy it over when you copied the rest of the signing key material?
Feb 03 12:05:38.000 [warn] Can't load master identity key; OfflineMasterKey is set.
Feb 03 12:05:38.000 [err] Error initializing keys; exiting
^C
root@jah ~ # exit

Script done on Wed Feb  3 12:05:53 2016

Attachment: patacca-laptop.log.sig
Description: PGP signature

Attachment: tornode.log.sig
Description: PGP signature

_______________________________________________
tor-relays mailing list
tor-relays@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays