SmartK: Smart Cards in Operating Systems at Kernel Level