Amaury, The idea I had was to use a public/private key system to ensure assymetric operation. The difference however is that the PIC device will never store any key. It will however, request a public key from the host computer that it will use to encrypt the data with. The host computer will however, give a new random public key every time, and the private key for that session only will be stored in the host computer's memory, until the session has ended. One session should not last more than 2 seconds. Only enough time for the PIC circuit to send 256 bytes of data at a time (including overheads). The problem with a permanent public key programmed on the PIC device, is the ability to "rip" the protected code and/or eeprom memory on some PIC devices. Even though Microchip confirms that this is no longer possible, I'm still a bit sceptical. Another issue is the limited functionality of the 16F84, which I'm targetting for the circuit. Even on a bit a higher MCU, like the 16F877, for instance, I cannot see myself performing the kind of math required by the RSA cipher, where 128-bit encryption is, according to me, the bare minimum. I have considered going as low as 32-bit encryption, using hashing to further encode the data, but 2^32^32 math is a bit complex for normal PICs. Jinx recommended a cipher known as TEA, which I'm busy looking into (thanks, Jinx). Thanks for the advise anyway. Cheers Werner WernerS@fsl.gov.za ----- Original Message ----- From: "Amaury Jacquot" To: Sent: Monday, May 13, 2002 2:50 PM Subject: Re: [PIC]: Data Encryption Using PIC16F84 > Quoting Mike Singer : > > > > > > >Hi everyone. > > > > > >I'm trying the impossible. I want to design a circuit using > > >a PIC16F84 that transmits data to a computer. I want > > >this data to be encrypted, however. I've been looking > > >into using RSA encryption (as low as 32-bit), > > . > > . > > . > > >Does anyone have any better idea of an encryption/decryption > > >method to use? The basic idea is just to be able to transmit > > >data without anybody tapping into the physical wire being able > > >to see what's being transmitted. > > > > > >Thanks! > > >Regards, > > >Werner Soekoe WernerS@fsl.gov.za > > > > Yes, the best way to keep your home secrets is to start asking > > every human on the planet how you should keep them, sending > > everywhere the return address. > > Create your own simple and unique method based on real time > > clock for example. All this 007-agents will get crazy solving it, > > thinking you are using new super-dooper-brand_american-algorithm. > > On the contrary, this is the proper way to do this, opposing this to the > myriad of el-cheapo-file-encryption-tools that you can find everywhere > on shareware sites. > > I personnaly have done this kind of thing using DES as the encryption on > "Silver card II" devices (16F877 controllers + 24LC64 eeprom). > The trick to the system is that the program runs 2 modes. > The first mode is the "personnalise" procedure. This is the mode the card > comes in the first time after it is programmed. This mode allows for several > things to be set, such as the card's internal encryption key, stored in the > pic's internal eeprom. > The personalisation is started by a specific iso instruction which starts the > key generation procedure. > This procedure basicly takes a shitload of bytes sent by the host and generates > a key via some xor. > the bytes are generated from the system random generator > > Then all data that is stored in the card is encrypted with the key via DES > before being written to the eeprom > > Sincerely > > Amaury > > -- > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics