June 24, 2019

Network Security - Comprehensive Paper Solution


Note: This is a previous year comprehensive solutions for your reference, feel free to provide solutions by navigating Submit Question/Answer tab in case you have latest solutions.


1) Jira's password is made of up 6 alphanumeric characters only. One password attempt takes 1 millisecond, What is the time to crack it in days?
i)  If password is case-sensitive.
ii) If password is case- insensitive.

Answer:
i) Case sensitive
 total chars = 26 + 26 + 10 = 62
 possible combinations = 62 ^ 6 passwords
 total time taken = 62 ^ 6 . 1 ms
 approx. 62.62 =~ 3600 sec = 1 hour
 Total time taken = 62. 62. 62. 62 / 1000 hours
 =~ 360. 36 hours = 360.36/24 days
 =~ 360.3/2= 180.3 = 540 days
 Note: 62^4/1000/24 =~ 615 days
 So an approx. answer between 520 to 620 days is good enough.

ii) Case insensitive
 total chars = 26 + 10 = 36
 possible combinations = 36 ^ 6 passwords
 total time taken = 36 ^ 6 . 1 ms
 = 36.36.36./ 1000 . 36 ^3
 =~ 36. 36 ^ 3 seconds
 = 36. 36. 36. 36 / 3600 hours
  = 466 hours
 =~ 19 days
 So an approx. answer between 18 to 20 days is good enough.

2) What is a self-signed SSL certificate ?  Detail on the security perspective when a website is using a self-signed SSL certificate.

Answer:
A certificate not-signed by a Publicly trusted CA, but signed by a locally setup CA server is a self-signed certificate. Any entity/website/server using a self-signed SSL certificate cannot be trusted and very commonly used in phising attacks. I can setup a server to act as gmail.com fradulently by creating a self-signed certificate for www.gmail.com and deploying it in the server.

Most standard browsers – Firefox, Google Chrome, Safari, etc. throw errors when trying to browse to websites having self-signed certificates.

3) How to avoid man-in-the-middle attack in SSH sessions? Show passwordless SSH logins at work.

Answer:
Man-in-the-middle attack is at-work when a client C logs in to a server M thinking it is server S and the client C is unable to detect it. In this case, the server M has successfully duped the client C and has forged a man-in-the-middle attack. So it can be a passive two-way data forwarder between client C and the actual server S, or an active data-mangler.
Every host server in SSH have their public keys sent to the client in the Key Exchange., which gets stored in client’s .ssh/known_hosts file. So the next time, client connects to the host, the server sent public key is matched with the client’s .ssh/known_hosts file and if there is a mismatch, SSH does not connect. So this SSH behavior effectively thwarts a middle server M trying to pose as actual server S.
Password less SSH logins happen via public keys.
Consider Client C connecting to Server S. In server S side, in file .ssh/authorized_keys, there should be entry containing client C’s public key. Then the server S will use it to exchange - encrypting/signing initial key exchange material with the client C. Because of the property that any data encrypted with public key can only be decrypted using the matching private key, this mechanism automatically authenticates the client C as only client C holds the private key. Client’s private key file are usually stored in file .ssh/id_rsa or .ssh/id_dsa depending on the public key algorithm chosen.

June 14, 2019

Discrete Structures for Computer Science - MCQS


 

Note: We have tried to upload as much as we can, all the question and answers might be shuffled - Please find the answer below each question, some answers might be wrong please review on the last date(some answers might be changed) if you find any wrong answer please comment down below.

Question:
Let m be an integer with m > 1. R on the set of integers is an equivalence relation if
Select one:
a. {(a, b) | a ≡ b (mod m)}
b. {(a, b) | a ≡ a (mod b)}
c. {(a, b) | b ≡ b (mod a)}
d. {(a, b) | b ≡ a (mod m)}
The Correct answer is: {(a, b) | a ≡ b (mod m)}

Question:
Consider the statement: x,  y E Z if both xy and x + y are even, then
Select one:
a. both x and y are odd
b. both x and y are even
c. x is even and y is odd
d. x is odd and y is even
The Correct answer is:both x and y are even

Question:
If A = {0, 1}, B = {1, 2}, and C = {0, 1, 2} then what of the following isn’t in A × B × C ?
Select one:
a. (1, 1, 0)
b. (2, 2, 0)
c. (1, 1, 1)
d. (1, 2, 2)
The Correct answer is: (2, 2, 0)

Question:
Let A, B, and C be sets. Identify the the correct one among the following
Select one:
a. None of these
b. A ∩ (B ∩ C) = (C B) A
c. A (B C) = (C B) B
d. A ∩ (B C) = (C B) A
The Correct answer is:  None of these

Question:
Let f1 and f2 be functions from R to R such that f1(x) = x2 and f2(x) = x − x2. What are
the functions f1 + f2 and f1 f2?
Select one:
a. x2 and x4 – x3
b. x and x3 – x2
c. x3 and x2 – x3
d. x and x3 − x4
The Correct answer is: x and x3 − x4

Question:
Determine for what of the following for “f” is not a one-to-one function:
Select one:
a. f  for f (x) = x + 1 from the set of real numbers to itself
b. f  from {a, b, c, d} to {1, 2, 3, 4, 5} with f (a) = 4, f (b) = 5, f (c) = 1, and f (d) = 3
c. f  for f (x) = x2 from Z to the set of integers
d. f  for f (x) = x2 from Z+ to the set of integers
The Correct answer is: f  for f (x) = x2 from Z to the set of integers

Question:
Which of the following is not a logical equivalence for bi-conditional representation ?
Select one:
a. (p → q) ≡ p q
b. p ↔ q ≡ (p q) (p q)
c. p ↔ q ≡ p ↔q)
d. All mentioned
The Correct answer is: (p → q) ≡ p q

Question:
By the second law of de-Morgan (r s) is equivalent to
Select one:
a. r s
b. (r s)
c. r s
d. r s
The Correct answer is: s

Question:
Let P(x) be the statement “x + 1 > x.” For the real number domain, qualify the statement for truth value;
Select one:
a. xP(x) is true
b. xP(x) is true
c. xP(x) is true
d. xP(x) is true
The Correct answer is: xP(x) is true

Question:
For {Z+: Z+ < 5} verify if xP(x) holds good for P(x) is x2 < 10
Select one:
a. xP(x) is a conjunction
b. None of these
c. xP(x) is false
d. xP(x) holds good
The Correct answer is: xP(x) is false

Question:
Identify correct statement/s among the following
Select one:
a. The relation"Union of sets" is reflexive,but not symmetric
b. The relation"parallel of lines" is always an equivalence relation
c. The relation "Division" is Symmetric
The Correct answer is: The relation"parallel of lines" is always an equivalence relation

Question:
Which of the following is/are true ?
Select one or more:
a. p p is always a contradiction
 b. p p is always a tautology
c. p p is always a contradiction
d. p p is always a tautology
The Correct answer is:  p is always a tautology, p is always a contradiction

Question:
What of the following expressions does not imply the negation of the proposition, “there is an honest politician” if h(x) represents honesty function:
Select one:
a. xH(x)
b. xH(x)
c. xH(x)
d. All of these
The Correct answer is: xH(x)

Question:
“The sum of two positive integers is always positive” into a logical expression
Select one:
a. BOTH :xy((x > 0) (y > 0) (x +y > 0)) and xy(x +y > 0)
b. xy((x > 0) (y > 0) (x +y > 0))
c. Either xy((x > 0) (y > 0) (x +y > 0)) or xy(x +y > 0)
d. xy(x +y > 0)
The Correct answer is:  BOTH :xy((x > 0)  (y > 0)  (x +y > 0)) and xy(x +y > 0)

Question:
Which of the following is/are statement/s
Select one or more:
a. How hot the day is
b. None of these are statements
c. The temperature is 40 degrees.
d. It is raining in the summer.
The Correct answer is: The temperature is 40 degrees., It is raining in the summer.

Question:
Let P be “you can take the flight,”
Let Q be “you buy a ticket.”
What of the following notates “you can take the flight if and only if you buy a ticket”
Select one:
a. None of these
b. Q →  P
c. P →  Q
d. P ↔ Q
The Correct answer is: P ↔ Q

June 13, 2019

Digital Electronics and Microprocessors - MCQS



Note: We have tried to upload as much as we can, all the question and answers might be shuffled - Please find the answer below each question, some answers might be wrong please review on the last date(some answers might be changed) if you find any of the answer is wrong please comment down below. 

Question
How many memory chips of (64 x 2) are needed to provide a memory capacity of 2048 x 8? 
A 32
B 128
C  4
D  16

Select one:
a. A
b. D
c. B
d. C
The correct answer is : 128

Question 
In 2's complement binary representation what is the magnitude of  these two numbers 1001    & 11001 
A   -6 & 6
B   9 & 25
C   -6 & -6
D   9 & -6

Select one:
a. C
b. D
c. B
d. A
The correct answer is : -6 & -6

Question
Minimum no. of  two input NAND gate required to implement a Ex-OR function is 
(A)2 (B)3
(C)4 (D)5

Select one:
a. A
b. D
c. B
d. C 
The correct answer is : 4

Question
What is the logic function implemented by the 2X1 mux shown below






A AND logic
B OR logic
C NAND logic
D Nor Logic

Select one:
a. d
b. A
c. c
d. b 
The correct answer is : OR logic

June 12, 2019

Linear Algebra and Optimization- MCQS

Note : We have tried upload as much as we can, all the question and answers might be shuffled - Answers are marked in green. Thanks for Murthy,Abirami who helped us on this quiz.

Questions:

1. In R^3   the four vectors (1,2,5)  (5,9,3) (329,431,731) and (21, -13,58) are
Select one:
A. Linearly dependent
B. Every linear combination is zero
C. Linearly Independent
D. Forms a basis for R^3

The correct answer: Linearly dependent

 2. 

Select one:
A. 45
B. 0
C. 10
D. 3

The correct answer: 0

3. The elements along principal diagonal of a Hermitian matrix are all

Select one:
A. either zero or purely imaginary
B. real
C. 0
D. imaginary

The correct answer: real

4. For the linearly dependent vectors  X=[3,-9,12] and Y=[-4,12,-16]:

Select one:
A. X-2Y=0
B. 4X+3Y=0
C. 4X-3Y=0
D. 3X+4Y=0

The correct answer: 4X+3Y=0

5. If A and B are two orthogonal matrices, each of order n then AB and BA are

Select one:
A. Orthogonal
B. asymmetric
C. symmetric
D. Hermitian

The correct answer: asymmetric

6. A set of single non-zero vector is

Select one:
A. Basis
B. None
C. Linearly dependent
D. Linearly Independent

The correct answer: Linearly Independent

7.Which one of the following is false :

Select one:
A. Matrices is an arrangement while determinant is a value of square matrices.
B. If Rank of A= Rank of B
C. Row equivalent matrices have the same rank.
D. A linearly independent set in v consisting on a maximum possible no of vectors in V is called a basis for V

The correct answer: If Rank of A= Rank of B

8. The Gauss-Elimination method, the augmented matrix reduces to…..................matrix

Select one:
a. Upper triangular
b. Diagonal
c. unit
d. None of these

The correct answer: Upper triangular



9. The Characteristics roots of an orthogonal matrix are of ------ modulus



Select one:
A. Unit
B. Two
C. Three
D. Zero



The correct answer: Unit



10.Which of the following is not a elementary transformation?

Select one:
a. Adding two rows
b. Squaring all the elements of the matrix
c. Adding two columns
d. Multiplying a row by a non-zero number

The correct answer: Squaring all the elements of the matrix



11. 

Select one:
A.




B.


C.



D.

The correct answer: C

12. If  rank = number of unknowns  and x = y = z = 0 the equation have only -------- solution

Select one:
A. Non trivial
B. Infinite
C. Unique
D. Trivial

The correct answer: Trivial


13. 

Select one:
A. 3
B. 9
C. 1
D. -3

The correct answer: 3

14.If r is the rank of the matrix [A] of order m x n then r is

Select one:
A. r is less than or equal to minimum of (m, n)
B. r is greater than or equal to 'm'
C. r is greater than 'n'
D. r is less than or equal to 'n'

The correct answer: r is less than or equal to 'n'

15. The standard basis of an inner product space R x R x R (R) forms  an

Select one:
A. Orthonormal set
B. Orthogonal set and Orthonormal set
C. Orthogonal set
D. Neither Orthogonal set nor Orthonormal set

The correct answer: Orthogonal set and Orthonormal set

16. Let A be a matrix having rank ‘r ' & B be the equivalent matrix obtained from A. Then rank of   matrix B is…

Select one:
A. r + 2
B. r -1
C. r
D. r + 1

The correct answer: r

17. State : which one is false :
Select one:
A. If A and B are Hermitian: then AB-BA is skew Hermitian

B.



C. If A  is a  skew Hermitian : then iA  is Hermitian

D.


The correct answer: D

18. 

Select one:
A. 6,6    
B. 6,-12    
C. 12,6   
D. -6,12.

The correct answer: 6,-12

19. The linear transformation Y = AX is regular if

Select one:
A. I A I#0
B. I A I=1
C. I A I=-1
D. I A I=0

The correct answer: I A I#0

20. A square matrix A of order 3 has 3 linearly independent Eigen vectors then a matrix P can be found such that   P-1AP is a

Select one:
A. Diagonal Matrix
B. Symmetric matrix
C. Singular matrix
D. Unit matrix

The correct answerDiagonal Matrix