System Security Unit 1
System Security Unit 1
Plaintext: This is the original message or data that is fed into the
algorithm as input.
• Encryption algorithm: The encryption algorithm performs various
substitutions and transformations on the plaintext.
• Secret key: The secret key is also input to the encryption algorithm.
The exact substitutions and transformations performed by the algorithm
depend on the key.
• Ciphertext: This is the scrambled message produced as output. It
depends on the plaintext and the secret key. For a given message, two
different keys will produce two different cipher texts.
• Decryption algorithm: This is essentially the encryption algorithm run
in reverse. It takes the ciphertext and the secret key and produces the
original plaintext.
Triple DES :- The life of DES was extended by the use of triple DES
(3DES), which involves repeating the basic DES algorithm three times,
using either two or three unique keys, for a key size of 112 or 168 bits.
3DES was first standardized for use in financial applications
3DES has two attractions :- First, it uses 168-bit key length, which
overcomes the vulnerability to brute-force attack of DES.
Second, the algorithm in 3DES is required more scrutiny than any other
encryption algorithm over a longer period of time, due to that effective
cryptanalytic attack is not possible.
Stream cipher
A stream cipher processes the input elements continuously,
producing output one element at a time, as it goes along. i.e. In this
structure a key is input to a pseudorandom bit generator that produces
a stream of 8-bit numbers that are apparently random.
A hash function does not take a secret key as input. Three ways in
which the message can be authenticated using a hash function. The
message digest can be encrypted using symmetric encryption. If it is
assumed that only the sender and receiver share the encryption key,
then authenticity is assured. The message digest can also be encrypted
using public-key encryption. The public-key approach has two
advantages: It provides a digital signature as well as message
authentication; and it does not require the distribution of keys to
communicating parties.
But an even more common approach is the use of a technique that
avoids encryption.
Security of Hash Functions As with symmetric encryption, there
are two approaches to attacking a secure hash function: cryptanalysis
and brute-force attack. As with symmetric encryption algorithms,
cryptanalysis of a hash function involves exploiting logical weaknesses
in the algorithm. The strength of a hash function against brute-force
attacks depends solely on the length of the hash code produced by the
algorithm.
If all these properties are satisfied then we can say that it is strong hash
function.
Secure HASH Function Algorithms :
The most widely used hash function is Secure Hash Algorithm
(SHA). SHA was developed by the National Institute of Standards and
Technology (NIST). SHA-1 produces a hash value of 160 bits.
Three new versions of SHA are defined, with hash value lengths
of 256, 384, and 512 bits, known as SHA-256, SHA-384, and SHA-512.
These new versions, collectively known as SHA-2. SHA-2, particularly
the 512-bit version, would appear to provide unassailable security. This
new hash function, known as SHA-3, was published in 2012 and is now
available as an alternative to SHA-2.
• Intrusion detection: Store the hash value for a file, H (F), for each
file on a system and secure the hash values (e.g., on a CD-R that is
kept secure). One can later determine if a file has been modified by
recomputing H(F). An intruder would need to change F without
changing H (F). This application requires weak second preimage
resistance.
Public-Key Encryption:
Public-key encryption uses in message authentication and key
distribution. Public key encryption, or public key cryptography, is a
method of encrypting data with two different keys and making one of
the keys, the public key, available for anyone to use. The other key is
known as the private key.
When the two parties communicate to each other to transfer the
intelligible or sensible message, referred to as plaintext, is converted
into apparently random nonsense for security purpose referred to as
ciphertext.
Encryption:
The process of changing the plaintext into the ciphertext is
referred to as encryption.The encryption process consists of an
algorithm and a key. The key is a value independent of the plaintext.
The security of conventional encryption depends on the major two
factors:
The Encryption algorithm
Secrecy of the key.
Once the ciphertext is produced, it may be transmitted. The
Encryption algorithm will produce a different output depending on the
specific key being used at the time. Changing the key changes the
output of the algorithm.
Once the ciphertext is produced, it may be transmitted. Upon
reception, the ciphertext can be transformed back to the original
plaintext by using a decryption algorithm and the same key that was
used for encryption.
Asymmetric is a form of Cryptosystem in which encryption and
decryption are performed using different keys-Public key (known to
everyone) and Private Key (Secret key). This is known as Public Key
Encryption.
Digital Signature:-
Public-key encryption can be used for authentication in Digital
signature. In the physical world, it is common to use handwritten
signatures on handwritten or typed messages. They are used to bind
signatory to the message.
Similarly, a digital signature is a technique that binds a person/entity to
the digital data. This binding can be independently verified by receiver
as well as any third party.
Digital signature is a cryptographic value that is calculated from the
data and a secret key known only by the signer.
In real world, the receiver of message needs assurance that the
message belongs to the sender and he should not be able to repudiate
the origination of that message. This requirement is very crucial in
business applications, since likelihood of a dispute over exchanged
data is very high.
Model of Digital Signature
As mentioned earlier, the digital signature scheme is based on public
key cryptography. The model of digital signature scheme is depicted in
the following illustration −
The following points explain the entire process in detail −
Each person adopting this scheme has a public-private key pair.
Generally, the key pairs used for encryption/decryption and
signing/verifying are different. The private key used for signing is
referred to as the signature key and the public key as the
verification key.
Signer feeds data to the hash function and generates hash of
data.
Hash value and signature key are then fed to the signature
algorithm which produces the digital signature on given hash.
Signature is appended to the data and then both are sent to the
verifier.
Verifier feeds the digital signature and the verification key into the
verification algorithm. The verification algorithm gives some value
as output.
Verifier also runs same hash function on received data to generate
hash value.
For verification, this hash value and output of verification algorithm
are compared. Based on the comparison result, verifier decides
whether the digital signature is valid.
Since digital signature is created by ‘private’ key of signer and no
one else can have this key; the signer cannot repudiate signing
the data in future.
Public-Key Certificates:-
A public key certificate is a digitally signed document that serves to
validate the sender's authorization and name. It uses a cryptographic
structure that binds a public key to an entity, such as a user or
organization.
A certificate consists of a public key plus a user ID of the key
owner, with the whole block signed by a trusted third party. The
certificate also includes some information about the third party plus
an indication of the period of validity of the certificate. Typically, the
third party is a certificate authority (CA) that is trusted by the user
community, such as a government agency or a financial institution. A
user can present his or her public key to the authority in a secure
manner and obtain a signed certificate. The user can then publish
the certificate. Anyone needing this user’s public key can obtain the
certificate and verify that it is valid by means of the attached trusted
signature.
Digital Envelopes:
Digital envelope, is used to protect a message without needing to
first arrange for sender and receiver to have the same secret key.
The technique is referred to as a digital envelope. Suppose Bob
wishes to send a confidential message to Alice, but they do not share
a symmetric secret key. Bob does the following:
1. Prepare a message.
2. Generate a random symmetric key that will be used this one time
only.
3. Encrypt that message using symmetric encryption the one-time
key.
4. Encrypt the one-time key using public-key encryption with Alice’s
public key.
5. Attach the encrypted one-time key to the encrypted message and
send it to Alice.