We are still actively working on the spam issue.

Difference between revisions of "Encryption"

From InstallGentoo Wiki
Jump to: navigation, search
(Created page with "'''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 ...")
 
Line 1: Line 1:
 
'''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''' 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.
 +
 +
 +
== I Want to Implement Crypto Correctly in my Shitty App, What do I do? ==
 +
 +
The best and easiest to use public key crypto library is NaCl:
 +
http://nacl.cr.yp.to/
 +
 +
 +
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: http://tobtu.com/decryptocat-old.php (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).
 +
 +
 +
Easy right?
 +
 +
 +
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: http://nacl.cr.yp.to/box.html
 +
 +
 +
Why NaCL?
 +
 +
1. It's secure (Authentication, protection against timing attacks, etc..)
 +
 +
2. It's fast (RSA is very slow).
 +
 +
3. The keys are only 256 bits (It's ECC), and it's as secure as RSA 3072.
 +
 +
4. It isn't a bloated pile of crap filled with insecure ciphers (OpenSSL)

Revision as of 01:47, 30 January 2014

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.


I Want to Implement Crypto Correctly in my Shitty App, What do I do?

The best and easiest to use public key crypto library is NaCl: http://nacl.cr.yp.to/


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: http://tobtu.com/decryptocat-old.php (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).


Easy right?


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: http://nacl.cr.yp.to/box.html


Why NaCL?

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

2. It's fast (RSA is very slow).

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

4. It isn't a bloated pile of crap filled with insecure ciphers (OpenSSL)