I created a gist of basic implementation, in Python. Here it is: https://gist.github.com/viewplatgh/cb690159e8ee028cb4c9483cb127e6c3

Asymmetric encryption use a pair of public & private key to do the crypto job. Private key is the one being used to encrypt (sign) data. Public key is the one to verify if the signed data is made from the true owner of the private key. This brilliant technology basically keeps the whole Internet running under the order.