defined structure to write server and client side secure layers