Accountability in smart grid and medical sensor network