hello friends! new(ish)!

Encryption: Difference between revisions

From InstallGentoo Wiki v2
Jump to navigation Jump to search
>Mrsnooze
(third party phone cracker revealed)
>Galactus
mNo edit summary
Line 6: Line 6:
* Against whom do you want your data protected?
* Against whom do you want your data protected?


== Full Disk Encryption ==
== Full disk encryption ==
Full Disk Encryption (FDE) is the process of turning your regular HDD stored files into cyphertext, so that anyone gaining access to your physical HDD (e.g. Thieves stealing your PC, LEA kicking your door in) cannot read the contents of your hard drive without knowing an encryption key.
Full Disk Encryption (FDE) is the process of turning your regular HDD stored files into cyphertext, so that anyone gaining access to your physical HDD (e.g. Thieves stealing your PC, LEA kicking your door in) cannot read the contents of your hard drive without knowing an encryption key.


Line 13: Line 13:
=== Windows ===
=== Windows ===
{{neutral}}
{{neutral}}
{{warning|[[Windows]], since Windows NT Workstation 4, has contained a well-known NSA back door. However, [[Windows 7]] and below are considered ''relatively safe'' (if you remove the telemetry updates). If you are using [[Windows 10]], nothing here will help you and you are truly stupid for using it. That is not a joke like "install gentoo" or "Google is a botnet" is. This is a fact. '''DO NOT USE WINDOWS 10'''}}
{{warning|[[Windows]], since Windows NT Workstation 4, has contained a well-known NSA back door. However, [[Windows 7]] and below are considered ''relatively safe'' (if you remove the telemetry updates). Windows 10 is highly malicious, and has been proven time and time again to '''not only''' ''datamine and steal user information'', but it '''has been designed to do this'''. Continue at your own risk.}}


Bitlocker was reported to have been [https://firstlook.org/theintercept/2015/03/10/ispy-cia-campaign-steal-apples-secrets/ attacked in 2010] through ElectroMagnetic leaking of cryptographic keys from the TPM chip. [https://d2.maxfile.ro/cvcpumdqtf.png archive-part1] [https://d2.maxfile.ro/trvuqojsdv.png archived-part2] [https://www.schneier.com/blog/archives/2015/06/encrypting_wind.html Bruce Schneier] [https://web.archive.org/web/20160129022320/https://www.schneier.com/blog/archives/2015/06/encrypting_wind.html archived] and [https://firstlook.org/theintercept/2015/04/27/encrypting-laptop-like-mean/ The Intercept] still recommend the software. [https://d2.maxfile.ro/xsdkzytcgm.png archived] Do your own research.
Bitlocker was reported to have been [https://firstlook.org/theintercept/2015/03/10/ispy-cia-campaign-steal-apples-secrets/ attacked in 2010] through ElectroMagnetic leaking of cryptographic keys from the TPM chip. [https://d2.maxfile.ro/cvcpumdqtf.png archive-part1] [https://d2.maxfile.ro/trvuqojsdv.png archived-part2] [https://www.schneier.com/blog/archives/2015/06/encrypting_wind.html Bruce Schneier] [https://web.archive.org/web/20160129022320/https://www.schneier.com/blog/archives/2015/06/encrypting_wind.html archived] and [https://firstlook.org/theintercept/2015/04/27/encrypting-laptop-like-mean/ The Intercept] still recommend the software. [https://d2.maxfile.ro/xsdkzytcgm.png archived] Do your own research.
Line 52: Line 52:
iPhone are widely regarded as the most secure phones/pads, so long as you trust [[Apple]].
iPhone are widely regarded as the most secure phones/pads, so long as you trust [[Apple]].


==== 2016 FBI vs Apple Debate ====
==== 2016 FBI vs Apple debate ====
{{developing}}
{{developing}}
Cryptowars 2.0 began in February 2016 over a [[Wikipedia:2015_San_Bernardino_shooting |terrorist]] who owned an iPhone.
Cryptowars 2.0 began in February 2016 over a [[Wikipedia:2015_San_Bernardino_shooting |terrorist]] who owned an iPhone.
Line 69: Line 69:
As of 2016.03.21, The FBI thinks it can [http://arstechnica.com/tech-policy/2016/03/fbi-says-it-might-be-able-to-break-into-seized-iphone-wants-hearing-vacated/ break into the phone] with [https://apple.slashdot.org/story/16/03/23/1853206/fbi-hires-cellebrite-to-crack-san-bernadino-iphone#comments some israeli forensics company]. This is a backstep from the real issue, which is about setting a precident of backdooring [[Encryption |encryption]].
As of 2016.03.21, The FBI thinks it can [http://arstechnica.com/tech-policy/2016/03/fbi-says-it-might-be-able-to-break-into-seized-iphone-wants-hearing-vacated/ break into the phone] with [https://apple.slashdot.org/story/16/03/23/1853206/fbi-hires-cellebrite-to-crack-san-bernadino-iphone#comments some israeli forensics company]. This is a backstep from the real issue, which is about setting a precident of backdooring [[Encryption |encryption]].


== Single File Encryption ==
== Single file encryption ==


Beyond Full Disk Encryption, a single file can be encrypted with ease. Several programs such as 7Zip, WinRAR and WinZip can encrypt one of more files.
Beyond Full Disk Encryption, a single file can be encrypted with ease. Several programs such as 7Zip, WinRAR and WinZip can encrypt one of more files.


=== OpenSSL File Encryption ===
=== OpenSSL file encryption ===


The standard linux utility openssl can encrypt files:
The standard linux utility openssl can encrypt files:
Line 81: Line 81:
You will be prompted for a password.
You will be prompted for a password.


== Web Encryption ==
== Web encryption ==


Everything you view/submit to a website is readable by third parties without encryption.
Everything you view/submit to a website is readable by third parties without encryption.
Line 94: Line 94:
* Firefox uses it's own Certificate store.
* Firefox uses it's own Certificate store.


== Communication Encryption ==
== Communication encryption ==


Beyond file encryption there is communication encryption, which is essentially file-in-transit encrption. This sections covers technologies referring to chats/texts/email/similar.
Beyond file encryption there is communication encryption, which is essentially file-in-transit encrption. This sections covers technologies referring to chats/texts/email/similar.
Line 100: Line 100:
There are generally two types of communication encryption:
There are generally two types of communication encryption:


=== Serverside Encryption ===
=== Serverside encryption ===
Serverside encryption encrypts your message to the server only, and then out to yout recipient. This method relies completely on trusting the server to not read your message and not be compromised by a third party.
Serverside encryption encrypts your message to the server only, and then out to yout recipient. This method relies completely on trusting the server to not read your message and not be compromised by a third party.


=== End to End Encryption ===
=== End-to-end encryption ===
End to End encryption works on the principal that only the sender and recipient can understand the message being sent. Any third party (including any server the message is sent through) will not be able to decrypt the message. This is the preferred method for all communications.
End to End encryption works on the principal that only the sender and recipient can understand the message being sent. Any third party (including any server the message is sent through) will not be able to decrypt the message. This is the preferred method for all communications.


Line 109: Line 109:
[[PGP]] allows for secure message bodies within email. Sender/Recipients are still plaintext, which is [https://www.techdirt.com/articles/20140511/06390427191/michael-hayden-gleefully-admits-we-kill-people-based-metadata.shtml enough to kill you].
[[PGP]] allows for secure message bodies within email. Sender/Recipients are still plaintext, which is [https://www.techdirt.com/articles/20140511/06390427191/michael-hayden-gleefully-admits-we-kill-people-based-metadata.shtml enough to kill you].


== Encryption Standards ==
== Encryption standards ==
Wikipedia maintains a great article on [[Wikipedia:Encryption |Encryption]].
Wikipedia maintains a great article on [[Wikipedia:Encryption |Encryption]].
Stuff you've probably heard of:
Stuff you've probably heard of:
Line 116: Line 116:
* [[Wikipedia:Serpent_%28cipher%29 |Serpent]], the more secure but more CPU intensive cipher that competed for the AES title.
* [[Wikipedia:Serpent_%28cipher%29 |Serpent]], the more secure but more CPU intensive cipher that competed for the AES title.


== Cryptology in Applications ==
== Cryptology in applications ==


The best and easiest to use public key crypto library is [http://nacl.cr.yp.to NaCl]. Don't even try creating your own crypto algorithm or using another shitty library. The important part with crypto is ''always use enough randomness in your keys''. If you don't, [http://tobtu.com/decryptocat-old.php this] happens (you can't really have this problem with NaCl though). The other important part is ''always use a unique nonce''.
The best and easiest to use public key crypto library is [http://nacl.cr.yp.to NaCl]. Don't even try creating your own crypto algorithm or using another shitty library. The important part with crypto is ''always use enough randomness in your keys''. If you don't, [http://tobtu.com/decryptocat-old.php this] happens (you can't really have this problem with NaCl though). The other important part is ''always use a unique nonce''.
Line 132: Line 132:
- The keys are only 256 bits (It's ECC), and it's as secure as RSA 3072.
- The keys are only 256 bits (It's ECC), and it's as secure as RSA 3072.


= Other Links =
= Other links =


[http://crunchbang.org/forums/viewtopic.php?id=24722 This Crunchbang forum] post [https://archive.is/8mBMd archived] (named "The Paranoid Crunchbang Security Guide") has tools and techniques that specifically apply to #!++ (Crunchbang Plus-Plus), but easily applies to other distros as well. Very good resource.  
[http://crunchbang.org/forums/viewtopic.php?id=24722 This Crunchbang forum] post [https://archive.is/8mBMd archived] (named "The Paranoid Crunchbang Security Guide") has tools and techniques that specifically apply to #!++ (Crunchbang Plus-Plus), but easily applies to other distros as well. Very good resource.  

Revision as of 20:24, 24 March 2016

Encryption is the art of encoding messages in a way that only the intended, authorized person may read it. According to Edward Snowden, strong, tested cryptographic encryption systems were said to be one of the few remaining things that work (i.e. haven't been compromised by the NSA), and that people can still rely on.

Encryption covers many areas of computing and covers many levels of Security. While there are no Silver Bullets to protect yourself, you can guard against many adversaries via encryption techniques.

It is recommended that you define your adversary before continuing, because encryption is a defensive tactic and is only useful against known offensive tactics. In short:

  • Against whom do you want your data protected?

Full disk encryption

Full Disk Encryption (FDE) is the process of turning your regular HDD stored files into cyphertext, so that anyone gaining access to your physical HDD (e.g. Thieves stealing your PC, LEA kicking your door in) cannot read the contents of your hard drive without knowing an encryption key.

Full Disk Encryption is useless when your PC is running. Once your FDE drive is unlocked/deciphered any running program or user can read everything in it.

Windows

Scales.png
Scales.png
NEUTRALITY DISPUTED
This article may break IG:NEUTRAL. Relevant discussion may be found on the talk page. Reason: No reason specified.
Warning: Windows, since Windows NT Workstation 4, has contained a well-known NSA back door. However, Windows 7 and below are considered relatively safe (if you remove the telemetry updates). Windows 10 is highly malicious, and has been proven time and time again to not only datamine and steal user information, but it has been designed to do this. Continue at your own risk.

Bitlocker was reported to have been attacked in 2010 through ElectroMagnetic leaking of cryptographic keys from the TPM chip. archive-part1 archived-part2 Bruce Schneier archived and The Intercept still recommend the software. archived Do your own research.

Since Microsoft's operating system is proprietary software, it is possible that the Bitlocker encryption is backdoored.

TrueCrypt has been abandoned since 05/2014. A crypto audit completed in 05/2015 reports it as 'a well-designed piece of software with only minor issues'. VeraCrypt, a fork from TrueCrypt, continues its development. This is technically illegal (as the TrueCrypt software license does not allow forks), but there is little chance of the original TrueCrypt developers launching a lawsuit against VeraCrypt.

OS X

Much like Windows, there is no safe option for bulk symmetric encryption on OS X. FileVault, while offering strong encryption, is only acceptable if you're hiding files from thieves and simple adversaries. This is because Apple's FileVault is, of course, proprietary software.

GNU/Linux

dm-crypt + LUKS

dm-crypt + LUKS is the recommended encryption solution for GNU/Linux. It comes with the kernel. Since version 1.6, cryptsetup supports TrueCrypt containers natively, so there's no need to install TrueCrypt or tc-play.

Take note of the --iter-time parameter while creating a dm-crypt volume. This creates a time delay to guard against brute force attacks, which the FBI have shown archived that they have problems attacking. archived

The Arch Linux Wiki maintains a fantastic guide on dm-crypt which is applicable to most Linux distributions.

tc-play

tc-play A FOSS Truecrypt implementation to replace the official version. Supports most of Truecrypt's features. Nowadays useful only for reading your Truecrypt volume and migrating it to dm-crypt.

VeraCrypt

VeraCrypt, TrueCrypt's successor. Is cross-platform and has a TrueCrypt compatibility mode for those with old TC disks.

Android

Both stock and third party (e.g. cyanogenmod, omnirom) Android Roms allow for device encryption. They all use the linux kernel dm_crypt encryption options. This will keep out most non-lea actors.

Be aware that any phone which can be flashed with a custom rom can also be flashed with a malicious rom (i.e. any phone which cyanogenmod can be flashed on can also be flashed with fbi-nsa-fiveeyes.rom). Any phone locked to a telco provider (e.g. AT&T only) is probably compromised by US LEA too.

The best defense is a good password.

Your pincode sucks btw.

iOS

iPhone are widely regarded as the most secure phones/pads, so long as you trust Apple.

2016 FBI vs Apple debate

Clock.gif
Clock.gif
DEVELOPING

This section/page details a currently developing event. During this time, misinformation may be produced, and changes may be made frequently. Please keep this in mind when reading this section and/or page.

Cryptowars 2.0 began in February 2016 over a terrorist who owned an iPhone. The FBI demanded that Apple provided a custom firmware to flash upon the terrorist's phone which would:

  • Allow more than 10 password guesses per hour.
  • Not allow the phone to wipe itself after 10 bad guesses.
  • Allow guesses to be made via usb/whatever interface, rather than the touchscreen.

i.e. circumvent all the regular iPhone protections against a brute force attack on it's password.

This has been widely seen as an attempt to set a judicial precedent by the US government so that future criminal/"criminal" cases can allow encyption to be bypassed/criminalised.

As of 2016.03.21, The FBI thinks it can break into the phone with some israeli forensics company. This is a backstep from the real issue, which is about setting a precident of backdooring encryption.

Single file encryption

Beyond Full Disk Encryption, a single file can be encrypted with ease. Several programs such as 7Zip, WinRAR and WinZip can encrypt one of more files.

OpenSSL file encryption

The standard linux utility openssl can encrypt files:

  • Encoding: $ openssl enc -aes-256-cbc -in plaintext.file -out cyphertext.file
  • Decoding: $ openssl enc -aes-256-cbc -d -in cyphertext.file > plaintext.file

You will be prompted for a password.

Web encryption

Everything you view/submit to a website is readable by third parties without encryption. The standard encryption method is HTTPS (HTTP Secure) which uses SSL/TLS encryption to communicate with a website. This is the standard encryption protocol which your GMail/Online Banking/eBay interactions use.

HTTPS is dependant upon Certificate Authorities (CAs), such as Comodo and Verisign which cryptographically sign Certificates to confirm that the website you're connecting to is who it says it is, rather than some random hacker. Your operating system/browser has a number of certificates which it trusts, and those trusted certificates are compared against the website that you're accessing.

For e.g. The wiki.installgentoo.com is signed/verified by Let's Encrypt.

If the website you're visiting gives an invalid certificate, your browser will complain.

  • IE and Chrome/Chromium use the System Certificate store.
  • Firefox uses it's own Certificate store.

Communication encryption

Beyond file encryption there is communication encryption, which is essentially file-in-transit encrption. This sections covers technologies referring to chats/texts/email/similar.

There are generally two types of communication encryption:

Serverside encryption

Serverside encryption encrypts your message to the server only, and then out to yout recipient. This method relies completely on trusting the server to not read your message and not be compromised by a third party.

End-to-end encryption

End to End encryption works on the principal that only the sender and recipient can understand the message being sent. Any third party (including any server the message is sent through) will not be able to decrypt the message. This is the preferred method for all communications.

PGP

PGP allows for secure message bodies within email. Sender/Recipients are still plaintext, which is enough to kill you.

Encryption standards

Wikipedia maintains a great article on Encryption. Stuff you've probably heard of:

  • AES, the standard web encryption protocol which is publicly available to use and was the winner of the AES competition (originally known as Rijndael).
  • Twofish, a competitior of AES.
  • Serpent, the more secure but more CPU intensive cipher that competed for the AES title.

Cryptology in applications

The best and easiest to use public key crypto library is NaCl. Don't even try creating your own crypto algorithm or using another shitty library. The important part with crypto is always use enough randomness in your keys. If you don't, this happens (you can't really have this problem with NaCl though). The other important part is always use a unique nonce.

NaCl is real easy to use, just use crypto_box_keypair() to generate a public/private keypair, use crypto_box() to encrypt data and use crypto_box_open() to decrypt it (This is the only function that you need to check the return value, it returns -1 if the decryption failed). Why does crypto_box() use your private key to encrypt a message you ask? That's so the other can check if that encrypted message really came from you, the same reason why crypto_box_open() takes the public guy of the guy who sent you the encrypted data.

If you have a grain of intelligence, before using NaCl for anything you will read everything on the website, especially this page.

- Why NaCl?

- It's secure (Authentication, protection against timing attacks, etc..)

- It's fast (RSA is very slow, and the RSA was backdoored by the NSA).

- The keys are only 256 bits (It's ECC), and it's as secure as RSA 3072.

Other links

This Crunchbang forum post archived (named "The Paranoid Crunchbang Security Guide") has tools and techniques that specifically apply to #!++ (Crunchbang Plus-Plus), but easily applies to other distros as well. Very good resource.

This archived is an explanation into why TrueCrypt is still safe to use, as well as this.

Here and here are both links to TrueCrypt's spiritual successor, VeraCrypt.

Bitlocker and FileVault links are here if you are absolutely fucking retarded and haven't read a single thing on this page. Cat photos only.

Also check Fucko for other tips.