add argument validation in high level crypto