SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
5
  SQLite
Taro Matsuzawa aka. btm (@smellman)
  sumaben@kanto #11 Lightning Talk
SQLite

• iPhone       SQL

•
• Firefox
• JB
 •     Blob
sqlcipher
• SQLite
 • SQLite


• iPhone
1

$ sudo mkdir -p /opt/smartphone/lib
$ sudo chown -R btm:staff /opt/smartphone
$ cd /opt/smartphone/lib/
$ git clone git://github.com/sjlombardo/sqlcipher.git
$ curl -O ftp://ftp.infoscience.co.jp/pub/Crypto/SSL/openssl/source/openssl-1.0.0a.tar.gz
$ git clone git://github.com/sjlombardo/openssl-xcode.git
$ tar zxf openssl-1.0.0a.tar.gz
$ cp -fr openssl-xcode/openssl.xcodeproj openssl-1.0.0a/
$ mv openssl-1.0.0a openssl
2
•   XCode

    •
        •   SQLCIPHER_SRC       SQLCipher

            •   SQLCIPHER_SRC:/opt/smartphone/lib/sqlcipher

        •   OPENSSL_SRC       OpenSSL

            •   OPENSSL_SRC:/opt/smartphone/lib/openssl
3

•   XCode                      ->

    •   OpenSSL          openssl.xcodeproj

        •

    •        SQLCipher              sqlcipher.xcodeproj
4

•   SQLCipher    OpenSSL

    •   sqlcipher.xcodeproj                  ->

        •                   SQLCIPHER_SRC

    •   openssl.xcodeproj                   ->

        •                   OPENSSL_SRC
5
•   XCode                            ->
        "SQLCipherTest"

    •                                       +

        •   OpenSSL   crypto   SQLCipher   sqlcipher

    •
        •
            •   $(SQLCIPHER_SRC)   $(OPENSSL_SRC)
6

•   sqlcipher.xcodeproj    libsqlcipher.a



•   openssl.xcodeproj     libcrypto.a



•                                           SQLITE_HAS_CODEC=1
•   SQL

    •   PRAGMA key = 'default_key';

    •                       sqlcipher

•
•   FMDatabase

    •   FMDatabase setKey
! NSString* key = @"TaroMatsuzawaIsDead";
! NSString* newKey = [key stringByAppendingString:
             [[UIDevice currentDevice] uniqueIdentifier]];

! if (![rootViewController.encdb setKey:key])
! ! NSLog(@"> Could not set key.");
URL
•   sqlcipher

    •   http://sqlcipher.net/

•   sqlcipher document

    •   http://sqlcipher.net/documentation

•   openssl-xcode

    •   https://github.com/sjlombardo/openssl-xcode

•   FMDatabase

    •   https://github.com/ccgus/fmdb
•
$ sudo port install openssl
$ mkdir -p ~/develop/sqlcipher
$ cd ~/develop/sqlcipher
$ git clone git://github.com/sjlombardo/sqlcipher.git
$ cd sqlcipher
$ ./configure CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/opt/local/lib/libcrypto.a"
$ make

$ ~/develop/sqlcipher/sqlcipher/sqlite3 sqlite3.db
SQLite version 3.7.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .read /Users/btm/develop/(      )/schema.sql
sqlite> PRAGMA key = 'default_key';

Contenu connexe

Tendances

Redis the better NoSQL
Redis the better NoSQLRedis the better NoSQL
Redis the better NoSQLOpenFest team
 
2015 02-09 - NoSQL Vorlesung Mosbach
2015 02-09 - NoSQL Vorlesung Mosbach2015 02-09 - NoSQL Vorlesung Mosbach
2015 02-09 - NoSQL Vorlesung MosbachJohannes Hoppe
 
PuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with PuppetPuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with PuppetWalter Heck
 
Redis Use Patterns (DevconTLV June 2014)
Redis Use Patterns (DevconTLV June 2014)Redis Use Patterns (DevconTLV June 2014)
Redis Use Patterns (DevconTLV June 2014)Itamar Haber
 
20110514 mongo dbチューニング
20110514 mongo dbチューニング20110514 mongo dbチューニング
20110514 mongo dbチューニングYuichi Matsuo
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensionserwanl
 
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS AzureJohannes Hoppe
 
puppet @techlifecookpad
puppet @techlifecookpadpuppet @techlifecookpad
puppet @techlifecookpadNaoya Nakazawa
 
Chrome拡張開発者のためのFirefox拡張開発
Chrome拡張開発者のためのFirefox拡張開発Chrome拡張開発者のためのFirefox拡張開発
Chrome拡張開発者のためのFirefox拡張開発swdyh
 
チームメイトのためにdocstringを書こう! pyconjp2019
チームメイトのためにdocstringを書こう! pyconjp2019チームメイトのためにdocstringを書こう! pyconjp2019
チームメイトのためにdocstringを書こう! pyconjp2019cocodrips
 
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v Arian Gutierrez
 
20171014 tips for manipulating filesystem in julia
20171014 tips for manipulating filesystem in julia20171014 tips for manipulating filesystem in julia
20171014 tips for manipulating filesystem in julia岳華 杜
 
DEF CON 27 -OMER GULL - select code execution from using sq lite
DEF CON 27 -OMER GULL - select code execution from using sq liteDEF CON 27 -OMER GULL - select code execution from using sq lite
DEF CON 27 -OMER GULL - select code execution from using sq liteFelipe Prado
 
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet Camp Amsterdam 2015: Manifests of Future PastPuppet Camp Amsterdam 2015: Manifests of Future Past
Puppet Camp Amsterdam 2015: Manifests of Future PastPuppet
 
Redis in Practice
Redis in PracticeRedis in Practice
Redis in PracticeNoah Davis
 
Drush. Secrets come out.
Drush. Secrets come out.Drush. Secrets come out.
Drush. Secrets come out.Alex S
 

Tendances (20)

Redis the better NoSQL
Redis the better NoSQLRedis the better NoSQL
Redis the better NoSQL
 
2015 02-09 - NoSQL Vorlesung Mosbach
2015 02-09 - NoSQL Vorlesung Mosbach2015 02-09 - NoSQL Vorlesung Mosbach
2015 02-09 - NoSQL Vorlesung Mosbach
 
Couchdb w Ruby'm
Couchdb w Ruby'mCouchdb w Ruby'm
Couchdb w Ruby'm
 
PuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with PuppetPuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with Puppet
 
Redis Use Patterns (DevconTLV June 2014)
Redis Use Patterns (DevconTLV June 2014)Redis Use Patterns (DevconTLV June 2014)
Redis Use Patterns (DevconTLV June 2014)
 
20110514 mongo dbチューニング
20110514 mongo dbチューニング20110514 mongo dbチューニング
20110514 mongo dbチューニング
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
 
19. CodeIgniter imagini in mysql
19. CodeIgniter imagini in mysql19. CodeIgniter imagini in mysql
19. CodeIgniter imagini in mysql
 
puppet @techlifecookpad
puppet @techlifecookpadpuppet @techlifecookpad
puppet @techlifecookpad
 
Chrome拡張開発者のためのFirefox拡張開発
Chrome拡張開発者のためのFirefox拡張開発Chrome拡張開発者のためのFirefox拡張開発
Chrome拡張開発者のためのFirefox拡張開発
 
チームメイトのためにdocstringを書こう! pyconjp2019
チームメイトのためにdocstringを書こう! pyconjp2019チームメイトのためにdocstringを書こう! pyconjp2019
チームメイトのためにdocstringを書こう! pyconjp2019
 
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
 
20171014 tips for manipulating filesystem in julia
20171014 tips for manipulating filesystem in julia20171014 tips for manipulating filesystem in julia
20171014 tips for manipulating filesystem in julia
 
DEF CON 27 -OMER GULL - select code execution from using sq lite
DEF CON 27 -OMER GULL - select code execution from using sq liteDEF CON 27 -OMER GULL - select code execution from using sq lite
DEF CON 27 -OMER GULL - select code execution from using sq lite
 
Couchdb
CouchdbCouchdb
Couchdb
 
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet Camp Amsterdam 2015: Manifests of Future PastPuppet Camp Amsterdam 2015: Manifests of Future Past
Puppet Camp Amsterdam 2015: Manifests of Future Past
 
Redis in Practice
Redis in PracticeRedis in Practice
Redis in Practice
 
Drush. Secrets come out.
Drush. Secrets come out.Drush. Secrets come out.
Drush. Secrets come out.
 
MongoDB
MongoDBMongoDB
MongoDB
 

Similaire à スマートフォン勉強会@関東 #11 LT 5分で語る SQLite暗号化

Getting Started with PureScript
Getting Started with PureScriptGetting Started with PureScript
Getting Started with PureScriptJohn De Goes
 
Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境Yuriko IKEDA
 
comp security lab.ppsx
comp security lab.ppsxcomp security lab.ppsx
comp security lab.ppsxDesuWajana
 
Lightweight static code analysis with semgrep
Lightweight static code analysis with semgrepLightweight static code analysis with semgrep
Lightweight static code analysis with semgrepNull Bhubaneswar
 
Live Memory Forensics on Android devices
Live Memory Forensics on Android devicesLive Memory Forensics on Android devices
Live Memory Forensics on Android devicesNikos Gkogkos
 
Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...
Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...
Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...Codemotion
 
Ci system part i
Ci system part iCi system part i
Ci system part i振維 李
 
2017 Codemotion OWASP ZAP in CI/CD
2017 Codemotion OWASP ZAP in CI/CD2017 Codemotion OWASP ZAP in CI/CD
2017 Codemotion OWASP ZAP in CI/CDSimon Bennetts
 
How to inspect a RUNNING perl process
How to inspect a RUNNING perl processHow to inspect a RUNNING perl process
How to inspect a RUNNING perl processMasaaki HIROSE
 
视觉中国的MongoDB应用实践(QConBeijing2011)
视觉中国的MongoDB应用实践(QConBeijing2011)视觉中国的MongoDB应用实践(QConBeijing2011)
视觉中国的MongoDB应用实践(QConBeijing2011)Night Sailer
 
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilitiesVorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilitiesDefconRussia
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesMikhail Egorov
 
Доклад Михаила Егорова на PHDays
Доклад Михаила Егорова на PHDaysДоклад Михаила Егорова на PHDays
Доклад Михаила Егорова на PHDaysru_Parallels
 
窺探職場上所需之資安專業技術與能力 Tdohconf
窺探職場上所需之資安專業技術與能力 Tdohconf窺探職場上所需之資安專業技術與能力 Tdohconf
窺探職場上所需之資安專業技術與能力 Tdohconfjack51706
 
Don’t turn your logs into cuneiform
Don’t turn your logs into cuneiformDon’t turn your logs into cuneiform
Don’t turn your logs into cuneiformAndrey Rebrov
 
Firebird Interbase Database engine hacks or rtfm
Firebird Interbase Database engine hacks or rtfmFirebird Interbase Database engine hacks or rtfm
Firebird Interbase Database engine hacks or rtfmqqlan
 

Similaire à スマートフォン勉強会@関東 #11 LT 5分で語る SQLite暗号化 (20)

Getting Started with PureScript
Getting Started with PureScriptGetting Started with PureScript
Getting Started with PureScript
 
Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境
 
comp security lab.ppsx
comp security lab.ppsxcomp security lab.ppsx
comp security lab.ppsx
 
Lightweight static code analysis with semgrep
Lightweight static code analysis with semgrepLightweight static code analysis with semgrep
Lightweight static code analysis with semgrep
 
Build Time Analyzer
Build Time AnalyzerBuild Time Analyzer
Build Time Analyzer
 
Live Memory Forensics on Android devices
Live Memory Forensics on Android devicesLive Memory Forensics on Android devices
Live Memory Forensics on Android devices
 
Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...
Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...
Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...
 
Ci system part i
Ci system part iCi system part i
Ci system part i
 
2017 Codemotion OWASP ZAP in CI/CD
2017 Codemotion OWASP ZAP in CI/CD2017 Codemotion OWASP ZAP in CI/CD
2017 Codemotion OWASP ZAP in CI/CD
 
SQL Injection Defense in Python
SQL Injection Defense in PythonSQL Injection Defense in Python
SQL Injection Defense in Python
 
How to inspect a RUNNING perl process
How to inspect a RUNNING perl processHow to inspect a RUNNING perl process
How to inspect a RUNNING perl process
 
视觉中国的MongoDB应用实践(QConBeijing2011)
视觉中国的MongoDB应用实践(QConBeijing2011)视觉中国的MongoDB应用实践(QConBeijing2011)
视觉中国的MongoDB应用实践(QConBeijing2011)
 
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilitiesVorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sites
 
Доклад Михаила Егорова на PHDays
Доклад Михаила Егорова на PHDaysДоклад Михаила Егорова на PHDays
Доклад Михаила Егорова на PHDays
 
#WeSpeakLinux Session
#WeSpeakLinux Session#WeSpeakLinux Session
#WeSpeakLinux Session
 
Osquery
OsqueryOsquery
Osquery
 
窺探職場上所需之資安專業技術與能力 Tdohconf
窺探職場上所需之資安專業技術與能力 Tdohconf窺探職場上所需之資安專業技術與能力 Tdohconf
窺探職場上所需之資安專業技術與能力 Tdohconf
 
Don’t turn your logs into cuneiform
Don’t turn your logs into cuneiformDon’t turn your logs into cuneiform
Don’t turn your logs into cuneiform
 
Firebird Interbase Database engine hacks or rtfm
Firebird Interbase Database engine hacks or rtfmFirebird Interbase Database engine hacks or rtfm
Firebird Interbase Database engine hacks or rtfm
 

Plus de Taro Matsuzawa

地球地図を利用した地図タイルの作成 - FOSS4G TOKYO 2014 全体セッション2
地球地図を利用した地図タイルの作成 - FOSS4G TOKYO 2014 全体セッション2地球地図を利用した地図タイルの作成 - FOSS4G TOKYO 2014 全体セッション2
地球地図を利用した地図タイルの作成 - FOSS4G TOKYO 2014 全体セッション2Taro Matsuzawa
 
Couchbase hackaton pomo
Couchbase hackaton pomoCouchbase hackaton pomo
Couchbase hackaton pomoTaro Matsuzawa
 
11月のささみ: pgRoutingって何?
11月のささみ: pgRoutingって何?11月のささみ: pgRoutingって何?
11月のささみ: pgRoutingって何?Taro Matsuzawa
 
OSMを使ったスマホ&Web開発入門
OSMを使ったスマホ&Web開発入門OSMを使ったスマホ&Web開発入門
OSMを使ったスマホ&Web開発入門Taro Matsuzawa
 
ゆるふわLinux-HA 〜PostgreSQL編〜
ゆるふわLinux-HA 〜PostgreSQL編〜ゆるふわLinux-HA 〜PostgreSQL編〜
ゆるふわLinux-HA 〜PostgreSQL編〜Taro Matsuzawa
 
AFNetworking使ってみた
AFNetworking使ってみたAFNetworking使ってみた
AFNetworking使ってみたTaro Matsuzawa
 
スマホ開発者も使えるWireshark
スマホ開発者も使えるWiresharkスマホ開発者も使えるWireshark
スマホ開発者も使えるWiresharkTaro Matsuzawa
 
来年のLLeventのお知らせ @ OSC2011 Tokyo/Fall
来年のLLeventのお知らせ @ OSC2011 Tokyo/Fall来年のLLeventのお知らせ @ OSC2011 Tokyo/Fall
来年のLLeventのお知らせ @ OSC2011 Tokyo/FallTaro Matsuzawa
 
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたスマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたTaro Matsuzawa
 
ベトナムにRoRを教えに行ったら大変なお土産をもらったでござる
ベトナムにRoRを教えに行ったら大変なお土産をもらったでござるベトナムにRoRを教えに行ったら大変なお土産をもらったでござる
ベトナムにRoRを教えに行ったら大変なお土産をもらったでござるTaro Matsuzawa
 
デバッガを使おう@ブラウザ勉強会#1
デバッガを使おう@ブラウザ勉強会#1デバッガを使おう@ブラウザ勉強会#1
デバッガを使おう@ブラウザ勉強会#1Taro Matsuzawa
 
(元)コミュニティメンバーから見たMozilla / Firefoxの歴史と展望@Browser Workshop
(元)コミュニティメンバーから見たMozilla / Firefoxの歴史と展望@Browser Workshop(元)コミュニティメンバーから見たMozilla / Firefoxの歴史と展望@Browser Workshop
(元)コミュニティメンバーから見たMozilla / Firefoxの歴史と展望@Browser WorkshopTaro Matsuzawa
 
Mozilla コアハッカー育成計画(PDF)
Mozilla コアハッカー育成計画(PDF)Mozilla コアハッカー育成計画(PDF)
Mozilla コアハッカー育成計画(PDF)Taro Matsuzawa
 
Mozilla コアハッカー育成計画
Mozilla コアハッカー育成計画Mozilla コアハッカー育成計画
Mozilla コアハッカー育成計画Taro Matsuzawa
 

Plus de Taro Matsuzawa (16)

タイルの話
タイルの話タイルの話
タイルの話
 
地球地図を利用した地図タイルの作成 - FOSS4G TOKYO 2014 全体セッション2
地球地図を利用した地図タイルの作成 - FOSS4G TOKYO 2014 全体セッション2地球地図を利用した地図タイルの作成 - FOSS4G TOKYO 2014 全体セッション2
地球地図を利用した地図タイルの作成 - FOSS4G TOKYO 2014 全体セッション2
 
Couchbase hackaton pomo
Couchbase hackaton pomoCouchbase hackaton pomo
Couchbase hackaton pomo
 
11月のささみ: pgRoutingって何?
11月のささみ: pgRoutingって何?11月のささみ: pgRoutingって何?
11月のささみ: pgRoutingって何?
 
OSMを使ったスマホ&Web開発入門
OSMを使ったスマホ&Web開発入門OSMを使ったスマホ&Web開発入門
OSMを使ったスマホ&Web開発入門
 
ゆるふわLinux-HA 〜PostgreSQL編〜
ゆるふわLinux-HA 〜PostgreSQL編〜ゆるふわLinux-HA 〜PostgreSQL編〜
ゆるふわLinux-HA 〜PostgreSQL編〜
 
AFNetworking使ってみた
AFNetworking使ってみたAFNetworking使ってみた
AFNetworking使ってみた
 
スマホ開発者も使えるWireshark
スマホ開発者も使えるWiresharkスマホ開発者も使えるWireshark
スマホ開発者も使えるWireshark
 
来年のLLeventのお知らせ @ OSC2011 Tokyo/Fall
来年のLLeventのお知らせ @ OSC2011 Tokyo/Fall来年のLLeventのお知らせ @ OSC2011 Tokyo/Fall
来年のLLeventのお知らせ @ OSC2011 Tokyo/Fall
 
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたスマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
 
ベトナムにRoRを教えに行ったら大変なお土産をもらったでござる
ベトナムにRoRを教えに行ったら大変なお土産をもらったでござるベトナムにRoRを教えに行ったら大変なお土産をもらったでござる
ベトナムにRoRを教えに行ったら大変なお土産をもらったでござる
 
デバッガを使おう@ブラウザ勉強会#1
デバッガを使おう@ブラウザ勉強会#1デバッガを使おう@ブラウザ勉強会#1
デバッガを使おう@ブラウザ勉強会#1
 
(元)コミュニティメンバーから見たMozilla / Firefoxの歴史と展望@Browser Workshop
(元)コミュニティメンバーから見たMozilla / Firefoxの歴史と展望@Browser Workshop(元)コミュニティメンバーから見たMozilla / Firefoxの歴史と展望@Browser Workshop
(元)コミュニティメンバーから見たMozilla / Firefoxの歴史と展望@Browser Workshop
 
デコメを送る
デコメを送るデコメを送る
デコメを送る
 
Mozilla コアハッカー育成計画(PDF)
Mozilla コアハッカー育成計画(PDF)Mozilla コアハッカー育成計画(PDF)
Mozilla コアハッカー育成計画(PDF)
 
Mozilla コアハッカー育成計画
Mozilla コアハッカー育成計画Mozilla コアハッカー育成計画
Mozilla コアハッカー育成計画
 

Dernier

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Dernier (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

スマートフォン勉強会@関東 #11 LT 5分で語る SQLite暗号化

  • 1. 5 SQLite Taro Matsuzawa aka. btm (@smellman) sumaben@kanto #11 Lightning Talk
  • 2. SQLite • iPhone SQL • • Firefox
  • 3. • JB • Blob
  • 4. sqlcipher • SQLite • SQLite • iPhone
  • 5. 1 $ sudo mkdir -p /opt/smartphone/lib $ sudo chown -R btm:staff /opt/smartphone $ cd /opt/smartphone/lib/ $ git clone git://github.com/sjlombardo/sqlcipher.git $ curl -O ftp://ftp.infoscience.co.jp/pub/Crypto/SSL/openssl/source/openssl-1.0.0a.tar.gz $ git clone git://github.com/sjlombardo/openssl-xcode.git $ tar zxf openssl-1.0.0a.tar.gz $ cp -fr openssl-xcode/openssl.xcodeproj openssl-1.0.0a/ $ mv openssl-1.0.0a openssl
  • 6. 2 • XCode • • SQLCIPHER_SRC SQLCipher • SQLCIPHER_SRC:/opt/smartphone/lib/sqlcipher • OPENSSL_SRC OpenSSL • OPENSSL_SRC:/opt/smartphone/lib/openssl
  • 7. 3 • XCode -> • OpenSSL openssl.xcodeproj • • SQLCipher sqlcipher.xcodeproj
  • 8. 4 • SQLCipher OpenSSL • sqlcipher.xcodeproj -> • SQLCIPHER_SRC • openssl.xcodeproj -> • OPENSSL_SRC
  • 9. 5 • XCode -> "SQLCipherTest" • + • OpenSSL crypto SQLCipher sqlcipher • • • $(SQLCIPHER_SRC) $(OPENSSL_SRC)
  • 10. 6 • sqlcipher.xcodeproj libsqlcipher.a • openssl.xcodeproj libcrypto.a • SQLITE_HAS_CODEC=1
  • 11. SQL • PRAGMA key = 'default_key'; • sqlcipher • • FMDatabase • FMDatabase setKey
  • 12. ! NSString* key = @"TaroMatsuzawaIsDead"; ! NSString* newKey = [key stringByAppendingString: [[UIDevice currentDevice] uniqueIdentifier]]; ! if (![rootViewController.encdb setKey:key]) ! ! NSLog(@"> Could not set key.");
  • 13. URL • sqlcipher • http://sqlcipher.net/ • sqlcipher document • http://sqlcipher.net/documentation • openssl-xcode • https://github.com/sjlombardo/openssl-xcode • FMDatabase • https://github.com/ccgus/fmdb
  • 14. • $ sudo port install openssl $ mkdir -p ~/develop/sqlcipher $ cd ~/develop/sqlcipher $ git clone git://github.com/sjlombardo/sqlcipher.git $ cd sqlcipher $ ./configure CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/opt/local/lib/libcrypto.a" $ make $ ~/develop/sqlcipher/sqlcipher/sqlite3 sqlite3.db SQLite version 3.7.2 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .read /Users/btm/develop/( )/schema.sql sqlite> PRAGMA key = 'default_key';