Added secret generation and verification routines.

Secrets are now of the form [random_data][digest_of_random_data]. The
whole idea behind this is to make verification faster, easier and more
intuitive.