0
$\begingroup$

Could you please explain what the pipe (|) in tor specification means -- is it a bitwise or or a concatenation of the values?

  1. Encoding onion addresses [ONIONADDRESS]

    The onion address of a hidden service includes its identity public key, a version field and a basic checksum. All this information is then base32 encoded as shown below:

    onion_address = base32(PUBKEY | CHECKSUM | VERSION) + ".onion"

    CHECKSUM = H(".onion checksum" | PUBKEY | VERSION)[:2]

    where:

    • PUBKEY is the 32 bytes ed25519 master pubkey of the hidden service.
    • VERSION is an one byte version field (default value '\x03')
    • ".onion checksum" is a constant string
    • CHECKSUM is truncated to two bytes before inserting it in onion_address

From the context, I understand it is a concatenation-- is that so?

If one has a working short Python\Node\Ruby snippet for that, it would be lovely. :)

$\endgroup$
2
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because it is not related to cryptography, but to the meaning of symbols in the technical specifications for a cryptographic tool. $\endgroup$
    – forest
    Commented Jul 6, 2019 at 22:50
  • $\begingroup$ Putting this on hold, Mr. The meaning of the symbol | depends on context, in this case Tor. Such questions are not related to cryptography but to the protocol in question. $\endgroup$
    – Maarten Bodewes
    Commented Jul 11, 2019 at 9:57

1 Answer 1

3
$\begingroup$

As you suspect, it's a concatenation symbol. Some times it's $|$ and others $||$. Or $+$. Python and PL/SQL examples to confirm. Or a cryptographic example: bottom of page 5 of FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions.

If it were bitwise OR, you'd make a real mess of the public key's use with PUBKEY | CHECKSUM | VERSION.

It can get weird though if you dig deeper as: Is there a common symbol for concatenating two (finite) sequences?

$\endgroup$
2
  • $\begingroup$ thank you. have you got any example\tutorial on how to generate onion address v3 (hostname) on linux command line? $\endgroup$
    – Mr.
    Commented Jul 6, 2019 at 14:03
  • $\begingroup$ @Mr. Alas, no :-( $\endgroup$
    – Paul Uszak
    Commented Jul 11, 2019 at 11:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.