ACCP i10 SEMESTER APJ-II – Advanced Programming in Java - II MODULAR QUIZ FOR Module – Crytography Which of the following statements about cryptography are true and which are false ? (A) The Tamper-proofing process verifies whether the data received by the receiver is the same data as sent by the sender (B) The secret key cryptography transforms the plaintext, to ciphertext, by an input secret key and decrypted by another output secret key (C) Spoofing or identity interception, which means impersonating the identity of a different user and use it in an unauthorized way (D) Authentication is the process that provides tamper-proofing, while it is on the network (E) Hash functions or message digests are algorithms that use no key for data encryption True False True False True Which of the following statements about selectors are true and which are false? (A) The Java Cryptography Extension (JCE) defines a Java class for each service class like HessageDigest, signature, and KeyPairGenerator (B) The message digest class is used to calculate the message digest or hash value of the specified data (C) The Java Cryptography Architecture (JCA) is a Java framework to access and develop cryptographic functionality, and forms part of the Java security API (D) Cryptography service provider provides implementation independence and interoperability in order to implement the cryptographic concepts (E) The Keystore class specifies the fUnctionality shared by all opaque key objects False True True True False Can you match the properties with the corresponding descriptions? A Provides the classes and interfaces to perform cryptographic operations B Uses a small piece of information to authenticate a message C Applies an encryption key to every single bit present in an input stream of plaintext D Divides the input stream into fixed-size chunks Symmetric block encryption (2) JCE (1) (3) javax.cryto (4) MAC and an encryption key is applied to each chunk E Extends the underlying architecture of JCA framework to implement encryption and key exchange (5) Symmetric stream encryption Answer : A-3; B-4; C-5; D-1; E-2 Which of the following statements about Cipher class and encryption are true and which are false? (A) (B) (C) (D) (E) The cipher class belongs to javax.crypto package The Cipher class cannot be used to decrypt getObject () is a method of Cipher class The method getInstance() initialises a Cipher class instance The update () method is used to encrypt and decrypt data in multiple steps True False False False True Can you arrange the steps for creating a cipher for encrypting data using password (assuming appropriate variables and instances are declared already?) (A) (B) (C) (D) (E) PBEKeySpec pbeks = new PBEKeySpec (password.toCharArray()); SecretKeyFactory skf1 = SecureRandom sr = SecureRandom.getInstance(“SHA1PRNG”); PBEParaneterSpec pbeps = new PBEParanieterSpec(salt, 200); Cipher cip = Cipher.getInstance(“PBEWithMD5AndTrip1eDES”); Answer : E-A-B-D-C ... architecture of JCA framework to implement encryption and key exchange (5) Symmetric stream encryption Answer : A-3; B -4; C -5; D-1; E-2 Which of the following statements about Cipher class and encryption... PBEParaneterSpec pbeps = new PBEParanieterSpec(salt, 200); Cipher cip = Cipher.getInstance(“PBEWithMD5AndTrip1eDES”); Answer : E-A-B-D-C