taler
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Taler] Meaning of XORed hashes in the Exchange API


From: Christian Grothoff
Subject: Re: [Taler] Meaning of XORed hashes in the Exchange API
Date: Tue, 19 Sep 2023 18:18:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

You're right, we probably should just sort.

However, using the master key isn't really the answer, that'd be a mess as the offline tool doesn't track all the historic keys and that'd also require tons of signatures. So we should probably keep the same online signing key and sort to get a stable order.

I am actually wondering if we shouldn't do more, like allow the wallet to specify a filter (no CS-keys, no-RSA keys, no age-restrictions, etc.) and in that case we'll have to also sign over such a filter. Filters would likely make sense for wallets that only support a restricted feature set.

As you said, the signature isn't used yet, and I've taken note that before we start using it, we should change at least the way we deal with sets.

On 9/19/23 17:53, Jonathan Krebs wrote:
The objective of the signature over the XOR hash is to prevent truncation attacks where a man-in-the-middle attacker removes some denominations from the list. With this signature, entries cannot be
removed from the array without the client noticing.

The xor doesn't allow for linear combinations and/or arbitrary hash values, especially as each value still can only appear ones. The point of using XOR is that the denominations are a *set* and the order does not matter (and may indeed change due to the use of a hash map in exchange implementations). With XOR, the order does not matter, but each element must appear in the set and the XOR will change on deletion (we don't actually worry about addition, as each element is signed with the stronger offline master key).

Thank You for the fast reply!

The XORed hash-code has 256 bits, for a deletion attack we need few more than 256 random vectors to achieve a full rank, which is not an unreasonable amount: Let's assume an exchange is running for 10 years, rotating keys every year, having 10 years of legal expiry, CS and RSA keys for the 15 Euro denominations (0.01 to 500).
This multiplies to 300 keys.

If the truncation attack would target a freshly installed wallet (which can not recognize missing known keys), the subset of old keys can be freely selected, i.e. linearly combined.


The deletion attack requires an attacker to break HTTPS/TLS *and* achieves very little, so I understand that Florian didn't prioritize implementing it..

I Agree. Checking the signature alone does not gain much security, but maybe the wallet should record the signed hash value and the time range to the auditors to detect the attack.

But then - offline signing sorted lists of all possible /keys denominations results by the master key would be more direct and easier, as the number of time windows with different results is small.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]