비밀 디렉토리
개요[편집]
디렉토리를 만들고 그 안에 있는 파일들의 내용과 파일명을 AES (192/256 비트)로 암호화시켜주는 프로그램.
설치방법[편집]
{{#ifeq: msg|user|~|{{#ifeq: misc|user|~ sudo apt-get install encfs|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~ {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}} sudo apt-get install encfs}}}}
아니면 아래 링크를 눌러라.
설치]
사용방법[편집]
두 개의 디렉토리가 필요하다. 하나는 암호화되는 디렉토리이고, 다른 하나는 복호화되어서 정상적으로 보여줄 디렉토리이다. 디렉토리는 반드시 절대경로를 사용해야한다.
encfs 암호대상 복호대상
{{#ifeq: msg|user|~|{{#ifeq: misc|user|~ encfs ~/.secret ~/MySecretFolder|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~ {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}} encfs ~/.secret ~/MySecretFolder}}}}
첫 실행시, 전문가용 모드로 할 것인지 기본 모드로 할 것인지 묻는다. x는 전문가, p는 기본 모드이다. 여기서는 p로 한다.
{{#ifeq: msg|msg| Please choose from one of the following options:|{{#ifeq: misc|msg| Please choose from one of the following options: {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} Please choose from one of the following options: {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
{{#ifeq: msg|msg| enter "x" for expert configuration mode,|{{#ifeq: misc|msg| enter "x" for expert configuration mode, {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} enter "x" for expert configuration mode, {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
{{#ifeq: msg|msg| enter "p" for pre-configured paranoia mode,|{{#ifeq: misc|msg| enter "p" for pre-configured paranoia mode, {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} enter "p" for pre-configured paranoia mode, {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
{{#ifeq: msg|msg| anything else, or an empty line will select standard mode.|{{#ifeq: misc|msg| anything else, or an empty line will select standard mode. {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} anything else, or an empty line will select standard mode. {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
{{#ifeq: msg|msg| ...|{{#ifeq: misc|msg| ... {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} ... {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
{{#ifeq: msg|msg| ?> p|{{#ifeq: misc|msg| ?> p {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} ?> p {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
{{#ifeq: msg|msg| New Encfs Password: |{{#ifeq: misc|msg| New Encfs Password: {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} New Encfs Password: {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
{{#ifeq: msg|msg| Verify Encfs Password: |{{#ifeq: misc|msg| Verify Encfs Password: {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} Verify Encfs Password: {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
시험삼아 파일을 하나 복사해보자.
{{#ifeq: msg|user|~|{{#ifeq: misc|user|~ cp /etc/rc.local ~/MySecretFolder|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~ {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}} cp /etc/rc.local ~/MySecretFolder}}}}
{{#ifeq: msg|user|~|{{#ifeq: misc|user|~ ls -l ~/MySecretFolder|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~ {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}} ls -l ~/MySecretFolder}}}}
{{#ifeq: msg|msg|-rwxr-xr-x 1 seony users 564 Jul 17 13:24 rc.local*|{{#ifeq: misc|msg|-rwxr-xr-x 1 seony users 564 Jul 17 13:24 rc.local* {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} -rwxr-xr-x 1 seony users 564 Jul 17 13:24 rc.local* {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
마운트 명령어를 쳐보면, 암호화 한 디렉토리의 마운트여부를 확인할 수 있다.
{{#ifeq: msg|user|~|{{#ifeq: misc|user|~ mount|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~ {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}} mount}}}}
{{#ifeq: msg|msg| ...|{{#ifeq: misc|msg| ... {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} ... {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
{{#ifeq: msg|msg| encfs on /home/seony/MySecretFolder type fuse.encfs (rw,nosuid,nodev,default_permissions,user=seony)|{{#ifeq: misc|msg| encfs on /home/seony/MySecretFolder type fuse.encfs (rw,nosuid,nodev,default_permissions,user=seony) {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} encfs on /home/seony/MySecretFolder type fuse.encfs (rw,nosuid,nodev,default_permissions,user=seony) {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
(당연하지만) 언마운트는 수퍼유저의 권한이 필요하다.
{{#ifeq: msg|user|~|{{#ifeq: misc|user|~ sudo umount ~/MySecretFolder|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~ {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}} sudo umount ~/MySecretFolder}}}}
암호화된 원본 디렉토리의 내용을 보면 무슨 파일인지 전혀 알 수 없는 파일이 보인다.
{{#ifeq: msg|user|~|{{#ifeq: misc|user|~ ls -l ~/.secret|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~ {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}} ls -l ~/.secret}}}}
{{#ifeq: msg|msg| -rwxr-xr-x 1 seony users 580 Jul 17 13:24 Wnxr6yEg79R6TVHa0fLmZgAm*|{{#ifeq: misc|msg| -rwxr-xr-x 1 seony users 580 Jul 17 13:24 Wnxr6yEg79R6TVHa0fLmZgAm* {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} -rwxr-xr-x 1 seony users 580 Jul 17 13:24 Wnxr6yEg79R6TVHa0fLmZgAm* {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}} {{{2}}}}}}}
암호화된 폴더를 다시 마운트할 때는, 처음 생성할 때 사용했던 명령어를 그대로 사용하면 된다.
{{#ifeq: msg|user|~|{{#ifeq: misc|user|~ encfs ~/.secret ~/MySecretFolder|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~ {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}} encfs ~/.secret ~/MySecretFolder}}}}
AES는 믿음직하며 비교적 충분히 안전하니, 안심해도 된다.