Using Wireshark, I found these data exchanged with google.com over TLS:
- Client Hello
- possible cipher suites and possible curve types (eg. secp256r1) sent
- Server Hello
- cipher suite selected
- RSA certificate signatures exchanged, etc. (hopefully, not important for me)
- Client Key Exchange, Change Cipher Spec, Hello Request
- ECDHE pubkey sent to server
- New Session Ticket, Change Cipher Spec, Hello Request, Application Data
- session ticket received, etc. (hopefully, not important for me)
Ok, and now my question: What I learned, I need curve equation, random point on it and the finite field size (for modulo operation) in order to apply ECC.
The only thing I found was the pubkey of size 520 bits, which should represent:
- 1st 8 bits - base 16 prefix
- next 256 bits - X coordinate of the "random point"
- last 256 bits - Y coordinate of the "random point"
Ok, I have the point, but what about the curve equation and the field size?
Does the curve secp256r1 define only one specific curve? (I suppose not, so where/how is it defined?)
What is and where to find the size of the field? (Or is there only one size for given standard? ...don't think so.)
Thank you for Your answer.
PS: This is how I understood the topic, if I'm wrong, please, correct me. :)