# first download & install the free, open-source TrueCrypt program from http://www.truecrypt.org/downloads.php ls -ld /Applications/TrueCrypt.app ls -l /Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt open -a TrueCrypt 1. click "Create Volume" 2. TrueCrypt Volume Creation Wizard: select "Create a file container" 3. click Next 4. Volume Type: select "Standard TrueCrypt volume" 5. click Next 6. Volume Location: click "Select File ..." 7. navigate to ~/Desktop with the file browser, then click "New Folder" 8. enter "Name of new folder": TrueCrypt, then click Create 9. enter in "Save As": MyTrueCrypt, then click Save 10. Volume Location: the "Select File ..." field should contain /PATH/TO/Desktop/TrueCrypt/MyTrueCrypt 11. click Next 12. Encryption Options: Encryption Algorithm: AES Hash Algorithm: RIPEMD-160 13. click Next 14. Volume Size: 3 MB 15. click Next 16. Volume Password: ********************* (more than 20 characters recommended) 17. click Next 18. Format Options: Filesystem Options: Filesystem type: select FAT 19. click Next 20. Volume Format: Move your mouse as randomly as possible within this window 21. click Format 22. "The TrueCrypt volume has been successfully created." 23. click OK 24. Volume Created 25. click Exit 26. click Close (to quit TrueCrypt) open -a TrueCrypt 1. click "Select File ..." 2. navigate with the file browser to /PATH/TO/Desktop/TrueCrypt/MyTrueCrypt 3. click Open 4. click Mount and enter your password: ********************* 5. double-click: Slot 1 : Volume: /PATH/TO/Desktop/TrueCrypt/MyTrueCrypt Size: ... touch '/Volumes/NO NAME/file.txt' # or copy a text file to '/Volumes/NO NAME' echo 'This is a test!' >> "$_" cat '/Volumes/NO NAME/file.txt' ls -l "$_" # hdiutil unmount '/Volumes/NO NAME' 6. click Dismount 7. click Close # References: # Beginner's Tutorial, http://www.truecrypt.org/docs/?s=tutorial # http://www.truecrypt.org/faq.php # http://blogs.oreilly.com/digitalmedia/2008/03/truecrypt-51-open-source-file.html # http://www.askstudent.com/security/a-step-by-step-guide-on-encrypting-files-using-truecrypt/ # http://techvj.blogspot.com/2007/03/secure-email-attachments-with-truecrypt.html #------------------------------------------------ # download & install OSXCrypt, http://www.osxcrypt.org man ocutil ocutil ocutil create -help kextstat | grep OSXCrypt ioreg -lw 0 | grep -i osxcrypt # Example Usage # Create a 200M volume, FAT formatted, using Seprent-Twofish-AES ocutil create -verbose -fat -algorithm Serpent-Twofish-AES -size 200M MyCryptedVolume.img # The same, but using also keyfiles ocutil create -verbose -fat -keyfiles MyKeyFile1,MyKeyFile2,MyKeyFile3 -algorithm Serpent-Twofish-AES -size 200M MyCryptedVolume.img # The same, but only using the keyfiles ocutil create -verbose -fat -nopass -keyfiles MyKeyFile1,MyKeyFile2,MyKeyFile3 -algorithm Serpent-Twofish-AES -size 200M MyCryptedVolume.img # Create an hidden volume of 100M, FAT formatted, using Serpent-AES, in a previously created volume ocutil create -verbose -hidden -fat -algorithm Serpent-AES -size 100M MyCryptedVolume.img # If the outer volume requires keyfiles you'll have something like ... ocutil create -verbose -hidden -fat -algorithm Serpent-AES -keyfiles MyKeyFile1,MyKeyFile2,MyKeyFile3 -size 100M MyCryptedVolume.img # If you want to add keyfiles to the hidden volumes to an outer volume with keyfiles, your command will be something like ... ocutil create -verbose -hidden -fat -algorithm Serpent-AES -keyfiles MyKeyFile1,MyKeyFile2,MyKeyFile3 -size 100M -hidden_keyfiles MyHiddenKeyFile MyCryptedVolume.img # The same as before but only with keyfiles for the hidden volume ocutil create -verbose -hidden -fat -algorithm Serpent-AES -keyfiles MyKeyFile1,MyKeyFile2,MyKeyFile3 -size 100M -hidden_nopass -hidden_keyfiles MyHiddenKeyFile MyCryptedVolume.img # Attaching a volume ocutil attach -verbose MyCryptedVolume.img # If the volume requires keyfiles ocutil attach -verbose -keyfiles MyKeyFile1,MyKeyFile2,MyKeyFile3 MyCryptedVolume.img # The same as before but only with keyfiles ocutil attach -verbose -nopass -keyfiles MyKeyFile1,MyKeyFile2,MyKeyFile3 MyCryptedVolume.img # Attaching an hidden volume ocutil attach -hidden -verbose MyCryptedVolume.img # Attaching a volume protecting its hidden volume ocutil attach -protect_hidden -verbose MyCryptedVolume.img # Detaching a volume ocutil detach -verbose MyCryptedVolume.img #ocutil detach -verbose device-name # Generating one or more keyfiles ocutil genkey -verbose output1.key [output2.key ...]
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Cross-platform file encryption with TrueCrypt (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» Basic INI file parser for Bash in regex shell osx mac bash windows unix linux file parse microsoft parser builtin ini
» MPlayer on Mac OS X in shell osx mac bash line unix linux mplayer file array video macports youtube audio ln real media codec mediainfo
» Customize system-wide $PATH ... in ssh shell osx mac bash bashrc unix linux file login sshd startup profile git path interactive
» realpath function for Mac OS X in shell osx mac bash resolve unix linux file link directory symlink symbolic path gnu readlink realpath
» Counting files in find shell osx mac bash unix linux count file print0
» Check command paths in Bash in shell osx mac bash command unix linux file type check path builtin
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails