Explain Keyed and Keyless Transposition Ciphers 1.: CSS Page 1
Explain Keyed and Keyless Transposition Ciphers 1.: CSS Page 1
CSS Page 1
○ Authorization: controlling access to resources based on user identity and permissions
○ Non-repudiation: ensuring that a message or transaction cannot be denied by the sender
Correspondingly, there are various security mechanisms that can be used to implement these security services. Some common
security mechanisms include:
○ Encryption: scrambling data to ensure confidentiality
○ Digital signatures: verifying the authenticity and integrity of data
○ Access control lists (ACLs): controlling access to resources based on user identity and permissions
○ Firewalls: controlling network traffic and blocking unauthorized access
○ Intrusion detection and prevention systems (IDPS): monitoring and blocking malicious network traffic
The relationship between security services and mechanisms is that a security mechanism is used to implement a specific
security service. For example, a firewall is a security mechanism that is used to implement the security service of access
control. Similarly, encryption is a security mechanism that is used to implement the security service of confidentiality.
In summary, security services define what needs to be protected, while security mechanisms describe how that protection is
achieved. Understanding the relationship between security services and mechanisms is crucial for designing and implementing
effective security solutions that meet the specific needs of an organization or system.
Advantages of CBC –
• CBC works well for input greater than b bits.
CSS Page 2
• CBC works well for input greater than b bits.
• CBC is a good authentication mechanism.
• Better resistive nature towards cryptanalysis than ECB.
Disadvantages of CBC –
• Parallel encryption is not possible since every encryption requires a previous cipher.
Advantages of CFB –
• Since, there is some data loss due to the use of shift register, thus it is difficult for applying cryptanalysis.
Disadvantages of using CFB –
• The drawbacks of CFB are the same as those of CBC mode. Both block losses and concurrent encryption of several blocks are
not supported by the encryption. Decryption, however, is parallelizable and loss-tolerant.
Advantages of OFB –
• In the case of CFB, a single bit error in a block is propagated to all subsequent blocks. This problem is solved by OFB as it is free
from bit errors in the plaintext block.
Disadvantages of OFB-
• The drawback of OFB is that, because to its operational modes, it is more susceptible to a message stream modification attack
than CFB.
⚫ Counter Mode –
The Counter Mode or CTR is a simple counter-based block cipher implementation. Every time a counter-initiated value is
encrypted and given as input to XOR with plaintext which results in ciphertext block. The CTR mode is independent of feedback
use and thus can be implemented in parallel.
Its simple implementation is shown below:
CSS Page 3
Advantages of Counter –
• Since there is a different counter value for each block, the direct plaintext and ciphertext relationship is avoided. This means
that the same plain text can map to different ciphertext.
• Parallel execution of encryption is possible as outputs from previous stages are not chained as in the case of CBC.
Disadvantages of Counter-
• The fact that CTR mode requires a synchronous counter at both the transmitter and the receiver is a severe drawback. The
recovery of plaintext is erroneous when synchronisation is lost.
Key Features:
Symmetric Key Algorithm: AES uses the same key for both encryption and decryption.
Block Cipher: AES operates on fixed-size blocks of data. The standard block size is 128 bits.
Variable Key Lengths: AES supports key lengths of 128, 192, and 256 bits.
• Encryption Process:
The original key is expanded into a set of round keys using the key schedule algorithm.
• Initial Round:
AddRoundKey: Each byte of the block is XORed with a byte of the round key.
• Main Rounds:
SubBytes: Each byte of the block is substituted with a corresponding byte from the S-box.
ShiftRows: The rows of the block are shifted cyclically a certain number of steps.
MixColumns: Each column of the block is multiplied with a fixed polynomial modulo 4+1x4+1.
AddRoundKey: Each byte of the block is XORed with a byte of the round key.
• Final Round:
SubBytes
ShiftRows
AddRoundKey
CSS Page 4
• Decryption Process:
The decryption process is the reverse of the encryption process:
• Initial Round:
AddRoundKey
• Main Rounds:
InvShiftRows: The rows of the block are shifted cyclically in the opposite direction.
InvSubBytes: Each byte of the block is substituted with a corresponding byte from the inverse S-box.
AddRoundKey: Each byte of the block is XORed with a byte of the round key.
InvMixColumns: Each column of the block is multiplied with a fixed polynomial modulo 4+1x4+1.
• Final Round:
InvShiftRows
InvSubBytes
AddRoundKey
• Security:
AES is designed to be resistant to various cryptographic attacks such as linear and differential cryptanalysis.
The security of AES depends on the secrecy of the key. It is computationally infeasible to decrypt data without knowing the key.
• Usage:
AES is widely used to encrypt data in various applications such as securing communication over the internet, protecting
sensitive data in databases, and securing data stored on devices.
Example:
PlainText: 0x32 0x88 0x31 0xe0 0x43 0x5a 0x31 0x37
Key: 0x2b 0x7e 0x15 0x16 0x28 0xae 0xd2 0xa6
Encrypted: 0x39 0x25 0x84 0x1d 0x02 0xdc 0x09 0xfb
AES has become a widely accepted and widely used encryption standard. It is considered secure and efficient, making it
suitable for a wide range of applications that require data encryption.
CSS Page 5
18. It is efficient with both hardware and software. It is efficient only with hardware.
Database:
The Authentication Server verifies the access rights of users in the database.
Kerberos Overview:
Step-1:
User login and request services on the host. Thus user requests for ticket-granting service.
Step-2:
Authentication Server verifies user’s access right using database and then gives ticket-granting-ticket and session key. Results are
encrypted using the Password of the user.
Step-3:
The decryption of the message is done using the password then send the ticket to Ticket Granting Server. The Ticket contains
authenticators like user names and network addresses.
Step-4:
Ticket Granting Server decrypts the ticket sent by User and authenticator verifies the request then creates the ticket for requesting
services from the Server.
Step-5:
The user sends the Ticket and Authenticator to the Server.
Step-6:
The server verifies the Ticket and authenticators then generate access to the service. After this User can access the services.
Kerberos Limitations:
• Each network service must be modified individually for use with Kerberos
• It doesn’t work well in a timeshare environment
• Secured Kerberos Server
• Requires an always-on Kerberos server
• Stores all passwords are encrypted with a single key
• Assumes workstations are secure
• May result in cascading loss of trust.
• Scalability
Is Kerberos Infallible?
CSS Page 6
Is Kerberos Infallible?
No security measure is 100% impregnable, and Kerberos is no exception. Because it’s been around for so long, hackers have had the
ability over the years to find ways around it, typically through forging tickets, repeated attempts at password guessing (brute
force/credential stuffing), and the use of malware, to downgrade the encryption.
Despite this, Kerberos remains the best access security protocol available today. The protocol is flexible enough to employ stronger
encryption algorithms to combat new threats, and if users employ good password-choice guidelines, you shouldn’t have a problem!
A hash function is a mathematical function that takes an input of arbitrary size and returns a fixed-size output, known as a hash
value or digest. The properties of a hash function are crucial to its security and usability. Here are some of the key properties of a
hash function:
• Determinism: A hash function is deterministic, meaning that given a specific input, it always produces the same output hash
value.
• Collision resistance: It is computationally infeasible to find two distinct inputs that produce the same output hash value. This
property is also known as “collision-free” or “non-collision”.
• Preimage resistance: Given a hash value, it is computationally infeasible to find an input that produces that specific hash value.
This property is also known as “one-way” or “irreversible”.
• Second preimage resistance: Given a hash value, it is computationally infeasible to find another input that produces the same
hash value. This property is also known as “second preimage resistance”.
• Avalanche effect: A small change in the input should result in a significant change in the output hash value. This property helps
to ensure that the hash function is sensitive to changes in the input.
• Quick computation: The hash function should be computationally efficient and fast to compute.
• Uniformity: The hash function should produce uniformly distributed output hash values. This property helps to ensure that the
hash function is resistant to attacks.
• Non-invertibility: It is computationally infeasible to recover the original input from the output hash value.
CSS Page 7
• A hash function is basically performing some calculations in the computer. Data values that are its output are of fixed length. Length
always varies according to the hash function. Value doesn’t vary even if there is a large or small value.
• If given the same input, two hash functions will invariably produce the same output. Even if input data entered differs by a single
bit, huge change in their output values. Even if input data entered differs huge, there is a very minimal chance that the hash values
produced will be identical. If they are equal it is known as “Hash Collision”.
• Converting Hash Codes to their original value is an impossible task to perform. This is the main difference between Encryption as
Hash Function.
10.
CSS Page 8
CSS Page 9