refactoring - KeyHelper::createPublicKey