Hello fellow cryptographers.
I have spent last few days trying to understand and find a way to generate secp256k1 private and public keys from scratch, but i failed.
I have seen tons of videos and read tons of pdfs about it but I still can't understand how to implement it even in pseudocode.
r = Random
k = PrivateKey (64bit hex string that should safely be generated from r and hashed)
K = PublicKey
G =
0479BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798483ADA7726A3C4655DA4FBF0E1108A8FD17B448A68554199C47D08FFB10D4B8
K = k * G
Now i know G has x,y and that 04 at the beginning means that its in uncompressed form. But i am confused with the way I should multiply k and G, since whenever I tried turning them into decimal values multiplying them and then encoding them into hex afterwards I would get wrong results.
Now lets say I have K(public key).
How would I go about encrypting an message, and then proving that I can decrypt it?
I really look forward to hearing your answers :D