Implementing security features at a particular protocol layer