Smart and Thinner Electronic Locks