Shop OBEX P1 Docs P2 Docs Learn Events
XOR cipher - Page 2 — Parallax Forums

XOR cipher

2»

Comments

  • TimmooreTimmoore Posts: 1,031
    edited 2008-08-03 06:24
    A better method though still not considered crypto-strength would be to take the md5 object from the POE. Lookup how to do HMAC-MD5 (its specfied in an ietf rfc) - its 2 calls to MD5 with some extra processing. For input take the key and concaternate a string and a unique number - the number can be a number that is incremented for every use, just make it a large number so it doesn't repeat e.g. a 48bit number. HMAC-MD5 will output 128bits. For each 128bit of the message to be encrypted, run this to generate 128bits, with a different (incremented) number . Then xor the plaintext and the generated bitstring. Send to the otherside the encrypted text + the first number. The receiver can re-generate the plaintext as long as the shared secret key is known.
    Theres 1 other thing, how much of a problem is it if the message is changed? An attacker can change the message inside the encryption without decrypting it. And dont expect the GPS checksum to protect the message, that can be fixed within the xor.
  • Sniper KingSniper King Posts: 221
    edited 2008-08-03 06:36
    I am not sending an NMEA string out.· This is a preformatted string.· Here is an example

    <*ek7GQ20K*31.12345*-110.12345*>

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·- Was it pin 11 or 26?· Hmmm....··I think the smell of smoke tells the whole story.· Must be 26.



    Michael King
    Application Engineer
    R&D
    Digital Technology Group
  • TimmooreTimmoore Posts: 1,031
    edited 2008-08-03 07:33
    How big a problem is it if someone changes it? Your current scheme has no check for changes.
  • Sniper KingSniper King Posts: 221
    edited 2008-08-03 17:05
    How do you mean changes it?· do you mean that someone intercepts the data and resends it with some random characters in the string?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·- Was it pin 11 or 26?· Hmmm....··I think the smell of smoke tells the whole story.· Must be 26.



    Michael King
    Application Engineer
    R&D
    Digital Technology Group
  • TimmooreTimmoore Posts: 1,031
    edited 2008-08-03 17:15
    yes or intercepts from several transmittors and sends the data as if from each other, or changes 1 bit in the location (since its a fixed location). If its random data its easy to spot at the receiver but flipping 1 bit in the less significant places of the location or swapping transmitters location is hard to spot. (swapping you can fix by using different keys). Another attack is what happens if I record the transmitted location and replay it back later, I dont see anything to stop replay attacks.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-03 17:20
    The whole point of the replies to your original question is that there are basically two levels to cryptography. One, where you're protecting data against an unsophisticated thief where any kind of non-trivial encryption would discourage them. Two, where you're up against professional cryptographers and there's great value to decoding the information. In this case, everything you've brought up would be straightforward to break. It might take some time and some sophisticated equipment, but much less than you think.
  • VIRANDVIRAND Posts: 656
    edited 2008-08-03 20:53
    Like I said before, if you use codes then everyone wants to know your secrets.

    If you want any privacy at all,
    NEVER BRING A LAPTOP ON A PLANE!!!
    (That is an outrageous and constitutionally illegal search and seizure policy and we should all do something about it!)
  • DroneDrone Posts: 433
    edited 2008-08-04 06:54
    Phildapill said...

    This whole thread worries me, since lives could be at stake

    I agree Phil... Plus, if there was ever an application needing strong Intellectual Property (IP) protection on-chip, this is probably it. Unfortunately Propeller doesn't have any IP protection.


    David
  • Sniper KingSniper King Posts: 221
    edited 2008-08-04 19:28
    Here are the 20 strings I promised. Though this may be easy to crack for the NSA, I am confident that our mutual enemy will have some problems with this. I am not doing this as a response to a challenge, it was said that if it is going to be cracked then it should be done here and I agree.

    Hint section:
    1. This string is similar to the message shown in a previous thread.

    Good luck.


    E1 BE 50 E2 45 EF 11 48 B1 88 13 DE C4 84 99 CB 19 52 D4 13 B6 98 45 D7 AA F0 90 54 C6 2 A5 5 22 2

    F4 6E F4 36 12 D3 FB 63 14 6D AF 95 75 E2 B3 38 D F6 C8 BB 7 44 84 8 44 D7 C4 70 2 E2 26 B1 1D 2F

    66 DB 7E B6 F7 43 CD C5 FB 9D 59 D1 12 B5 1A F8 8A 4 F6 83 FB B7 2E F9 72 1A B6 2F 54 A6 9 48 33 E

    29 54 C3 35 D1 82 8 E3 B5 47 E 4F AC 8C 57 C0 97 20 EB EA 92 A8 DB 25 5B E7 1A BB A4 58 E0 C9 1B 11

    C2 4 1C 3D FC A8 9C 17 5D CC 41 BF 9 83 D4 A6 38 E7 3A 82 7A 48 AE 87 17 E0 C3 A1 94 D0 10 5C 14 2

    C1 3 1B 3C FB A7 9B 16 5C CB 40 BE 8 82 D3 A5 37 E6 39 81 79 47 AD 86 16 DF C2 A0 93 CF F 5B 14 1

    45 AD B9 2 79 3D B2 33 CB 14 94 DF B6 3A EF 4E A8 70 51 C6 A7 19 ED D2 91 A6 D8 26 5F E1 20 B6 17 F

    E6 28 40 61 22 CC C0 3B 81 F0 65 E3 2D A7 F8 CA 5C D 5E A6 9E 6C D2 AB 3B 6 E7 C5 B8 F4 34 80 14 26

    3A 35 50 2F 14 92 BD B7 4B E5 74 7D D8 3B 71 C 57 A1 7B DA A 2F 51 95 15 60 F8 41 D7 14 F8 77 5 3C

    51 15 5E B3 33 48 DF 9C 21 F4 F1 B7 AF ED 2D 6E EC 27 C4 A5 77 EC CF 9 AA 68 DA 1E D5 20 C 89 24 18

    5D DE DC FD 3 35 B9 13 CA 1D 3 8B 2 4 7D 3 BA 34 FD 6F 1F BA 32 51 92 F1 45 DE 2B 73 2F 99 38 F

    86 5 A7 E1 9C C8 3E 1C 1A 95 15 D4 49 20 A4 38 D2 4F 70 B0 29 5E F6 41 A8 64 AF FB 1F 3A 6C F0 3D 29

    6B B 96 93 77 28 EE 26 49 8D 8 59 F2 4B D1 6 D8 64 19 5A BA 97 79 E0 CE 3D 12 F3 CB C6 6 4D 13 33

    62 CA D6 1F 96 5A CF 50 E8 31 B1 FC D3 57 E 6B C5 8D 6E E3 C4 36 C EF AE C3 F5 43 7C FE 3D D3 17 2C

    B7 19 95 80 90 9C 7 F3 AC 24 F3 7B E B6 25 42 A0 E9 33 D8 7 62 3D 86 D1 F3 18 5C CF 22 A6 A 1 2

    59 CE 71 A9 EA 36 C0 B8 EE 90 4C C4 5 A8 D EB 7D F5 E9 76 EE AA 21 EC 65 D A9 22 47 99 FA 3B 33 1

    5 42 CB 2D 33 61 4 E4 8 2B 57 DE 38 B4 1B B1 E4 B6 44 11 34 AF 78 5B C7 98 1D F0 DB AD A0 D9 12 14

    44 BF E2 E1 85 D0 91 D5 A1 7E F1 C0 44 FB FC D8 CF B 4B 88 6 44 E2 D1 96 10 EE 28 C2 8E 16 45 20 3A

    D6 1D 3E E5 84 ED E 52 E6 C4 6 9E 5F ED 13 CA 1D FB 89 F9 1 7D 2 B7 4E F9 87 1D BD 36 67 A2 31 F

    1A AC C2 E0 96 D3 47 43 DF 58 8F D5 1B 61 6 51 99 75 B8 4 26 4C 8F 2 72 F6 3B D3 10 DA 66 28 6 37

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·- Was it pin 11 or 26?· Hmmm....··I think the smell of smoke tells the whole story.· Must be 26.



    Michael King
    Application Engineer
    R&D
    Digital Technology Group

    Post Edited (Sniper King) : 8/4/2008 7:39:53 PM GMT
Sign In or Register to comment.