Do validation in pubkey::from_slice