-
Notifications
You must be signed in to change notification settings - Fork 116
Description
Background
XMSS is a stateful signature scheme. An attacker in possession of two or more signatures from the same one-time signature (ots) position with sufficient resources may be able to forge a signature. The QRL network expressly disallows ots re-use for an address by maintaining accurate state of confirmed transactions from the blockchain and storing a record of which ots are used and unused for each address. Any transaction sent by a user into the network which features an ots position classed as used is dropped, not relayed, and cannot be included into a valid block.
On very rare occasions a transaction featuring a valid signature is dropped from the network as invalid due to failed state checks such as insufficient funds.
Best practice
The only way to be completely sure that ots are not re-used is for the user to note down what they have used after each attempt. As each signature occurs, each ots is accounted for regardless of whether the transaction is confirmed or dropped by the network.
Suggested network improvements
Currently the webwallet synchronises address state for a wallet address from the network via the grpc api. This includes an ots_bitfield and counter which reveals which signature positions are used/unused from the blockchain. The webwallet then chooses a safe position to sign from. This state data does not include information not in the chain and thus transactions dropped previously are unknown.
One possibility is to add an optional configuration file setting extended_ots_state in the node. This optional flag allows the node to supplement address state with optional off_chain_ots_bitfield and off_chain_counter which become existent when a transaction is seen and dropped for a given address and ots position. This could either simply activate in the presence of invalid transactions which do not confirm, and with an additional array could denote the number of times an address has been re-used.
This data could be exported via a modified grpc call pairing GetAddressStateReq/GetAddressStateResp and provide the webwallet with an added layer of protection for users.