So I’ve been messing around with this program that generates public keys from private ones using elliptic curve stuff. It seems like the private keys I’m using can either be positive or negative, and depending on that, the public keys come out compressed or uncompressed. Anyone else played with this?
Just a heads up, but there’s no such thing as a negative public key. The math behind elliptic curves means if you could extract any info about a private key from a public one, the whole system would be compromised. It’s really not how ECC works.
Yeah totally, I’m not trying to crack private keys here. I’m just looking for a way to tell if the public key is positive or negative based on the private key.
1. Negative public keys don’t exist. 2. The bits of the private key and public key are unrelated. If they were, we’d have a huge problem with ECC security. Your code has some serious misconceptions.
If your program knows the private key, then yeah, the public key it spits out will be accurate. But if you’re getting errors, I’d guess there’s a problem with how you’re checking the private key.
You keep insisting your code is flawless when it’s already been pointed out that it’s not. Like, why ask for help if you think you’re right? Public keys for private keys -1 and N-1 look the same, yet your program can’t handle that correctly.
1. Public keys have both positive and negative components. 2. Technically, it’s possible to track private keys through complex math, but it’s way too hard. 3. If someone could reliably tell the sign of a public key, they’d probably crack private keys super quick. But no one’s found a way to do that yet.
So the goal of my program is to see if I can narrow down private key values by checking if subtracting a private key from a public key gives a positive or negative result.
You can’t really subtract a private key from a public key. They’re different types of numbers. And remember, private keys are always positive integers.
Look at it this way: think of ECC like a clock. Subtracting doesn’t lead to negatives, just keeps it within a set range. That’s the idea behind modular arithmetic.
1. Private keys are positive integers within a specific range. 2. Public keys come from elliptic curve math, represented as points with x and y coordinates. These coordinates can be positive or negative.
I’m not saying coordinates can’t have positive or negative values; I just mean there’s no direct order between public and private keys. They’re just points on a curve.
This kind of thinking usually tries to link public keys with private keys based on their evenness or oddness, but it’s flawed. Try generating a bunch of keys and see if you can find any correlation; I doubt you will.