Simple asymmetric encryption, C++ implementation