added public key creation and test