Implemented GeneratePrivateKey