• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

Help with ECDSA

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Cryptographic Theory and Cryptanalysis - Internal and Transmission Security

View previous topic :: View next topic  
Author Message
Maxhavoc
Just Arrived
Just Arrived


Joined: 10 Feb 2006
Posts: 0


Offline

PostPosted: Fri Feb 10, 2006 7:41 pm    Post subject: Help with ECDSA Reply with quote

Hi, I know next to nothing about the mathematical aspects of ECDSA, this kind of stuff is way beyond me, yet at my job, I'm tasked with a certain problem. I am given a set of inputs to an ECDSA signature verification function. I know that one of the paramters that I need is a point on the curve, but I am given the point as a seperate X and Y value, how do I combine that to make a single point? I'm using K-163 as the key size. So the length of the point should be 21 bytes. I am given two 22 byte values (extra byte due to a leading '0' and so not important). Can I just XOR the two values?
Back to top
View user's profile Send private message
data
Forum Fanatic
Forum Fanatic


Joined: 08 May 2004
Posts: 16777211
Location: India

Offline

PostPosted: Sat Feb 11, 2006 8:39 am    Post subject: Reply with quote

hi,

(x,y) is one point,where x is the x-coordinate and y is the y-coordinate. Quoting from an older post

Quote:

Here is the ECDSA



ECDSA setup
---------------------

1. E is an elliptic curve defined over the field Fq.
2. P is a point of prime order n in E(Fq).
3. The group used is {0,P,2P,...,(n-1)P}.


ECDSA Key Generation
------------------------------------

1. Select a statistically unique and unpredictable integer 'd' in the interval [1, n-1].

2. Compute Q=dP.
3. The private key is d.
4. The public key is Q.

ECDSA Signature Generation
---------------------------------------------

1. Select a statistically unique and unpredictable integer 'k' in the interval [1, n-1].

2. Compute kP = (x1,y1).
3. Compute r = x1 mod n.
4. Compute e = H(M) . i.e. SHA-1 of the Message.
5. Compute s = k(inverse)* (e+dr) mod n.
6. The signature for M is (r,s).

ECDSA Signature Verification
----------------------------------------------

1. Compute e=H(M).
2. Compute S(inverse) mod n.
3. Compute u1 = e*s(inverse) mod n.
4. Compute u2 = r*s(inverse) mod n.
5. Compute (u1*P) + (u2*q) = (x1,y1).
6. Compute v = x1 mod n.
7. Accept the signature if v = r.

Also have a look at this article.That should help understand how we 'combine' x and y.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Amitabh
Just Arrived
Just Arrived


Joined: 24 Aug 2004
Posts: 0
Location: Australia

Offline

PostPosted: Mon Feb 13, 2006 10:54 am    Post subject: Reply with quote

I haven't read ECDSA in detail.. but the general idea is given x-coordinate of a point on elliptic curves, we can compute the y coordinate so you should use only one of the values..
Back to top
View user's profile Send private message Visit poster's website
data
Forum Fanatic
Forum Fanatic


Joined: 08 May 2004
Posts: 16777211
Location: India

Offline

PostPosted: Tue Feb 14, 2006 10:39 am    Post subject: Reply with quote

hi,

Actually two. (x, +y) and (x,-y) when all the roots of the elliptic curve are real(usual case).
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Amitabh
Just Arrived
Just Arrived


Joined: 24 Aug 2004
Posts: 0
Location: Australia

Offline

PostPosted: Wed Feb 15, 2006 7:12 am    Post subject: Reply with quote

I agree, but in most instances it will be easy to decide which is the correct y coordinate..
Back to top
View user's profile Send private message Visit poster's website
data
Forum Fanatic
Forum Fanatic


Joined: 08 May 2004
Posts: 16777211
Location: India

Offline

PostPosted: Wed Feb 15, 2006 5:21 pm    Post subject: Reply with quote

may i ask how?
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Amitabh
Just Arrived
Just Arrived


Joined: 24 Aug 2004
Posts: 0
Location: Australia

Offline

PostPosted: Thu Feb 16, 2006 2:03 am    Post subject: Reply with quote

by trial and error.. only the correct point will satisfy the addition formula
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Cryptographic Theory and Cryptanalysis - Internal and Transmission Security All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register