# What is the best way to encrypt a single file?



## Just_Johnny (Sep 3, 2009)

I see lots of ways to encrypt entire file systems but how do I encrypt a single file?


----------



## graudeejs (Sep 3, 2009)

security/gnupg
http://forums.freebsd.org/showthread.php?t=6647

http://www.gnupg.org


----------



## Just_Johnny (Sep 3, 2009)

I just intalled security/gnupg no probelm.  I got an error when compiling security/pinetry.

Do you have to use security/pinentry?


```
*** Error code 1

Stop in /usr/ports/graphics/libGL.
*** Error code 1

Stop in /usr/ports/graphics/libGLU.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt33.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt33.
*** Error code 1
```


----------



## caesius (Sep 3, 2009)

We'll need to see more of the error code than that, you've just copied the last few lines, this doesn't actually show where the error occured


----------



## graudeejs (Sep 4, 2009)

qt33? Weird..... are your ports up to date?


----------



## Just_Johnny (Sep 4, 2009)

Yes I'm certain they're up to date.  Do people still use bcrypt?


----------



## anomie (Sep 4, 2009)

An alternative approach (read: no Port installation needed) is encrypting with openssl. 

If bcrypt is your thing, Blowfish is among the enc(1) supported ciphers. 

There is nothing wrong with GnuPG or bcrypt. Just offering up another idea.


----------



## Just_Johnny (Sep 4, 2009)

@anomie

I like it!
Everything you need is already in the base install.   Just makes life simple.

Do you trust this method of encryption? (using bf)


----------



## anomie (Sep 5, 2009)

I personally do trust Blowfish. I just finished a project where I'm encrypting some sensitive data, and my boss insisted on AES, FWIW.


----------

