Elliptic curve cryptographic protocols: a simulation and implementation of ECDSA and ECDH