Skip to main content

Contextual Encryption with Natural Language Processing


Contextual Encryption Using Natural Language Processing

Various symmetric and asymmetric cryptography algorithms ensure the security of millions of documents being transferred from man in the middle attacks. Most of these algorithms contain a computationally infeasible task for any hacker trying to gain access to some information. However, with the advent of post quantum cryptography, existing security algorithms may turn to be breakable. A prominent mechanism of hiding a message from an attacker in post quantum cryptography, would be to prevent him from knowing that the message is encrypted.

Principles

A way to contextually encrypt sentences is to alter the semantics of the sentence, without bringing a change in the sentence structure. This is usually followed by a Pretty Good Privacy(PGP) algorithm encryption.
We have a precomputed database of public domain articles such as news, blogs, columns and magazines and store them in a online database. We can then replace sentences in the original message with a sentence from the public domain which has a similar structure.


Consider the sentence:
Raphael has lost his consignment in Ecuador.



The following sentence can be replaced with a sentence that has the same typed dependencies, picked from the public domain.

Example:

'Obama has delivered his speech in Seoul’

The sentence must be cohesive enough for a encrypted text reader to believe the text is not encrypted. For this, sentences and paragraphs must contain a flow of ideas that bind together a story. To establish such a relation, we use Text Tiling as described in [2].

It is also necessary for the original message and the encrypted message to be mutually exclusive. The encryption scheme would not be secure if looking at the encrypted message gives away some idea of the original message.


Contexts

A context is a hashmap that summarizes the main words of a sentence. These are usually nouns and verbs. Prepositions,adjectives and adverbs are usually not included in contexts. Once a message is to be encrypted, we compute it’s context and store it in a context map. A context map is a mapping of the word and it’s index in the sentence.

Consider the sentence:
Raphael has lost his consignment in Ecuador.

Context Map for above sentence:
Raphael: 1, Lost: 3, Consignment: 5, Ecuador: 7

Encryption Decryption Algorithm

Encryption Mechanism  

Encryption

We construct a context map(as shown above) and send it encrypted by existing encryption algorithms. Then we send the contextually encrypted message, also encrypted with a PGP algorithm. Refer to Encryption Diagram above.


Decryption Mechanism  

Decryption

The private context is decrypted first. Then the contextually encrypted message is passed to a stanford NLP parser. This generates the dependency tree for the contextually encrypted message. In this tree, we replace words, with indices in the private context, thus reconstructing the original message.

References

  1. https://babutrack.files.wordpress.com/2014/12/paper-context-encryption-using-nlp.pdf
  2. Text Encryption Algorithm Based on Natural Language Processing by Xianghe Jing, Yu Hao, Huaping Fei Zhijun Li, 2012 Fourth International Conference on Multimedia Information Networking and Security, IEEE 
  3. Hearst, M. TextTiling: Segmenting Text into Multi-Paragraph Subtopic Passages, Computational Linguistics , 23 (1), pp. 33-64, March 1997. 
  4. Stanford NLP parser, http://nlp.stanford.edu:8080/parser/

Comments

Post a Comment

Popular posts from this blog

NLP in Video Games

From the last few decades, NLP (Natural Language Processing) has obtained a high level of success in the field  of Computer Science, Artificial Intelligence and Computational Logistics. NLP can also be used in video games, in fact, it is very interesting to use NLP in video games, as we can see games like Serious Games includes Communication aspects. In video games, the communication includes linguistic information that is passed either through spoken content or written content. Now the question is why and where can we use NLP in video games?  There are some games that are related to pedagogy or teaching (Serious Games). So, NLP can be used in these games to achieve these objectives in the real sense. In other games, one can use the speech control using NLP so that the player can play the game by concentrating only on visuals rather on I/O. These things at last increases the realism of the game. Hence, this is the reason for using NLP in games.  We ...

Discourse Analysis

NLP makes machine to understand human language but we are facing issues like word ambiguity, sarcastic sentiments analysis and many more. One of the issue is to predict correctly relation between words like " Patrick went to the club on last Friday. He met Richard ." Here, ' He' refers to 'Patrick'. This kind of issue makes Discourse analysis one of the important applications of Natural Language Processing. What is Discourse Analysis ? The word discourse in linguistic terms means language in use. Discourse analysis may be defined as the process of performing text or language analysis, which involves text interpretation and knowing the social interactions. Discourse analysis may involve dealing with morphemes, n-grams, tenses, verbal aspects, page layouts, and so on. It is often used to refer to the analysis of conversations or verbal discourse. It is useful for performing tasks, like A naphora Resolution (AR) , Named Entity Recognition (NE...

Dbpedia Datasets

WHAT IS Dbpedia? It is a project idea aiming to extract structured content from the information created in the wikipedia project. This structured information is made available on the World Wide Web. DBpedia allows users to semantically query relationships and properties of Wikipedia resources, including links to other related datsets. BUT? But why i am talking about Dbpedia ? How it is related to natural language processing? The DBpedia data set contains 4.58 million entities, out of which 4.22 million are classified in a consistent ontology, including 1,445,000 persons, 735,000 places, 123,000 music albums, 87,000 films, 19,000 video games, 241,000 organizations, 251,000 species and 6,000 diseases. The data set features labels and abstracts for these entities in up to 125 languages; 25.2 million links to images and 29.8 million links to external web pages. In addition, it contains around 50 million links...