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 can use NLP to impr

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

Coreference Resolution and Applications in NLP

In computational linguistics and natural language processing coreference resolution (CR) is an avidly studies problem in discourse which has managed to be only partially solved by the state of the art and consequently remain one of the most exciting open problems in this field. Introduction and Definition The process of linking together mentions of a particular entity in a speech or text excerpt that related to real world entities is termed as coreference resolution. This process identifies the dependence between a phrase with the rest of the sentence or other sentences in the text.  This is an integral part of natural languages to avoid repetition, demonstrate possession/relation etc. A basic example to illustrate the above definition is given below : Another example which uses elements from popular fiction literature : Harry  wouldn’t bother to read “ Hogwarts: A History ” as long as  Hermione  is around.  He  knows  she  knows  the book  by heart. The different type