commit 717b416fcdff45edb5f2022d1b7ecbd05eca4cb5
parent 38d27f545172d104e7e80633638a04f45ee0623b
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Fri, 8 Aug 2025 14:12:40 +0200
update taldir spec wrt prefix free encoding
Diffstat:
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/core/api-taldir.rst b/core/api-taldir.rst
@@ -192,8 +192,9 @@ Address registration
a concurrent registration of a different public key, and the user might
accidentally authorize the registration of the public key of a different
wallet.
- ``$H_ADDRESS`` is the SHA-512 hash of the address to be registered in
- Crockford base32 encoding.
+ ``$H_ADDRESS`` is the SHA-512 hash of a prefix-free encoding of the
+ address to be registered in Crockford Base32 encoding, specifically:
+ ``SHA-512(len($METHOD)+len($ADDRESS)||$METHOD||$ADDRESS)``
The service verifies that ``$ADDRESS`` is, in fact, the preimage of ``$H_ADDRESS``
and ``$ADDRESS`` as well as the ``inbox_uri`` are displayed to the user
for verification.
@@ -202,8 +203,9 @@ Address registration
This request is the last step of a registration, proving to the TalDir that
the user of the wallet is indeed able to receive messages at the specified
- address. ``$H_ADDRESS`` is the SHA-512 hash of the address to be registered in
- Crockford base32 encoding.
+ address.
+ ``$H_ADDRESS`` is the SHA-512 hash of a prefix-free encoding of the
+ address to be registered in Crockford Base32 encoding.
**Request**
@@ -237,8 +239,9 @@ Address lookup
.. http:get:: /$H_ADDRESS
Lookup the target URI associated with
- an address in the TalDir. Here, ``$H_ADDRESS`` is the SHA-512 hash of
- a registered address in Crockford base32 encoding.
+ an address in the TalDir. Here,
+ ``$H_ADDRESS`` is the SHA-512 hash of a prefix-free encoding of the
+ address to be registered in Crockford base32 encoding.
**Response**