methods of securing a cryptographic device against implementation attacks , are described . a disclosed method comprises the steps of obtaining a key from memory of the cryptographic device ; providing the key and a constant input to an encryption module ; deriving an output of encrypted data bits using the encryption module ; providing the output , the key and an input vector to a key update module ; and using said key update module to modify the key based on at least a part of the input vector to derive an updated key . this prevents the value of the key from being derived using the updated key or by using side - channel attacks because the input is constant for all keys . additionally , by altering the input vector , the updated key is also altered .