SQLCipher.

Åõ¸íÇÑ SQLite ¾Ïȣȭ
Áö±Ý ´Ù¿î·Îµå

SQLCipher. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • BSD License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • ZETETIC LLC
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://www.zetetic.net

SQLCipher. ű×


SQLCipher. ¼³¸í

Åõ¸íÇÑ SQLite ¾Ïȣȭ SQLCipher´Â ¿ÏÀüÈ÷ ¾Ïȣȭ µÈ SQLite µ¥ÀÌÅͺ£À̽º¸¦ Á¦°øÇÕ´Ï´Ù. ƯÈ÷ °Å·¡ ¹× À妽º°¡ÀÖ´Â °ÍÀº ºü¸¨´Ï´Ù. ÀϹÝÀûÀ¸·Î 5 %ÀÇ ¼º´É È÷Æ® ¸¸ º¼ ¼ö ÀÖ½À´Ï´Ù. ¾ÏȣȭµÇÁö ¾ÊÀº µ¥ÀÌÅÍ°¡ µð½ºÅ©¿¡ ±â·ÏµÇÁö ¾Ê°í SQLiteÀÇ ÆäÀÌÁö ij½ÌÀº ¸Þ¸ð¸®¿¡ ÀúÀåµÈ ÆäÀÌÁö¸¦ º¹È£È­ ÇÒ ¼öÀÖ°ÔÇÕ´Ï´Ù. SQLCipher ÇÁ·Î±×·¥Àº AES-256 ¾Ë°í¸®Áò, ÀÇ»ç ³­¼ö »ý¼º ¹× PBKDF2¸¦ Æ÷ÇÔÇÑ ¿©·¯ ¾Ïȣȭ ¿ä±¸ »çÇ׿¡ ´ëÇØ ÇÇ¾î °ËÅä µÈ OpenSSL ¶óÀ̺귯¸®¿¡ ÀÇÁ¸ÇÕ´Ï´Ù. Å° ÆÄ»ý ºôµù ºôµù SQLCipher´Â µÎ °¡Áö ÀÛÀº ¿¹¿Ü°¡ÀÖ´Â SQLiteÀÇ ÀÏ¹Ý ¹öÀüÀ» ÄÄÆÄÀÏÇÏ´Â °Í°ú °ÅÀÇ °°½À´Ï´Ù. 1. SQLITE_HAS_CODEC 2. Á¤Àû ¸µÅ©·Î ÄÄÆÄÀÏ ¸µ µÈ SHA256 Áö¿øÀ» »ç¿ëÇÏ¿© OpenSSLÀÇ libcrypto¿Í ¸µÅ©ÇؾßÇÕ´Ï´Ù (±³Ã¼ / opt / local / lib libcrypto.aÀÇ °æ·Î·Î libcrypto.a) ./configure cflags = "- dsqlags ="/ opt / local / local / local / lib / libcrypto.a "makecomiling µ¿Àû ¸µÅ© : ./configure cflags ="- dsqlite_has_codec -lcrypto " Databaseto ¸ÞÀÌÅ©¾÷Àº Pragma¸¦ »ç¿ëÇÒ ¼öÀÖ´Â µ¥ÀÌÅͺ£À̽ºÀÇ ¾Ïȣȭ ¾ÏÈ£¸¦ ÁöÁ¤ÇÕ´Ï´Ù. ÀÔ·Â ÇÑ ¾ÏÈ£¹®Àº SHA256À» »ç¿ëÇÏ¿© Çؽà ó¸®ÇÏ°í °á°ú´Â database.pragma Å° = '¾ÏÈ£ ±¸Ã³'ÀÇ ¾Ïȣȭ Å°·Î »ç¿ëµË´Ï´Ù. ¹ø°¥¾Æ, BLOB ¸®ÅÍ·²À» »ç¿ëÇÏ¿© Á¤È®ÇÑ ¹ÙÀÌÆ® ½ÃÄö½º¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ ¹æ¹ýÀ» »ç¿ëÇÏ´Â °æ¿ì Å° Data.Pragma Å° = "X'2DD29Ca851E7B56E4693D761F08507293D763F411A8086D999" "¸¦ Á÷Á¢ º¯È¯ÇÏ´Â 64 ÀÚ HEX ¹®ÀÚ¿­À» Á¦°øÇÏ´Â µ¥ÀÌÅÍ°¡ Á÷Á¢ º¯È¯µË´Ï´Ù. -key µ¥ÀÌÅͺ£À̽º, Pragma Rekey°¡ ±¸ÇöµË´Ï´Ù. Pragma Rekey = 'NewPassphrase'; ÇÁ·Î±×·¡¹Ö ¹æ½ÄÀ¸·Î µ¥ÀÌÅͺ£À̽º¸¦ ¾ÏȣȭÇÏ·Á¸é SQLIte3_Key ÇÔ¼ö¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. PKEEy¿¡ Á¦°øµÈ µ¥ÀÌÅÍ´Â PRAGMA KEY.INT SQLITE3_KEY (SQLite3 * DB, Const void * pkey, int nkey)¿Í µ¿ÀÏÇÑ ±ÔÄ¢¿¡ µû¶ó ¾Ïȣȭ Å°·Î º¯È¯µË´Ï´Ù. Pragma Å° ¶Ç´Â SQLIte3_key´Â µ¥ÀÌÅͺ£À̽º¸¦ ù ¹ø° ÀÛ¾÷À¸·Î È£ÃâÇؾßÇÕ´Ï´Ù. ¿­·ÁÀÖ´Ù.


SQLCipher. °ü·Ã ¼ÒÇÁÆ®¿þ¾î