Archived:Creating SMS encoder using PySymbian
This article shows how to encrypt an SMS message using a Rail Fence Cipher and then send it. This is the companion article to Archived:Creating SMS decoder using PySymbian, which explains how to decode the message.
Rail Fence Cipher
This is very old cipher and now a days practically it is not used anywhere but Here it is used just to show the use of cryptography with Python.
The Rail Fence Cipher involves writing messages so that alternate letters are written on separate upper and lower lines. The sequence of letters on the upper line is then followed by the sequence on the lower line, to create the final encrypted message.The security of the cipher can be improved by choosing more than two lines to encrypt your message with.
For example if you want to send the message - "Meet me urgently" than this message will be coded as shown here
M . e . . e . u . g . n . l . . e . t . m . . r . e . t . y
As shown above the message is written on the two separate line by writing alternate character on different line and than this two lines are combined to create a final encrypted message as
Me eugnletm rety
The name of this cipher is given from the way the message is written here. It is written like a fence on the rail platform hence the name of this cipher is rail fence cipher.
Now if some normal user read this SMS it cant understand anything from this message but if you read the message using a SMS decoder it will give you original message.
Using this encoded message does not guaranteed you the 100% security because if someone knows that you are using a rail fence cipher than it would be easy to decrypt the message. Anybody can break this code on a single piece of paper.
from appuifw import *
for i in range (j):
entry =db.find(query(u'Name of Receipent','text'))
for item in entry:
index = appuifw.selection_list(choices=L, search_field=0)
# print num
app_lock = e32.Ao_lock()
round = appuifw.Text()
appuifw.app.body = round
appuifw.app.menu = [(u"Send", send)]
appuifw.app.title=u"New Text Message"
appuifw.app.exit_key_handler = exit_key_handler
- Below are some screenshots of the above script: