How to apply elliptic curve point multiplication using matlab code or command ?

e.g I have elliptic curve points as [(0, 6) (6,14) (12, 3) (15, 4) (21,7) (0,25) (6,17) (12,28) (15,27) (21,24) (1,10) ( 7,13) (13,13) (16,5) (25,0) (1,21) ( 7,18) (13,18) (16,26) (3, 2) (11,13) (14, 2) (19,30) (3,29) (11,18) (14,29) (19, 1)] i want the result as first point is multiplied by 62 second point is multiplied by 63 and so on for all the points i.e [{62*(0,6) } {63*(6,14)} ......] note that this Multiplication should be elliptic curve point multiplication

2 Comments

To perform multiplication (as elliptic curve group) you need to provide elliptic curve equation. Also are you doing some modulo arithmetic?
y^2=x^3+x+5 mod 31 is an equation of an elliptic curve whose points are discussed above

Sign in to comment.

 Accepted Answer

A = [0, 6 ;6,14; 12, 3; 15, 4; 21,7; 0,25; 6,17; 12,28; 15,27; 21,24; 1,10; 7,13; 13,13; 16,5; 25,0; 1,21; 7,18; 13,18; 16,26; 3, 2; 11,13; 14, 2; 19,30; 3,29; 11,18; 14,29; 19, 1] ;
N = size(A,1) ;
P = 62:(62+(N-1)) ;
iwant = N.*A

4 Comments

I am generating numbers from 62 to the required and multiplying them to A. Simple.
is this elliptic curve point multiplication or simple matrix multiplication? which is defined in last step

Sign in to comment.

More Answers (1)

Take a step back and see what tools you have under the hand.
If you want to multiply the point P in EC by a integer number n, you can starts by adding the point n times. The smarter way is is take a binary representation of N, and start with
Q = P, S = "0"
and double Q iteratively for i=0,1,...ceil(log2(n))-1
Q = Q+Q (2*Q)
and cummulative add Q to S if the bit #i of n is 1.
Now how you add numbers in EC? I hope you already have such routine as you are working on EC.
Otherwise look at the formula for example in the section Elliptic Curves over Zp of this document
Note that the division must be performed in Zp, meaning using Euler division algorithm

2 Comments

ok I got it but my problem is to multiply elliptic curve points by scalars as in my question which is clearly explained i need a code to do all the work in Matlab would you please help me in this regard
I just outline you the steps. Feel free to tackle piece by piece and if you have question just ask. Each step is not difficult, just you have to make them correct and put them together.
There is little chance that I'll code the whole thing from scratch for you.

Sign in to comment.

Asked:

on 15 Oct 2018

Commented:

on 16 Oct 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!