SMS 007 – modern cryptography on your side

SMS007 system uses the above mentioned cryptography to protect your data. Its design is based on the Kerckhoffs principle, according to which knowledge of the encryption method must not weaken the security. That is why the method of encryption can be described here.

Main application password

Base of your security is the „main application password“, which you choose at the first start. This is the only password that you must remember. It must be at least 8 characters long.

Good selection of the „main application password“ ensures your security. If you choose a bad password, which can be guessed easily (like a normal word, or date of birth etc), your adversary could try all possible passwords and reveal it. If this „trying“ is performed with a computer, many millions of words can be tried in a relatively short time. Therefore, the password must be chosen carefully – it should not be a normal word, and it should contain small letters, capitals and numbers.

Since you will have to use the „main application password“ very often, the danger that you forget it is relatively low. On the other hand, if you really forget your „main application password“, your data is lost! There is no way how to retrieve data from the phone without knowledge of the „main application password“.

Hash function SHA-2 is used to derive a key from the „main application password“. The key is then used to encrypt all sensitive data saved into the phone (like received messages or the contact list). For this encryption, AES cipher is used, running in CBC mode.

Practical use of the „main application password“

When the application is started, it asks you for the „main application password“. When you enter a text into the text field and press OK, the text will be converted to a key, using SHA-2. Then, the key will be used in an attempt to decrypt data stored in phone. If this decryption fails, the password supplied has been wrong and the user is alerted about this fact. If the decryption succeeds, the application proceeds to main screen.

Change of the „main application password“

Should you want to change your „main application password“, you can do it in the „Settings“ menu. To change the password, you must enter the old password once and the new password twice, and select OK. Data saved in phone are then re-encrypted using the new key, and since this moment, you must use the new password to access them.

Message encryption

To communicate securely, two users of the SMS 007 system must at first agree upon a common password. This password must not be revealed to anyone else. The corresponding key is then stored into a „keyring“, which is encrypted in the phone using „main application password“.

The longer and more complicated is the common communication password, the better. Since no one has to remember the password, it can be really long and really complicated. A possible way of constructing such passwords is to také a long sentence and select the first characters of each word. For example, this sentence would give rise to the following strange-looking password:


Number of possible sentences in a natural human language is astronomical, so this method can be used to construct quite secure passwords. The best way is however to choose entirely random passwords. For details, see the manual, section "A note on recommended password lengths".

An SMS message, which should be sent from one user to another, is encrypted using AES and key derived from the common password using SHA-2. The common password can be changed often, provided that both parties perform the change.

Encryption in details

If text T is to be encrypted using key K, the process in SMS 007 is as follows:

  1. Using SHA-2, 128-bit key K and 128-bit initialization vector IV are derived from the communication password. The IV is not made public.
  2. Current time C is taken. Then, a SHA-2 hash is computed from text T and time C. This hash H will be used for protection of integrity of the message.
  3. Protection hash H, time C, several extra information (like length of T) and text T is sequentially placed into a block of bytes B. This block B is padded to a multiple of block length of AES cipher (16 bytes). In the end, block B may be from 48 to 63 byte longer than original text T.
  4. This block is encrypted using key K, cipher AES in CBC mode. The resulting encrypted block Z can be sent or stored securely.
  5. Initialization vector IV is not sent openly, but derived on the other side during decryption from the common communication password.

Hash H ensures protection of encrypted text from modification. The fact that H is computed not only from T, but also from C, ensures that even the same text T encrypted using the same key K will produce totally different ciphertexts Z_1 and Z_2 after two encryptions at different times.

Security, passwords and keys

AES is a very secure cipher, where even knowledge of both T and Z cannot help the adversary to obtain key K. On the other hand, it is very important to select good key K (and good password, from which it is derived, respectively). Since the „common password“ for communication need not be remembered by the parties, we strongly recommend to select a very long, very complicated and very strange string. The adversary trying to decrypt your communication will try common words – do not give him a chance!

Never forget: security of your communication relies on quality of the „common keys“, which you use with your partners.

Previous chapter:Hash function SHA-2