Need Help with Biased Nonce Generation for Research

4 replies 255 views
ColdVaultMember
Posts: 19 · Reputation: 184
#1Oct 15, 2022, 06:39 AM
I'm on the hunt for a program or method to create biased nonce signatures that reflect real-world scenarios for my research. I really want to dig deeper into lattices for cryptanalysis and tackle HNP. I'm starting with 64-bit biased nonces and plan to work my way down from there. I found a database of signatures for 1-bit nonce bias, but I'm looking for something that covers a range from 64 all the way down to 1 or 2. Anyone got any suggestions or a database of signatures with biases I could use for my testing and research? Just to clarify, I'm aware of the deterministic nonces in Bitcoin, and this isn't for any attack but purely for research.
2 Reply Quote Share
luckyapeFull Member
Posts: 77 · Reputation: 599
#2Oct 15, 2022, 12:13 PM
If you dig through that GitHub repo you linked, you'll notice it's already basically the seed crystal that you need. It's solving the HNP setup and it has a toy pipeline for producing and/or consuming signatures in the exact format the lattice code expects. Instead of hunting for some magical database of "realistic" biased signatures, just generate your own in a clean sandbox with a throwaway key and a nonce source you intentionally cripple in controlled ways, then crank the parameter knob and watch where the solver starts to succeed or fail.
4 Reply Quote Share
ColdVaultMember
Posts: 19 · Reputation: 184
#3Oct 15, 2022, 05:26 PM
Thanks I am using that and the minerva set decided to build my own DB Research is not on LLL or BKZ algorithms but something else. It would nice to have a clean set of tested DBs which have been verified by community
1 Reply Quote Share
alex777Member
Posts: 5 · Reputation: 107
#4Oct 15, 2022, 10:15 PM
I'm building a suite of Rust tools for blockchain security research: vusi - ECDSA signature vulnerability analysis. Currently implements nonce reuse detection with private key recovery. Roadmap includes: Biased nonce attacks (HNP/lattice) - #3LCG nonce detection - #4Polynonce attacks - #2Vulnerable signature generator for research - #8 (generate biased/LCG/related nonces with controlled parameters, 64-bit down to 1-bit) vuke - Weak key generation analysis. Reproduces historical vulnerabilities: brainwallets, Milksad (MT19937), MultiBit HD bug, Electrum pre-BIP39, LCG/Xorshift PRNGs, SHA256 chains. Both generates weak keys and scans for them. vusi follows the same architecture - one tool that generates test data and analyzes/attacks it. Complete research pipeline. If you're interested in contributing or testing, repos are open.
2 Reply Quote Share
ColdVaultMember
Posts: 19 · Reputation: 184
#5Oct 16, 2022, 08:36 PM
It is pretty great. Looks Well Written. I am working on a project of my own and been looking for dataset like the r,s,z values that have nonce bias like this one here (https://github.com/crocs-muni/minerva/tree/master/data) Thanks for your Code! Will Test it out and Provide Analysis
2 Reply Quote Share

Related topics