An Analytical Framework for the Optimal Design and Detection of Covert Channel Communications