A Secret-Sharing-Based Method for Authentication