An electronic apparatus comprising: a first memory; a second memory configured to store encryption information; an encryption and decryption unit configured to encrypt the data, based on the encryption information; and a processor configured to: initialize address information, receive a write request which requests first data to be written on the first memory, and control the encrypted data to be written to the write location on the first memory, wherein the second memory further configured to: generate the encryption information including the initialized address information indicating a write location of data on the first memory and a parameter for encrypting the data, in response to the processor receiving the write request, search for encryption information corresponding to the write request, and the second memory is further configured to, when it is determined that there is encryption information corresponding to the write request, update the encryption information based on a result of the comparison between the initialized address information and address information corresponding to the write request. a first memory; a second memory configured to store encryption information; an encryption and decryption unit configured to encrypt the data, based on the encryption information; and a processor configured to: initialize address information, receive a write request which requests first data to be written on the first memory, and control the encrypted data to be written to the write location on the first memory, wherein the second memory further configured to: generate the encryption information including the initialized address information indicating a write location of data on the first memory and a parameter for encrypting the data, in response to the processor receiving the write request, search for encryption information corresponding to the write request, and the second memory is further configured to, when it is determined that there is encryption information corresponding to the write request, update the encryption information based on a result of the comparison between the initialized address information and address information corresponding to the write request. initialize address information, receive a write request which requests first data to be written on the first memory, and control the encrypted data to be written to the write location on the first memory, wherein the second memory further configured to: generate the encryption information including the initialized address information indicating a write location of data on the first memory and a parameter for encrypting the data, in response to the processor receiving the write request, search for encryption information corresponding to the write request, and the second memory is further configured to, when it is determined that there is encryption information corresponding to the write request, update the encryption information based on a result of the comparison between the initialized address information and address information corresponding to the write request. generate the encryption information including the initialized address information indicating a write location of data on the first memory and a parameter for encrypting the data, in response to the processor receiving the write request, search for encryption information corresponding to the write request, and the second memory is further configured to, when it is determined that there is encryption information corresponding to the write request, update the encryption information based on a result of the comparison between the initialized address information and address information corresponding to the write request.