Validation for private key and test for it