-1
$\begingroup$

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)
$\endgroup$
3
  • $\begingroup$ 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). $\endgroup$
    – mikeazo
    Jun 20 '15 at 12:53
  • 3
    $\begingroup$ 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. $\endgroup$
    – mikeazo
    Jun 20 '15 at 12:54
  • 3
    $\begingroup$ I'm voting to close this question as off-topic because it's about CryptDB and what it currently supports, and not about cryptography $\endgroup$
    – poncho
    Jun 26 '15 at 16:03
2
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Interesting, glad you found the answer. $\endgroup$
    – mikeazo
    Jun 22 '15 at 0:59
1
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ According to the CryptDB paper I linked to, they do, if you are doing keyword matching. Won't work for regex like searches though. $\endgroup$
    – mikeazo
    Jun 20 '15 at 16:59
  • $\begingroup$ @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 $\endgroup$ Jun 21 '15 at 8:23
  • $\begingroup$ looks like they disabled LIKE queries in recent releases $\endgroup$
    – sashank
    Jun 22 '15 at 0:31

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