I want to search substrings in encrypted string. To do that I have read “Implement Rabin-Karp Algorithm” and “Substring-Searchable Symmetric Encryption”. After that, I completed the Rabin-Karp implementation. But, those does not answer for my problem. Rabin-Karp requires both main string for searching substrings and substring to be searched. What I want to do is finding patterns in encrypted strings without decrypt it?
There are some works both theoretical and practical that they do solve your problem efficiently and in a secure way. By efficiently i mean the search efficiency is linear on the size of the searched substring. This is achieved by using auxiliary data structures known as suffix tree. Chase and Shen follow this approach, by encrypting the suffix tree with symmetric primitives.
This work does not use any auxiliary data structure for efficiency. It encrypts consecutive n-grams and their positions.
A theoretical work follows another technique. By altering the subset sum problem to be easily solvable they issue subset sum instances to the cloud, and the cloud solves them polynomially and the solutions are the positions in the original string of the substring.
Stronger security guarantees with oblivious ram are presented here
I am afraid you are a little early: searchable encryption is quite a new field in cryptography, and I am not sure there exists any good implementation yet. However, answers to this question suggest cryptdb.
Also, I do not think the Rabin-Karp Algorithm is easily transposable to searchable encryption. I believe it has many optimisations, which could conflict with the internal workings of the encryption schemes. I'm not saying it is impossible, though.