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

[tor-dev] generate relay fingerprint without tor given the datadir/keys folder?



Hi,

given the files within the datadir/keys folder (without the
datadir/fingerprint file), is there an easy way to generate the relay
fingerprint? (using openssl?)

According to the spec [1] the fingerprint is the SHA1 hash of the public
key. (I assume RSA pubkey)
According to the tor man page [2] the RSA public key should be in
keys/secret_id_key.

openssl rsa -in secret_id_key -pubout| ..? |sha1sum

thanks,
nusenu


[1]
>     "fingerprint" fingerprint NL
> 
>        [At most once]
> 
>        A fingerprint (a HASH_LEN-byte of asn1 encoded public key, encoded in
>        hex, with a single space after every 4 characters) for this router's
>        identity key. A descriptor is considered invalid (and MUST be
>        rejected) if the fingerprint line does not match the public key.


[2]
>        DataDirectory/keys/secret_id_key
>            A relay’s RSA1024 permanent identity key, including private and
>            public components. Used to sign router descriptors, and to sign
>            other keys.


Attachment: signature.asc
Description: OpenPGP digital signature

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