Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I have downloaded and built Cryptdb and it works well. Most of queries on encrypted database run without any issue but, the query with LIKE key word receives an error.

mysql> select * from pptbl;
+------+-------+
| id   | name  |
+------+-------+
| 1    | ali   |
| 2    | arbab |
| 3    | ava   |
| 4    | azim  |
+------+-------+
4 rows in set (0.12 sec)

mysql> select * from pptbl where name LIKE '%ali%';
ERROR 1105 (07000): Identifier not found: 'oINVALID'
FILE: main/Analysis.cc
LINE: 782

and Related encrypted results:

QUERY: select * from pptbl  
NEW QUERY: select `pbpcr`.`table_JMVMTSUOXQ`.`FETRAWCXAQoEq`,
`pbpcr`.`table_JMVMTSUOXQ`.`cdb_saltEDYOFRHNTM`,
`pbpcr`.`table_JMVMTSUOXQ`.`LGDQMZOLRAoEq` from `pbpcr`.`table_JMVMTSUOXQ`
ENCRYPTED RESULTS:
+--------------------+--------------------+--------------------+
|FETRAWCXAQoEq       |cdb_saltEDYOFRHNTM  |LGDQMZOLRAoEq       |
+--------------------+--------------------+--------------------+
|6564397473536819806 |13839409992861282053|?]???i?Q0?o~?????rqw??$\??3??c6?|
    |4201181374583641407 |5838989347444454725 |?$@ur?????????????[?^9??V S_5??^|
|1649188046741762720 |9525321359430614429 |``???L??w|??f?C>?????4<????[????|
|16881031136507617701|7294557497133907357 |p?r?my?[???E`?2cLE/?.???E??????~|
+--------------------+--------------------+--------------------+

and the result of following query:

mysql> set @cryptdb='show';
+-----------+--------+--------+--------+--------+------+
| _database | _table | _field | _onion | _level | id   |
+-----------+--------+--------+--------+--------+------+
| pbpcr     | pptbl  | id     | oEq    | RND    | 1082 |
| pbpcr     | pptbl  | id     | oOrder | RND    | 1083 |
| pbpcr     | pptbl  | id     | oADD   | HOM    | 1084 |
| pbpcr     | pptbl  | name   | oEq    | DET    | 1085 |
| pbpcr     | pptbl  | name   | oOrder | RND    | 1086 |
+-----------+--------+--------+--------+--------+------+
5 rows in set (0.43 sec)
share|improve this question

closed as off-topic by poncho, Gilles, otus, Ricky Demer, e-sushi Jun 27 at 19:00

  • This question does not appear to be about cryptography within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Are you sure they support "LIKE". It was my understanding that CryptDB only supports a subset of SQL. UPDATE: Looks like they do support a subset of 'LIKE' (see page 5). –  mikeazo Jun 20 at 12:53
3  
Also, you are likely better off asking about this on the cryptdb-users mailing list. Not that we don't want you on our site :) but I'm just trying to be honest with you. –  mikeazo Jun 20 at 12:54
3  
I'm voting to close this question as off-topic because it's about CryptDB and what it currently supports, and not about cryptography –  poncho Jun 26 at 16:03

2 Answers 2

up vote 2 down vote accepted

The following is the main contributor reply:

The latest released version of CryptDB no longer supports the LIKE operation. Feel free to contribute to CryptDB and extend it to support this operation. You can find an older implementation (disabled) in the code, which we did not have the chance to port to the latest system.

share|improve this answer
    
Interesting, glad you found the answer. –  mikeazo Jun 22 at 0:59

Cryptdb doesn't support LIKE queries. You can try using in and not in queries. It supports update, in and not in queries but not like.

share|improve this answer
    
According to the CryptDB paper I linked to, they do, if you are doing keyword matching. Won't work for regex like searches though. –  mikeazo Jun 20 at 16:59
    
@Prakruti As the contributors claimed they used like queries: here [github.com/CryptDB/cryptdb/blob/… they used SELECT id, invnumber, transdate, shipvia, intnores FROM ar WHERE invnumber LIKE '%.%' ORDER BY id –  sheykholeslam Jun 21 at 8:23
    
looks like they disabled LIKE queries in recent releases –  sashank Jun 22 at 0:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.