I have the task to write some crypto stuff in C and make it lightweight. The idea behind making it lightweight is, that it could run on a smartcard which doesn't offer much computational power and memory. It won't come to actually running it on a smartcard and it won't be for any practical use.
However, I'm curious if I could run the program on a smartcard without major adjustments. I'm aware that I'd probably have to change something in the IO-part but let's keep that aside. And by "smartcard" I mean a regular smartcard which could be afforded by the majority of private individuals and not some fancy stuff.
To restrict the question a little more: Could I run the program without modification if I only use 8-bit integers in my program and the architecture is >= 8-bit, aswell as stay below the memory limit? If no, why not?