MGMLaboratory
Back

Menu

01Home
02About Us
03Projects
04Publications
05Member
06Articles
07Contact

Let's Talk

Open in Mail app

Socials

Malang (ID) --:--Privacy PolicyTerms of Service

January 23, 20182 min read

Locking a Chat App with AES and Layered HashingLocking a Chat App with AES and Layered Hashing

A prototype pairs standard AES encryption with several layers of MD5 hashing to protect the key, not the message.

  • Journal
  • Publications

Written by

  • SRShirasaka RenIT & Infrastructure · Student Member

In this article

  1. 01The design the team proposed
  2. 02How it performed

When you send a private message, the app carrying it can usually read it. That is the uncomfortable starting point for a 2018 study on chat privacy.

The paper argues that social media platforms sit in a position to share user data with other parties, including governments, through formal legal requests. Protection against an outside attacker is a well studied problem. Protection against the platform itself is harder, because the platform runs the software.

01/02

The design the team proposed

The proposed system encrypts chat content with AES and protects the key with several layers of MD5 hashing. The split matters. AES does the heavy lifting on the message, while the hashing protects the secret that makes the message readable.

Sending a message from a phone is the everyday case studied here. Photo: StockyPics, CC0, via Wikimedia Commons.
Fig. 01Sending a message from a phone is the everyday case studied here. Photo: StockyPics, CC0, via Wikimedia Commons.

Key generation is deliberately simple. The app draws sixteen random numbers between 10 and 99 to form a 32 digit manipulation key, then converts pairs of digits into characters to produce the real key used for AES. Distribution is where the layering earns its place. The manipulation key is passed through multiple rounds of MD5 using private values that only the application knows, so only the recipient can recover it and decrypt the conversation.

Layered protection is the core idea behind the proposed chat design. Photo: public domain, via Wikimedia Commons.
Fig. 02Layered protection is the core idea behind the proposed chat design. Photo: public domain, via Wikimedia Commons.

02/02

How it performed

The team tested the prototype on a deliberately modest Android phone with messages growing from 1 to 1000 characters. Encryption ranged from about 1.5 to 12.1 milliseconds, and decryption from 2.1 to 25.3 milliseconds. At the longest message, encryption took 12.1 milliseconds and decryption 25.3 milliseconds.

The prototype was benchmarked on low end Android hardware. Photo: public domain, via Wikimedia Commons.
Fig. 03The prototype was benchmarked on low end Android hardware. Photo: public domain, via Wikimedia Commons.

Those numbers sit comfortably under the 100 millisecond threshold usually cited for interface responsiveness. The security work does not make the chat feel slow, even on hardware that was already old when the study was published.

The interesting lesson is structural. The cryptographic primitive is standard and well understood. The design effort went into key handling, because that is where a chat system is most likely to leak.

Source

  1. Wardhono et al. (2018). End-to-End Privacy Protection for Facebook Mobile Chat based on AES with Multi-Layered MD5. International Journal of Interactive Mobile Technologies.

    DOI10.3991/ijim.v12i1.7472 (opens in a new tab)

Next articleA Phone That Listens While You Learn to Speak(Keep scrolling)(Read it next)(Loading)