Google News
logo
Cyber Security Interview Questions
Following is a list of main advantages of cyber security :

* Cyber security protects online businesses and transactions against ransomware, malware, online frauds, and phishing.
* It protects the end-users.
* It provides great protection for both data as well as networks.
* It can increase the recovery time after a breach.
* It prevents unauthorized users from accessing sensitive information.
The Open Systems Interconnection (OSI) model is a reference model that describes how applications interact with each other over a computer network. It has seven layers; they are as shown below :
OSI Model
Physical Layer : This is the lowest level of the OSI model. Here, data is converted into an electrical impulse and sent through a physical medium. It is also responsible for the physical connection between the devices.

Data Link Layer : Here, the data packet is encoded and decoded into bits. This layer looks into the node to node delivery of a message.

Network Layer : In this layer, datagrams are transferred from one to another. The functions here are routing and logical addressing.

Transport Layer : This layer is responsible for end-to-end connections. The data in this layer is called segments. This is where TCP and UDP protocols work.

Session Layer : This layer controls signals between computers. The session layer establishes, maintains, and ends connections between processes.

Presentation Layer : It is responsible for translating data into the application layer format. Here, the data is formatted, encrypted, and then sent to the next layer.

Application Layer : Finally, here, services are provided to the end-users. The application layer deals with any sort of data that the application of a machine generates, like a user input such as a password, and so on.  
Unicast, Multicast, and Broadcast are the three methods by which we transmit data over a network. 
 
Unicast : It sends the information from a single user to a single receiver. We use this for point-to-point communications. 

Multicast : Here, data is sent from one or more sources to multiple destinations. 

Broadcast : Broadcast is known as one-to-all, i.e., the communication is between a single user and several receivers.
Cryptography is the study of encrypting and decrypting data to prevent unauthorized access. The ciphertext should be known by both the sender and the recipient. With the advancement of modern data security, we can now change our data such that only the intended recipient can understand it. 
 
Cryptography allows for the secure transmission of digital data between willing parties. It is used to safeguard company secrets, secure classified information, and sensitive information from fraudulent activity, among other things. Crypto means hidden and graph means writing.
 
Encryption is a fundamental component of cryptography, as it jumbles up data using various algorithms. Data encryption is the method of undoing the work done by encrypting data so that it can be read again. Cryptography is dependent on both of these methods.
Cryptography is classified into two categories based on the types of keys and encryption algorithms :
 
  * Symmetric Key Cryptography (Secret key)
  * Asymmetric Key Cryptography (Public key)

Let’s take a closer look at each type.
 
Symmetric Key Cryptography : Also known as Secret Key Cryptography, private key encryption encrypts data using a single key that only the sender and receiver know. The secret key must be known by both the sender and the receiver, but should not be sent across the channel; however, if the hacker obtains the key, deciphering the message will be easier. When the sender and the receiver meet on the handset, the key should be addressed. Although this is not an ideal method. Because the key remains the same, it is simpler to deliver a message to a certain receiver. The data encryption framework (DES Algorithm) is the most widely used symmetric key system.
 
Asymmetric key cryptography : Asymmetric key cryptography, also known as public-key cryptography, consists of two keys, a private key, which is used by the receiver, and a public key, which is announced to the public. Two different keys are used in this method to encrypt and decrypt the data. These two distinct keys are mathematically linked. They are sold in pairs. The public key is accessible to anyone, whereas the private key is only accessible to the person who generates these two keys. 

For example, Bob wants to send an encrypted message to Alice, and they agree to encrypt his message using public-key encryption. The receiver initiates public key encryption to encrypt the sender’s message. The receiver, not the sender, initiates the public key method to encrypt the sender’s message. Everyone has access to the public key. The receiver, Alice, is the only one who has access to the private key. The following is how it works :
 
Step 1 : Alice generates two keys: one public and one private. Alice stores the public key on a public key server that anyone can access.
 
Step 2 : Alice informs Bob of the location of her public key.
 
Step 3 : Bob obtains Alice’s public key by following Alice’s instructions.
 
Step 4 : Bob composes a message and encrypts it with Alice’s public key. Bob sends Alice the encrypted message via the network.
 
Step 5 : Alice decrypts Bob’s message using her private key.
A digital signature is equivalent to a handwritten signature. It is an electronic verification of the sender. Digital signatures are commonly used for software distribution, financial transactions. The digital signature serves three purposes :
 
Authentication : The process or action of proving the sender in cryptography

Non-repudiation : The assurance that someone cannot deny the validity

Integrity : The quality of the message sent and received as it is
The functioning of cryptography revolves around cryptographic algorithms. Cryptographic algorithms or ciphers are mathematical functions that are combined with keys, such as phrase, digit, word, etc., to encrypt text. The effectiveness depends on the strength of the cryptographic algorithms and the secrecy level of the key.
 
Multiple complex combinations of algorithms and keys boost the effectiveness of a cryptosystem.
Some major techniques of Cryptography are listed below :
 
Steganography : One of the oldest techniques of cryptography, steganography involves hiding secret information or messages with no confidential status files in order to avoid detection. Decades ago, steganography was not as sophisticated as it is now. Earlier, invisible ink, slight variations, etc., were used to hide messages. But with the advent of technology, steganography has evolved as one of the commonly used techniques in cryptography.

Hashing : Hashing converts data to be hidden into a unique string. Irrespective of the type or form of data, hashing can be used to hide it. Once hashing is performed, it cannot be decrypted by using just keys.

Simple codes : A language is used to hide the meaning of the sentences written in a different language. The message is written in such a way that it is hard to decipher. In a majority of cases, niche alphabets are used to make the message more complex to read.

Symmetric encryption : It is mainly used for encrypting and decrypting electronic data through a secret key. Substitution ciphers form the base of symmetric encryption. However, nowadays, symmetric encryption is much more than just substitution ciphers. Symmetric encryption is largely used when the message to be encrypted is quite sizable.

Asymmetric encryption : This type of encryption uses two keys, public key, and private key, to encrypt and decrypt plaintext. Anyone with the secret key can decrypt the message. Hence, asymmetric encryption uses two corresponding keys to ensure secrecy.
RSA is an asymmetric cryptographic algorithm. RSA Algorithm that works on a block cipher concept that converts plain text into ciphertext and vice versa at the receiver side. If the public key of User A is used for encryption, we have to use the private key of the same user for decryption.
 
Step 1 : Select two prime numbers p and q where p not equal to q.
 
Step 2 : Calculate n= p*q and z=(p-1)*(q-1)
 
Step 3 : Choose number e: Such that e is less than n, which has no common factor (other than one) with z.
 
Step 4 : Find number d: such that (ed-1) is exactly divisible by 2.
 
Step 5 : Keys are generated using n, d, and e
 
Step 6 : Encryption
 
c=m pow(e) mod n
 
(where m is plain text and c is ciphertext)
 
Step 7 : Decryption
 
m= c pow(d) mod n
 
Step 8 : Public key is shared and the private key is hidden.
 
Note : (e, n) is the public key used for encryption. (d, n) is the private key used for decryption
 
The RSA algorithm has the drawback of being quite inefficient in cases in which large volumes of data must be authenticated by the same virtual machine. A foreign entity must substantiate the dependability of authentication tokens. Data is routed through middlemen, who may corrupt with the cryptosystem.
Data Encryption Standard is a symmetric cipher algorithm and uses the block cipher method for encryption and decryption. DES is the landmark in cryptographic algorithms. It works based on Fiesta Cipher Structure.
 
DES operates on a plaintext block of 64 bits and returns ciphertext of the same size.
 
Step 1 : Sub-key Generation
 
Step 2 : Encryption