Text this: Comparative study of power analysis attacks based on template and KNN algorithm