Arduino and Cryptography

Hello, I am trying to implement Arduino into a Cryptography Course project. I am fairly new to both Arduino and Cryptography. Although it is not my first time in using Arduino. I would like the Arduino to play the role of a hardware security module. Where upon a trigger from a sensor, it would pull this specified file and encrypt it. From what I know the Arduino Due is capable ofhold a twofish encryption or something that does not need much requirements. Any adivce on how to implement or how to start off will be much appreciated.

I think the “hard part” is reading a file/data into the Arduino and back out. (I’m not the one who can help you with that.)

As the bytes “pass through” the Arduino, you should be able to run any encription/decryption algorithm of your choice in C/C++. The Arduino has limited memory, so you won’t be able to read-in the whole file before encrypting, but I assume most encryption algorithims don’t require that.

GuruShiva: Where upon a trigger from a sensor, it would pull this specified file and encrypt it

How is the file specified? How does it 'pull' the specified file? And what does it do with it after it has encrypted it?

Sorry for the late reply!. Was away for sometime. I meant to read in certain data. I am trying to implement a hardware security module using Arduino. So any guidance will be great. Much appreciated.