A method for securely communicating with a machine to machine, M2M, device comprising the steps of: sharing a secret or data derived from the secret between the M2M device and a server; establishing a connection between the M2M device and the server; using the shared secret or data derived from the shared secret to establish cryptographic material on both the M2M device and the server; and securing communication between the M2M device and the server with a cryptographic protocol using the established cryptographic material, wherein the cryptographic material is unrecoverable from the shared secret or data derived from the shared secret alone, wherein the step of using the shared secret or data derived from the shared secret to establish the cryptographic material further comprises the steps of: the M2M device generating or obtaining a public key and a corresponding private key and server generating or obtaining a public key and a corresponding private key; the M2M device authenticating the public key of the server using the shared secret or data derived from the shared secret; the server authenticating the public key of the M2M device using the shared secret or data derived from the shared secret; the M2M device deriving the cryptographic material from the public key of the server and the private key of the M2M device; and the server deriving the cryptographic material from the public key of the M2M device and the private key of the server. sharing a secret or data derived from the secret between the M2M device and a server; establishing a connection between the M2M device and the server; using the shared secret or data derived from the shared secret to establish cryptographic material on both the M2M device and the server; and securing communication between the M2M device and the server with a cryptographic protocol using the established cryptographic material, wherein the cryptographic material is unrecoverable from the shared secret or data derived from the shared secret alone, wherein the step of using the shared secret or data derived from the shared secret to establish the cryptographic material further comprises the steps of: the M2M device generating or obtaining a public key and a corresponding private key and server generating or obtaining a public key and a corresponding private key; the M2M device authenticating the public key of the server using the shared secret or data derived from the shared secret; the server authenticating the public key of the M2M device using the shared secret or data derived from the shared secret; the M2M device deriving the cryptographic material from the public key of the server and the private key of the M2M device; and the server deriving the cryptographic material from the public key of the M2M device and the private key of the server. securing communication between the M2M device and the server with a cryptographic protocol using the established cryptographic material, wherein the cryptographic material is unrecoverable from the shared secret or data derived from the shared secret alone, wherein the step of using the shared secret or data derived from the shared secret to establish the cryptographic material further comprises the steps of: the M2M device generating or obtaining a public key and a corresponding private key and server generating or obtaining a public key and a corresponding private key; the M2M device authenticating the public key of the server using the shared secret or data derived from the shared secret; the server authenticating the public key of the M2M device using the shared secret or data derived from the shared secret; the M2M device deriving the cryptographic material from the public key of the server and the private key of the M2M device; and the server deriving the cryptographic material from the public key of the M2M device and the private key of the server. the M2M device generating or obtaining a public key and a corresponding private key and server generating or obtaining a public key and a corresponding private key; the M2M device authenticating the public key of the server using the shared secret or data derived from the shared secret; the server authenticating the public key of the M2M device using the shared secret or data derived from the shared secret; the M2M device deriving the cryptographic material from the public key of the server and the private key of the M2M device; and the server deriving the cryptographic material from the public key of the M2M device and the private key of the server.