Implement SMP authentication

Closes #12.