Let's say I came up with a very special algorithm, one that would be very valuable to sell. If I distribute it as a binary executable file for something like Windows or Mac, then of course people can just look at the machine code to figure out what it's doing. I've been looking into using a microcontroller to keep an algorithm private. Let's say I have an algorithm as follows: It takes a 128-Bit number as input and gives a 128-Bit number as output. Now here's what I have in mind: I get my hands on a microcontroller that has either built-in USB or built-in Ethernet. I compile my algorithm for the microcontroller in question. I produce a device about the size of a matchbox and sell it, and the consumer plugs this device into their PC, perhaps into a USB port. The microcontroller will take input from the PC, run the algorithm and then give output to the PC. Has this been done before? (Try not to throw plates at me if it has) I've heard about the "code protect" feature of PIC chips. Does this feature prevent the program code from being read from the chip? Is it 100% secure? Lastly, how would you suggest I go about this: USB or Ethernet. Ethernet would be handy in that I could set it up as a webserver that takes input and then gives the output on a webpage. Another good thing about this is that it would be platform independent and would work on anything that has a web browser. USB would be attractive because it's what people are "used to" and it seems USB ports are more ubiquitous than Ethernet ports. Also I do away with a batter because I can take power from the USB port. How good is USB though when it comes to cross-platform development? -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist