The range of ECC parameters N
The range of ECC parameters N
ECC algorithm has five parameters: A, B, P, N, and G. I want to know the range of N.
According to the range of private key(private key must be in [1, n-1]), n must be bigger than 1. So, Is I right?
According to the range of private key(private key must be in [1, n-1]), n must be bigger than 1. So, Is I right?
Re: The range of ECC parameters N
About parameter n, you need to know:
(1) n is the order of base point G, it means n*G = o;
(2) n is a prime factor of #E(Fq); #E(Fq) is the order of elliptic curve, it means the total number points on the curve.
(3) h = #E(Fq)/n,h is the cofactor, at most case, h equals to one. So, usually, n is the total number points on the curve, so n must enough large.
(4) for elliptic curve on Fp, n > 4p^(1/2) is needed.
(1) n is the order of base point G, it means n*G = o;
(2) n is a prime factor of #E(Fq); #E(Fq) is the order of elliptic curve, it means the total number points on the curve.
(3) h = #E(Fq)/n,h is the cofactor, at most case, h equals to one. So, usually, n is the total number points on the curve, so n must enough large.
(4) for elliptic curve on Fp, n > 4p^(1/2) is needed.
Re: The range of ECC parameters N
Thanks for your answer!
Now, I have a new problem.
For the 192 bits test, the parameters are:
P = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
A = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC};
B = {0x64, 0x21, 0x05, 0x19, 0xE5, 0x9C, 0x80, 0xE7, 0x0F, 0xA7, 0xE9, 0xAB, 0x72, 0x24, 0x30, 0x49, 0xFE, 0xB8, 0xDE, 0xEC, 0xC1, 0x46, 0xB9, xB1};
N = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
G = {0x18, 0x8D, 0xA8, 0x0E, 0xB0, 0x30, 0x90, 0xF6, 0x7C, 0xBF, 0x20, 0xEB, 0x43, 0xA1, 0x88, 0x00, 0xF4, 0xFF, 0x0A, 0xFD, 0x82, 0xFF, 0x10, 0x12, 0x07, 0x19, 0x2B, 0x95, 0xFF, 0xC8, 0xDA, 0x78, 0x63, 0x10, 0x11, 0xED, 0x6B, 0x24, 0xCD, 0xD5, 0x73, 0xF9, 0x77, 0xA1, 0x1E, 0x79, 0x48, 0x11};
The N is invalid, but my API cannot find out the error. Which calculate can help me to confirm that the N is invalid?
Now, I have a new problem.
For the 192 bits test, the parameters are:
P = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
A = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC};
B = {0x64, 0x21, 0x05, 0x19, 0xE5, 0x9C, 0x80, 0xE7, 0x0F, 0xA7, 0xE9, 0xAB, 0x72, 0x24, 0x30, 0x49, 0xFE, 0xB8, 0xDE, 0xEC, 0xC1, 0x46, 0xB9, xB1};
N = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
G = {0x18, 0x8D, 0xA8, 0x0E, 0xB0, 0x30, 0x90, 0xF6, 0x7C, 0xBF, 0x20, 0xEB, 0x43, 0xA1, 0x88, 0x00, 0xF4, 0xFF, 0x0A, 0xFD, 0x82, 0xFF, 0x10, 0x12, 0x07, 0x19, 0x2B, 0x95, 0xFF, 0xC8, 0xDA, 0x78, 0x63, 0x10, 0x11, 0xED, 0x6B, 0x24, 0xCD, 0xD5, 0x73, 0xF9, 0x77, 0xA1, 0x1E, 0x79, 0x48, 0x11};
The N is invalid, but my API cannot find out the error. Which calculate can help me to confirm that the N is invalid?
Re: The range of ECC parameters N
(1) verify if n is a prime, if not, then invalid;
(2) check if n satisify the equation: h*n*G = o;
if verify h*n*G = o is not easy, you can verify h*(n-1)*G = -G. here, usually h = 1, so the equation becomes: (n-1)*G = -G, the left of the equation, is
a kG computation; about the right side, if G = (x, y), then -G = (x, -y), so next you know how to compare the left and the right.
(2) check if n satisify the equation: h*n*G = o;
if verify h*n*G = o is not easy, you can verify h*(n-1)*G = -G. here, usually h = 1, so the equation becomes: (n-1)*G = -G, the left of the equation, is
a kG computation; about the right side, if G = (x, y), then -G = (x, -y), so next you know how to compare the left and the right.
Re: The range of ECC parameters N
en, thank you very much~
Who is online
Users browsing this forum: Google [Bot] and 39 guests