added validation of Private and user key