Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

encryption and decryption

Status
Not open for further replies.

11max11

New Member
hihi...
can i ask for encryption and decryption information??

because i don't how to start..
is that start from eeprom?

i using the mplab ide.
 
Last edited:
Your question is far too vague to give any meaningful answer to, what do you actually want to know?.

Two of my tutorials (IR and Wireless) meet that requirement, but I've no idea if that's what you want?.
 
Try this link for a start.

**broken link removed**

More sample code here..

**broken link removed**
 
hihi
the first one is useful for me but the second website is using the C++...

but anywhere really thx for mramos1....
 
You might want to look at PGP - Pretty Good Privacy for some idea of how encryption and decryption works

PGP was based on RSA (Rivest-Shamir-Adelman)

It involves the prime factors of very large numbers, and the ability to do arithmetic with an essentially unlimited number of digits.
 
The first link is decryption. If you reverse the logic you have the encryption side. How encrypted do you need it? What level of person will be tring to unlock the data.
 
Well, simplest would be something like setting bit 7 of each byte. Next would come xoring each byte with 0x55. If you wanted to, you could swap some bits around - say swap bits 5 and 2. Then there would be using a pseudo random number generator to produce numbers that you xor each byte with.

The list is endless.

Some more information on the data being encrypted would help.

Mike.
 
I guess factoring a 100 digit prime number will be a bit beyond a PIC's and your capabilities for the moment.

You could also use a table lookup. For each plain text letter lookup a code letter. The invers table is also easy to construct. For each codetext letter lookup the plaintext letter.
 
Papabravo said:
I guess factoring a 100 digit prime number will be a bit beyond a PIC's and your capabilities for the moment.

You could also use a table lookup. For each plain text letter lookup a code letter. The invers table is also easy to construct. For each codetext letter lookup the plaintext letter.

I thought that the whole point is that you don't have to factorise. You simply divide the public key by your private key to get the new key.

BTW, I can factorise any 100 digit prime number with a Pic.:D :D In fact, I can do it in my head.

Mike.
 
Actually one simple encryption method, which is also very secure, is the use of a 'one time pad'.

Just create and store a random key of bytes equal to the length of the message you wish to send. Give the receiver the random key in advance of sending the message. Exclusive OR the message and the pad and send the encrypted message. The receiver then does an exclusive OR with the encrypted message with his copy of the key and the original message will be recreated.

Use the key only once and the message is uncrackable without access to the key used, now or forever in the future, regardless of Moore's law. ;)

Lefty
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top