INTE2401/2402辅导、讲解JavaScript程序、辅导Java编程留学生、讲解Java报告
讲解数据库SQL|讲解Java程序
INTE2401/2402 Assignment (10 marks)
1. Use JavaScript to implement the Simplified AES.
(1)Key generation (2 mark)
(2)Encryption (2 marks)
(3)Decryption (1 marks)
Hint:
(i)For key generation, input the original key and generate round keys.
(ii)For encryption, input a sentence, convert it to ASCII codes, divide it into blocks, encrypt each block with the round keys, and output the ciphertext of the sentence.
(iii)For decryption, input the ciphertext (cut/paste), divide it into blocks, decrypt each block with the round keys, convert the plaintext to the sentence on the basis of ASCII codes
(iv)Demonstration is required (in lab);
(v)The JavaScript code is required to submit;
(vi)A document with chosen key, plaintext and demonstration data is required to submit.
2. Use JavaScript to implement RSA including
(1)Key generation (2 marks)
(2)Encryption (1 marks)
(3)Decryption (0.5 marks)
(4)Signing (1 mark)
(5)Verifying (0.5 mark)
Hint:
(i)For key generation, the two primes are required to be more than 200 and the public key is required to be more than 100;
(ii)Use the Euclidean algorithm and the extended Euclidean algorithm in the key generation;
(iii)For encryption, input a random number and output the ciphertext.
(iv)For decryption, input the ciphertext (cut/paste) and output the plaintext.
(v)For signing, input a random number and output the signature.
(vi)For verifying, input the random number and the signature (cut/paste), output true or false.
(vii)Use the fast modular exponentiation algorithm for encryption, decryption, signing and verifying;
(viii)Demonstration is required (in lab);
(ix)The JavaScript code is required to submit;
A document with chosen public and private parameters and demonstration data is required to submit.