1. A method comprising: collecting timestamps of key-press and key-release events detected during keyboard entry of a phrase; calculating key dwell times from the key-press and key-release timestamps; calculating dwell tendency values corresponding to the key dwell times; and preparing a keystroke dynamics template from data including the dwell tendency values.