Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

The range of ECC parameters N

JavaCard Applet Development Related Questions and Answers.
DaHuFa
Posts: 53
Joined: Mon Jun 04, 2018 5:07 am
Points :392
Contact:

The range of ECC parameters N

Post by DaHuFa » Mon Sep 17, 2018 6:14 am

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?

AlexLiu
Posts: 17
Joined: Thu Sep 22, 2016 4:52 am
Points :206
Contact:

Re: The range of ECC parameters N

Post by AlexLiu » Tue Sep 18, 2018 2:31 am

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.

DaHuFa
Posts: 53
Joined: Mon Jun 04, 2018 5:07 am
Points :392
Contact:

Re: The range of ECC parameters N

Post by DaHuFa » Tue Sep 18, 2018 4:26 am

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?

AlexLiu
Posts: 17
Joined: Thu Sep 22, 2016 4:52 am
Points :206
Contact:

Re: The range of ECC parameters N

Post by AlexLiu » Tue Sep 18, 2018 5:14 am

(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.

DaHuFa
Posts: 53
Joined: Mon Jun 04, 2018 5:07 am
Points :392
Contact:

Re: The range of ECC parameters N

Post by DaHuFa » Tue Sep 18, 2018 6:17 am

en, thank you very much~

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: Google [Bot] and 33 guests

JavaCard OS : Disclaimer