Aug 24 - Aug 24, 2026
This version introduces a custom variant of SipHash, optimized specifically for use in environments susceptible to denial-of-service attacks via crafted data that could cause hash collisions. Traditionally, these tables have utilized a salted hash function—SipHash with a secret salt generated at startup—to mitigate such risks. The new variant, termed SipHash-1-3-UJ, modifies the traditional SipHash in several key aspects to increase efficiency and security.
Firstly, the update reduces the complexity of hash calculations by changing the number of SipRounds per compression from two to one and per finalize from four to three. Additionally, it shifts from a byte-based input system to a block-based approach, which does not require padding, hence avoiding potential collision issues from varying input lengths. Furthermore, the update introduces the capability to handle "jumbo" 256-bit blocks, which are processed as single units if they originate from cryptographic hashes like txids (transaction identifiers). This is particularly pertinent since txids are already secure cryptographic hashes and provide robustness against manipulation.
These changes collectively reduce the computational overhead, making hash calculations faster and more efficient, a critical factor for performance-sensitive components like the UTXO set cache. For instance, previous configurations required up to 17.0 nanoseconds per lookup, which has now been reduced to 10.6 nanoseconds on specific hardware setups like the Ryzen 5950X CPU. The innovative SipHash-1-3-UJ design has been briefly reviewed by cryptographers and, while it has not undergone extensive scrutiny, initial assessments suggest it remains highly secure against brute-force collision attacks.
Moreover, the application of this new hashing function extends beyond just internal optimizations. It has also been integrated into processes like fetching block input prevouts in parallel during the ConnectBlock operation, an improvement aimed at speeding up blockchain syncing and verification processes. This particular usage aligns well with the overall strategy of enhancing performance without compromising on the security parameters essential in blockchain operations. Notably, the implementation adjusts how transaction identifiers are managed, optimizing their storage and retrieval in scenarios where multiple transactions within a block need to be accessed rapidly and securely.
These updates have been made possible through collaborative efforts within the developer community, indicating robust peer review and contributions that bolster the reliability and functionality of Bitcoin Core’s forthcoming version. Additionally, further applications of SipHash-1-3-UJ in future releases are anticipated as its benefits continue to be realized across different facets of blockchain management and operations.
TLDR
We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project.
Give Feedback