Encryption in C#
What is Encryption?
Encryption is a way of
scrambling data so that only authorized parties can understand the information.
In technical terms, it is the process of converting human-readable plaintext to
incomprehensible text, also known as ciphertext. In simpler terms, encryption
takes readable data and alters it so that it appears random. Encryption
requires the use of a cryptographic key: a set of mathematical values that both
the sender and the recipient of an encrypted message agree on.
Although encrypted data appears random, encryption happens in a logical, predictable way, allowing a party that receives the encrypted data and possesses the right key to decrypt the data, turning it back into plaintext. Truly secure encryption will use keys complex enough that a third party is highly unlikely to decrypt or break the ciphertext by brute force — in other words, by guessing the key.
Data can be encrypted "at rest," when it
is stored, or "in transit," while it is being transmitted somewhere
else.
What is a key in cryptography?
A cryptographic key is a string of characters used
within an encryption algorithm for altering data so that it appears random.
Like a physical key, it locks (encrypts) data so that only someone with the right
key can unlock (decrypt) it.
What
are the different types of encryption?
There are two main kinds of encryption, these are symmetric encryption and asymmetric encryption. Asymmetric
encryption is also known as public key encryption.
Symmetric Encryption
In symmetric encryption, there is only one key, and all communicating parties
use the same (secret) key for both encryption and decryption.
In Symmetric-key, ciphers use the same secret key for encrypting and decrypting a
message or file. While symmetric-key encryption is much faster than asymmetric
encryption, the sender must exchange the encryption key with the recipient
before he can decrypt it. As companies find themselves needing to securely
distribute and manage huge quantities of keys, most data encryption services
have adapted and use an asymmetric algorithm to exchange the secret key after
using a symmetric algorithm to encrypt data.
Asymmetric Encryption
Asymmetric encryption,
also known as public-key encryption,
is a form of data encryption where the encryption key (also called the public
key) and the corresponding decryption key (also called the private key) are
different. A message encrypted with the public key can be decrypted only with
the corresponding private key. Both the public and private keys are related
mathematically, but it is computationally infeasible to derive the private key
from the public key. Therefore, a recipient could distribute the public key
widely. Anyone can use the public key to encrypt messages for the recipient and
only the recipient can decrypt them.
In asymmetric, or
public key, encryption, there are two keys: one key is used for encryption, and
a different key is used for decryption. The decryption key is kept private
(hence the "private key" name), while the encryption key is shared
publicly, for anyone to use (hence the "public key" name). Asymmetric
encryption is a foundational technology for TLS (often called SSL).
What is Cipher?
In cryptography, a
cipher is an algorithm for performing encryption or decryption—a series of
well-defined steps that can be followed as a procedure.
CHALLENGES
TO CONTEMPORARY ENCRYPTION
The most basic method
of attack on encryption today is brute
force, or trying random keys until the right one is found. Of course, the
length of the key determines the possible number of keys and affects the
plausibility of this type of attack. It is important to keep in mind that
encryption strength is directly proportional to key size, but as the key size
increases so do the number of resources required to perform the computation.
Alternative methods of
breaking a cipher include side-channel attacks and cryptanalysis. Side-channel
attacks go after the implementation of the cipher, rather than the actual
cipher itself. These attacks tend to succeed if there is an error in system
design or execution. Likewise, cryptanalysis means finding a weakness in the
cipher and exploiting it. Cryptanalysis is more likely to occur when there is a
flaw in the cipher itself.
What
is an encryption algorithm?
An encryption algorithm
is the method used to transform data into ciphertext. An algorithm will use the
encryption key in order to alter the data in a predictable way, so that even
though the encrypted data will appear random, it can be turned back into
plaintext by using the decryption key.
What are some common
encryption algorithms?
Commonly used symmetric
encryption algorithms include:
AES
3-DES
SNOW
Commonly used
asymmetric encryption algorithms include:
RSA
Elliptic curve
cryptography
What
is a brute force attack in encryption?
A brute force attack is when an attacker who does not know the
decryption key attempts to determine the key by making millions or billions of
guesses. Brute force attacks are much faster with modern computers, which is
why encryption has to be extremely strong and complex. Most modern encryption
methods, coupled with high-quality passwords, are resistant to brute force
attacks, although they may become vulnerable to such attacks in the future as
computers become more and more powerful. Weak passwords are still susceptible
to brute force attacks.
How
is encryption used to keep Internet browsing secure?
Encryption is
foundational for a variety of technologies, but it is especially important for
keeping HTTP requests and responses secure, and for authenticating website
origin servers. The protocol responsible for this is called HTTPS (Hypertext
Transfer Protocol Secure). A website served over HTTPS instead of HTTP will
have a URL that begins with https:// instead of http://, usually represented by
a secured lock in the address bar.
HTTPS uses the
encryption protocol called Transport
Layer Security (TLS). In the past, an earlier encryption protocol called Secure Sockets Layer (SSL) was the
standard, but TLS has replaced SSL. A website that implements HTTPS will have a
TLS certificate installed on its origin server.
References
1.
https://www.cloudflare.com/learning/ssl/what-is-encryption/
accessed on 25/01/2021
2. https://www.cloudflare.com/learning/ssl/how-does-public-key-encryption-work/
accessed on 25/01/2021
3.
https://blog.keyfactor.com/symmetric-vs-asymmetric-encryption
accessed on 25/01/2021
hi keep it up
ReplyDelete