A novel security-centric framework for D2D connectivity based on spatial and social proximity