I just found out there are six distinct n-values that match various b-values in secp256k1. It's crazy how they repeat as the b-value goes up. But then I thought, is there a connection between equations like y^2=x^3+7 and y^2=x^3+2? Like, can points on curves with the same p-value and n-value be mapped to each other?
Exploring n-values and b-values in secp256k1
19 replies 223 views
If there are any points on different curves mapping to each other, we're in trouble. Imagine figuring out one point on a curve and using it on another due to different n-values. You'll be able to crack any key. To see this in action, take a scalar mod n on two curves and compare them.
This could be tied to modular arithmetic in elliptic curve cryptography. All the operations are done modulo a prime number p, right?
rocket_2019Member
Posts: 3 · Reputation: 204
#4Sep 30, 2025, 11:53 AM
Not sure about a direct 1:1 mapping. But I noticed when b=0x0, it creates a simple loop that maps from public key to private key. I haven't found a way to map points from b=0x7 to b=0x0 yet.
real_vaultHero Member
Posts: 5 · Reputation: 3335
#5Sep 30, 2025, 05:17 PM
Totally! You can map points on curves with the same number of points. Like b-values 7, 12, 20... they're all isomorphic. But I don't think there's any known connection between curves with different numbers of points.
wallet_alphaMember
Posts: 10 · Reputation: 185
#6Sep 30, 2025, 06:28 PM
Look into Jacobian coordinates. It's clearer there. You can get the same point using the same X and Y but with a different Z coordinate. By "same point," I mean the points that can project onto an isomorphic plane.
For y^2=x^3+d (mod p) with d as a non-zero integer, you see different sets emerge based on group properties.
real_vaultHero Member
Posts: 5 · Reputation: 3335
#8Oct 1, 2025, 01:30 PM
In this example, yeah, you can map to another secp256k1 curve. But don't think you can do an invalid curve attack with those mapped points because it leads to the infinity point.
What exactly do you mean by p^2?
real_vaultHero Member
Posts: 5 · Reputation: 3335
#10Oct 3, 2025, 11:11 PM
Sure, you can crank up the p parameter for an invalid or twist attack, but you still hit the infinity point. If you factor that prime, you'll spot the prime components.
Are you sure about that? I keep hitting errors when I try.
Sorry, I typed that out on my phone. Check this code. It'll help clarify.
Got it. But still, I doubt it makes sense to define the cardinality this way, especially matching that of the original curve.
hash_cobraMember
Posts: 11 · Reputation: 209
#14Oct 6, 2025, 10:25 AM
Yeah, it looks correct. But trying to change the order number in sagemath seems useless since attacks won’t work, we just get a factor.
Anyone up for discussing changing N order in secp256k1?
I think it’s all about mapping coordinates between the original curve and its twist. The private key orders should match.
atlas_minerNewbie
Posts: 38 · Reputation: 19
#17Oct 8, 2025, 12:35 PM
Tried that with p=0xffff...^2, but I just get P combined with regular curves. Everything looks the same structure-wise.
ben.matrixNewbie
Posts: 1111 · Reputation: 35
#18Oct 8, 2025, 01:55 PM
Your code checks out. But I still don't think we can launch curve attacks under these settings. Only mapping should work.
ben.matrixNewbie
Posts: 1111 · Reputation: 35
#19Oct 8, 2025, 06:00 PM
According to Hasse's Theorem, the number of points N on an elliptic curve over a prime field p is bound to be close to p+1, with some leeway. Just having the same number of points doesn't mean there's a direct mapping between all of them.
ben.matrixNewbie
Posts: 1111 · Reputation: 35
#20Oct 8, 2025, 06:26 PM
Fun fact: libsecp256k1 has optimizations that use isomorphic groups to skip calculations. The results may look invalid but they shift onto these isomorphic curves predictably, eventually getting projected back.
Related topics
- Exploring AI Applications in Bitcoin's Mempool 0
- New Bitcoin Improvement Proposal with $100 Reward 9
- Clipboard Vulnerabilities in Cryptocurrency Transactions 8
- Understanding the Differences Between Traditional and Simplified Chinese Mnemonics 6
- Understanding Fees with Taproot Script Usage 3
- Can You Prune Bitcoin Core Data by Date Range? 4