I was designing a project that would encrypt a message using a stored key and transmit it, using Arduino Mega 2560's, nRF24L01's, and 4x4 keypads. I listed the steps the Arduinos would make:
.1. ARDUINO_01 OPENS RF WRITING PIPE
2. ARDUINO_02 BEGINS RF LISTENING
3. USER INPUTS MESSAGE IN HEX FORMAT TO ARDUINO_01
4. ARDUINO_01 DISPLAYS MESSAGE ON LCD SCREEN
5. ARDUINO_01 RANDOMLY SELECTS ONE FROM 50 PRESET KEYS
6. ARDUINO_01 ENCRYPTS WITH SELECTED KEY USING VIGNERE’S CIPHER
7. ARDUINO_01 APPENDS KEY SERIAL NUMBER TO ENCRYPTED MESSAGE
8. ARDUINO_01 WRITES MESSAGE OVER WRITING PIPE
9. ARDUINO_02 RECIEVES MESSAGE
10. ARDUINO_01 BEGINS RF LISTENING
11. ARDUINO_02 EXTRACTS SERIAL NUMBER OF KEY FROM MESSAGE
12. ARDUINO_02 PERFORMS REVERSE VIGNERE’S CIPHER ON MESSAGE USING KEY
13. ARDUINO_02 DISPLAYS DECRYPTED MESSAGE ON LCD
14. ARDUINO_02 OPENS RF WRITING PIPE
I'm unsure of how to approach two problems. How do I read characters in hex format from a keypad, and how do I pull the key number from the transmitted string?
Thank you very much, that was a very informative and well written post.
I've just realized that I don't need to use hex. I could just use decimal values and cast them to char.
The second issue remains though, but I might have a solution to that: I could just use delay(), wait for 1 second and then transmit the key separately.
What format do you envisage the transmitted string being in ?
Do you have control of the format and can you please post an example of what the data will look like ? Will the number always be the same length and in the same place in the string ?