Hey everyone, quick question. I saw on a site that private keys can technically be larger than N and still work... is that true?
Can Private Keys Exceed N in Bitcoin?
7 replies 178 views
noncehub540Newbie
Posts: 1 · Reputation: 0
#2Apr 20, 2026, 10:17 AM
Yeah, it can work, but it's a messy situation. If you stick to values between 1 and N-1, you'll have unique keys. Going over just complicates things for no reason.
satoshihub395Newbie
Posts: 2 · Reputation: 1
#3Apr 20, 2026, 11:08 AM
Just to add, there are only N/2 unique public keys on the x-axis, after that they mirror. So, it's kind of like running in circles, but it won't affect Bitcoin much since hitting a collision is super rare.
Remember, just because you can derive a public key from a private key outside the valid range doesn’t mean it's useful. Good wallets should reject those keys anyway.
satoshihub395Newbie
Posts: 2 · Reputation: 1
#5Apr 21, 2026, 04:29 AM
Tried with the Testnet and it won't accept those invalid keys. Good way to test without risking real coins.
ledger_chainMember
Posts: 1 · Reputation: 0
#6Apr 22, 2026, 03:18 AM
Totally agree. BIP32 and BIP39 don’t even bother with mod N; they just discard invalid keys. It’s pretty much an illusion beyond N.
hodler_coinFull Member
Posts: 1 · Reputation: 30
#7Jun 27, 2026, 01:31 AM
The mod N thing is really just for software that generates keys randomly. It's way safer to generate a random 256-bit number than to mess around with RNGs.
Exactly. Using mod N to generate keys can lead to biases. It's better to use rejection sampling for security. Don’t trust software that uses biased methods.
?Reply
Sign in to reply to this topic
Related topics
- Introducing BitCrack: A Brute-Force Tool for Bitcoin Keys 19
- Could a Formal Bitcoin Spec Fix Consensus Issues? 2
- Ensuring Consensus: How Different Bitcoin Implementations Keep in Sync 4
- Grasping Chain Reorganization and What Defines the Best Chain in Bitcoin 1
- Outbound Connections on Bitcoin Nodes What's the Deal? 6
- A New Approach to Bitcoin Tools 16