1. Check out our companion app, Forums for Android! Download from Google Play

Encrypted SMS

Discussion in 'App Inventor' started by royalecraig, Feb 25, 2017.

  1. royalecraig

    royalecraig Member
    Thread Starter
    25

    Feb 22, 2017
    10
    0
    25
    I've created an App using Appinventor, it uses the Caesar shift cipher to encrypt SMS Messages.
    The app can be found here http://tinyurl.com/Ades-Apps

    Now I know the Caesar cipher is highly insecure as an encryption too, but as an exercise
    I want to improve what I've already produced, possibly by adding Vigenere options, up to
    One Time Pad functionality.

    The App so far will accept most characters and numbers and Caesar shift them up to 26 places.
    Currently, the Alphabet it uses is ABC...Z...012...9 etc.

    I could scramble up the Alphabet for example GXD...ZCJ but If I release that, then since every user
    will have the same Program, it won't make the cipher any more secure, because everyone is working with the same Alphabet.
    HOWEVER, if I give the user the option to scramble up the Alphabet programatically by entering a value, then each user will be working with a 'unique' alphabet.

    So the two users generate a 10 digit number.

    Next we must chop up our Alpabet programatically according to this number, so we introduce a For next loop of 1000.
    We take each digit and cut that number of characters from the front of the Alphabet and add it to the end.
    The same for the next digit.
    Eg, if the first digit is a 6, we take the first 6 digits of the Alphabet and add them to the end, if the next digit is a three, we take the first three digits of the alphabet and add them to the end.
    Do this for all the digits of the agreed number 1000 times until we have a scrambled alphabet.
    We can do this by creating a 10 ms counter running in App inventor and have the timer running.
    When the person presses a button, it fills in the first digit.
    When the button is pressed again, the next digit is generated.
    So on until we have a multidigit number eg, 643489760054
    The two can then agree on this, and they each slice and dice up their alphabet according to the above method.
    So now our two users have a virtually unique Alphabet.
    But again, such a system would be succeptible to frequency analysis, however, supposing, each new day, the current alphabet is shifted along 1 space, that means, day two, we have another unique alphabet.
    Providing not too many text messages were sent in the same day, then, frequency analysis would not work.
    In addition, we could carry out our own frequency analysis and always make sure our message has an even balance of letters of the alphabet, doubling up on less frequently used letters, for example 'exxercise' or 'zzzebra' we could also take out double letters from words, for example 'hello' would become 'helo'
    In addition, we can get the users to add in an extra word at the beginning of their Alphabet, eg 'Snowman' and then create the rest of the alphabet with the letters NoT in the Word 'SnowMan' in a way, Salting our Alphabet.

    While there are excellent encryption tools out there, it would be an interesting academic excercise to see where I can take the Caesar cipher, even if all of this has been done before.
     

    Advertisement

Share This Page

Loading...