Symmetric Cryptography and Asymmetric Cryptography (Symmetric Encryption Asymmetric Encryption and)
Encryption or Encryption Standard Data
Symmetric cryptography is a cryptographic method which uses the same key to encrypt and decrypt messages. The two communicating parties have to agree in advance on the key to use. Once both have access to this key, the sender encrypts a message using it, send it to the recipient, and the receiver decrypts with it.Security
A good cipher puts all the security in the key and nothing in the algorithm. In other words, it should be of no help to an attacker to know the algorithm being used. Only if he obtains the key would knowledge of the algorithm. Encryption algorithms are widely used these properties (for example, GnuPG on GNU).Since all the security is the key, it is important to be very difficult to guess the key. This means that the range of possible keys, ie, the space of possible keys must be broad. Richard Feynman was famous in Los Alamos for its ability to crack safes, to fuel the legend that he had around him, carried around a set of tools including a stethoscope. In fact, he used a variety of tricks to reduce the amount a small number of combinations to be tested, and then simply guessed until he found the right combination. In other words, reducing the size of the key space.
Currently, computers can decrypt keys very quickly, and this is the reason why the key size is important in modern cryptosystems. The cipher DES uses a 56-bit key, which means that there are 2 to 56 possible keys (key 72.057.594.037.927.936). This represents a very large number of keys, but a generic computer can check the possible set of keys in a matter of days. A specialized machine can do in hours. Encryption algorithms such as 3DES latest design, Blowfish and IDEA uses 128-bit keys, which means that there are 2 to 128 possible keys. This equates to many more keys, and even if all the machines on the planet cooperated, it would take longer to find the key to the universe's age.
Examples
As an example of symmetric system is Enigma. This was a system used by Germany during World War II, where the daily keys were distributed as code books. Each day, a radio operator, receiver or transmitter would consult his copy of the codebook to find the key of the day. All traffic sent by radio waves on that day was then encrypted and decrypted using the keys of the day.Britain used machines to decrypt the keys during the war and although the aforementioned German system, Enigma, was fitted with a large key, the British built specialized computing engines, the Bombes to check the keys mechanically until the key the day was found. This meant that sometimes they found the day's key within hours after it was put in use, but also on other days could not find the right key. The Bombes were not general-purpose computers, but the forerunners of computers (PCs) today.
Some examples of symmetric ciphers include 3DES, AES, Blowfish and IDEA.
Drawbacks
Another problem is the number of keys needed. If there are n people who need to communicate with each other, it takes n / 2 keys for each pair of people who have to communicate privately. This can work with a small group of people, but it would be impossible to carry out larger groups.
Asymmetric Cryptography
Asymmetric cryptography is the cryptographic method that uses a key pair for sending messages. The two keys belong to the same person who sent the message. One key is public and can be delivered to any person, the other key is private and the owner must keep it so that nobody has access to it. Also, cryptographic methods ensure that key pair can be generated only once, so you can assume it is not possible for two people happened to have obtained the same key pair.If the sender uses the recipient's public key to encrypt the message once encrypted, only the recipient's private key can decrypt this message, since it is the only one who knows. Therefore confidentiality is achieved sending the message, no one but the recipient can decrypt it.
If the key pair owner uses his private key to encrypt the message, anyone can decrypt it using your public key. In this case is achieved by both the sender authentication identificacióny, since it is known that only could have been he who employed his private key (unless someone could have stolen it). This idea is the foundation of electronic signatures.
Systems of public key encryption or asymmetric ciphers were invented in order to completely avoid the problem of key exchange for symmetric ciphers. With the public key is not necessary for the sender and receiver agree on the key used. All that is required is that before secret communication the sender gets a copy of the recipient's public key. Moreover, the same public key can be used by anyone wishing to communicate with its owner. Therefore, we need only n key pairs for each n people to communicate.
Bases
Encryption systems are based on public key-trap functions one way to take advantage of particular properties, such as prime numbers. A function is one way that is easy to compute, while their investment is extremely difficult. For example, it is easy to multiply two prime numbers together to get a composite, but is difficult to factor a composite into its prime components. A function-way trapdoor is similar, but has a "trap". This means that if you know any piece of information would be easy to compute the inverse. For example, if we have a number composed of two prime factors and knowing one of the factors, it is easy to compute the second.Given a public key encryption based on prime factorization, the public key contains a composite of two large prime factors, and the encryption algorithm uses that composite to encrypt the message. The algorithm to decrypt the message requires knowing the prime factors, so decryption is easy if you have the private key containing one of the factors but extremely difficult otherwise.
Security
As with good symmetric ciphers, with a good system of public-key encryption all security rests with the key, not the algorithm. Therefore, the key size is a measure of system security, but does not compare the size of the symmetric encryption key with the public key encryption for security measure. In a brute force attack on a symmetric cipher with a key size of 80 bits, the attacker must try to 280-1 keys to find the right key. In a brute force attack on a public key encryption with a key size of 512 bits, the attacker must factor a composite number encoded in 512 bits (up to 155 decimal digits). The workload for the attacker will be different depending on the cipher he is attacking. While 128 bits is sufficient for symmetric ciphers, given the factoring technology today, we recommend using 1024-bit public keys for most cases.Disadvantages of asymmetric encryption
The biggest advantage of asymmetric cryptography is that you can encrypt and decrypt a key with the other, but this system has several downsides:For the same key length and message you need more processing time.
Keys must be larger than symmetrical.
The encrypted message takes up more space than the original.
The system of elliptic curve cryptography represents a less expensive alternative to these problems.
Tools like PGP, SSH or SSL security layer to the hierarchy of TCP / IP using a hybrid consisting of asymmetric cryptography to exchange symmetric key cryptography and symmetric cryptography to transmit information.
Algorithms
Some algorithms asymmetric key techniques are
- Diffie-Hellman
- RSA
- DSA
- ElGamal
- Elliptic Curve Cryptography
Other asymmetric key algorithms but unsafe:
- Merkle-Hellman algorithms "Knapsack".
- Protocols
Some protocols that use the algorithms mentioned above are
- DSS ("Digital Signature Standard") with the DSA algorithm ("Digital Signature Algorithm")
- PGP
- GPG, an implementation of OpenPGP
- SSH
- SSL, now an IETF standard
- TLS
Comentarios