adding privatekey secure validation