Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
05-15 02:05
관리 메뉴

nomad-programmer

[OS/Windows] SQLCipher (암호와 된 SQLite) 빌드 본문

OS/Windows

[OS/Windows] SQLCipher (암호와 된 SQLite) 빌드

scii 2020. 4. 13. 01:26

간단한 DB를 쓸 때면 SQLite를 사용한다. 그런데 그냥 사용하게되면 DB가 그대로 노출되는 위험에 있다.

그래서 이것저것 알아보던 중 SQLCipher 라는 것을 알게됐다. 이것은 SQLite 데이터를 인간이 알아볼 수 없도록 암호화하여 관리해준다.

SQLite에 접근하려면 Key 값을 알고 있어야 가능하다.

아래의 링크를 통해 SQLCipher를 빌드하였다.

https://github.com/sqlitebrowser/sqlitebrowser/wiki/Win64-setup-%E2%80%94-Compiling-SQLCipher

 

sqlitebrowser/sqlitebrowser

Official home of the DB Browser for SQLite (DB4S) project. Previously known as "SQLite Database Browser" and "Database Browser for SQLite". Website at: - sqlitebrowser/sqlitebr...

github.com

설치하여 암호화 & 복호과 테스트한 캡쳐 사진이다. 아래 사진에서 보다시피 key 값을 주고 테이블을 만들고 데이터를 입력했다.

그 후 틀린 key 값으로 접근하려고하니 데이터베이스 파일이 아니라는 에러가 발생하였다. 올바른 key 값을 주고 다시 접근하니 제대로 되는 것을 볼 수 있다.

암호화 & 복호화 모습

 

아래의 파일은 위의 설치 방법을 참고하면서 셋팅해 놓은 파일이다. 

Makefile.msc
0.08MB

아래의 파일은 빌드할 때 필요한 동적/정적 라이브러리들이다. 저자는 libeay32.lib만을 썼지만 혹시 몰라 libeay32.dll 파일도 함께 올린다.

libeay32.dll
1.59MB
libeay32.lib
0.76MB

 

Python wrapping 

http://charlesleifer.com/blog/encrypted-sqlite-databases-with-python-and-sqlcipher/

 

charles leifer | Encrypted SQLite Databases with Python and SQLCipher

Encrypted SQLite Databases with Python and SQLCipher October 27, 2014 23:20 / peewee python sqlcipher sqlite / 5 comments SQLCipher, created by Zetetic, is an open-source library that provides transparent 256-bit AES encryption for your SQLite databases. S

charlesleifer.com

 

SQLite dll 생성

https://github.com/sqlitebrowser/sqlitebrowser/wiki/Win64-setup-%E2%80%94-Step-8-%E2%80%94-Install-SQLite

 

sqlitebrowser/sqlitebrowser

Official home of the DB Browser for SQLite (DB4S) project. Previously known as "SQLite Database Browser" and "Database Browser for SQLite". Website at: - sqlitebrowser/sqlitebr...

github.com

 

'OS > Windows' 카테고리의 다른 글

[OS/Windows] oh-my-posh  (0) 2023.11.06
[OS/Windows] 키 입력 시각화 App  (0) 2020.01.02
[Windows] MSYS2 를 이용한 MinGW 설치  (0) 2019.12.29
Comments