Security: Encoding a string from RF transmission
4ish
Posts: 24
Hey guys,
I am trying to transmit a string from point A to B using the RF transmitter/receiver from parallax. The message sent from A is authenticated by B and an action takes place. My question is how can I encode this string and decode it on the other side so that any external devices listening cannot read the contents of the message and duplicate it to pose as device A. I could think of ways to do this had the communication been bidirectional, but since my communication is unidirectional, I cannot think of any algorithms.
Does anyone know a way of doing this? Either using software or hardware?
Thanks a lot, much appreciated.
I am trying to transmit a string from point A to B using the RF transmitter/receiver from parallax. The message sent from A is authenticated by B and an action takes place. My question is how can I encode this string and decode it on the other side so that any external devices listening cannot read the contents of the message and duplicate it to pose as device A. I could think of ways to do this had the communication been bidirectional, but since my communication is unidirectional, I cannot think of any algorithms.
Does anyone know a way of doing this? Either using software or hardware?
Thanks a lot, much appreciated.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Of course over time someone could figure out the checksum scheme.
Maybe you could have multiple checksum schemes and part of the message would be what scheme to use next. This would make it much harder to figure out. But you'll have to make sure to receive every transmission, or you'll be hosed.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
Available now... SX-Video OSD module $59.95 www.sxvm.com
Those that would give up freedom for security will have neither.
·
As to how secure it needs to be. Well it is pretty easy to have a 3rd party listening in on the communication. I need it to be secure enough so that if someone reads the information being transmitted and builds their own device to transmit the same information, it will not be authenticated. Basically I want the reader to be able to detect that not only the correct information is coming in, but also from the acceptable user.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
Available now... SX-Video OSD module $59.95 www.sxvm.com
Those that would give up freedom for security will have neither.
Post Edited (Bean (Hitt Consulting)) : 11/7/2005 10:15:14 PM GMT
also do you guys know if the parallax rf antennas can work with these IC encoder/decoders? like connect from the stamp to an IC and then from the IC to the antenna?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
Available now... SX-Video OSD module $59.95 www.sxvm.com
Those that would give up freedom for security will have neither.
·
The other thing you could do is have the receiver only respond if two strings were received at some predetermined interval which could be encoded in the strings themselves.
At some point, the cost of making your link bidirectional will look attractive!
I recommend you do as Paul suggests, make a software PN sequence generator and use it as a scrambler. Prepend your desired message with some sync character(s) (unscrambled) and a 16 bit incrementing message serial number.
Write a sufficiently secure PN generator (should be less than 2 dozen lines of code); 10 bits will give 1024 states before repeat, whereas 16 bits will give 65536 states. Or you pick another length to get the security desired; 8 bits doesn't really cut it.
Prepend your data packet with the sync(s), then seamlessly transmit the packet serial number XORed with the scrambler's PN code, and append that seamlessly with the desired message also XORed with the scrambler code.
Anyone listening in will observe the fixed sync character(s), but wil have a REALLY hard time making any sense out of the data due to the scrambling.
The serial numbers help the receiver knowing if any data was lost, and also help with the synchronization process and continually altering the message content.
If you are really clever, you can alter the scrambler PN code sequence according to some other (PN also?) algorithm. The result I think would be REALLY hard to break, especially if the PN sequences are long.
This is a somewhat complicated sublect, but a lot of fun to work with.
Cheers,
Peter (pjv)
Post Edited (pjv) : 11/7/2005 11:14:16 PM GMT
As you can see from the wealth of different responses, there are many different ways of attacking this problem. Without knowing what your intended application is, only you can know how critical this criteria is, and therefore how secure of encryption you'll need.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
No, it's a max sequence PN generator I wrote myself; pretty simple really.
I use it for generating PN sequences for Direct Sequence Spread Spectrum radios I'm designing (I hate the frequency hopping types).
Cheers,
Peter
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
My feeling regarding proprietary nature is that I would care to be somewhat secretive, as the techniques I develop are for commercial gain. That said, I have no problems with others using them for non-commercial applications.
Most of the stuff I do is generally quite straight forward; if I can figure it out...... so can anyone else.
If you are interested in this subject for non-commercial applications, I'd be happy to share my knowlede with you; send me a PM, and I'll dig out the old code as well as give you the salient points.
Cheers,
Peter (pjv)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Because this subject has been brought up, I thought I would dig out my old code; it's even shorter than I remember.
A 4 tap maximal length 8 bit PN sequence can be generated in as few as 12 lines of code; a 16 bit in 13 lines; a 24 bit in 14 lines; and a 32 bit in 15 lines.
Those also represent the number of cycles executed per calculation; so at 50 MHz, and allowing for a little overhead, a PN (scrambling) sequence of some 2+ MHz could be generated.
Clearly, the PN sequences are selected to be the fastest (4 taps) to calculate (fewest feeback taps), and hence not all seeds can be accommodated with so little code; each additional feedback tap adds 2 instructions, still not bad.
Paul, from these hints I'm sure you can figure it out!
Cheers,
Peter (pjv)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Note that you don't actually have to keep the list of numbers, just save the RN seed.· Advance the PN generator and try to validate the transmission.· Repeat until validated or max number of tries is reached.· If there is no match, then reset the seed to the saved value.