delvingbitcoin

A High-Privacy Key-Value Store

A High-Privacy Key-Value Store

Original Postby ZmnSCPxj

Posted on: December 6, 2023 22:58 UTC

In the realm of online transactions, network unreliability is a significant concern, with the potential for clients to lose credentials during operations due to connectivity issues.

This problem persists despite using protocols like TCP, which are criticized for their lack of privacy, and is exacerbated when employing multi-hop techniques such as those used in Lightning Network Onion Messaging (LN OMs). The core issue stems from the possibility of either the server or the client crashing at critical moments during the communication process, leading to the loss of updated credential information.

To mitigate these risks and safeguard against lost or duplicate transactions, servers implement an idempotency mechanism specifically for credential replacement. This system ensures that when a credential is marked as spent, the server not only records this status but also retains a blinded version of the new credential alongside details of the deduction and the specific operation that caused it. Upon subsequent requests that attempt to reuse a credential, the server's response is limited to providing information about the already spent credential and the next credential in line, without actually carrying out any further operations. This approach assumes that repeat credential submissions are likely accidental, perhaps caused by a sudden loss of connection, rather than intentional attempts at fraud.

For honest clients who may be unaware that an operation has previously succeeded, this system allows them to recover their new credentials without unintentionally initiating a new transaction. Conversely, malicious actors attempting to exploit the system by deliberately reusing credentials will not benefit from free services, as the server is programmed to withhold actual service provision in the case of credential reuse. This idempotent strategy ensures a balance between user error protection and safeguarding against fraudulent activity, maintaining the integrity of the transactional process.