# TM255 Communication and information technologies

Question 1

This question carries 10% of the assignment marks.

Before tackling this question you should study Block 3 Parts 4 and 6.

(a) The symbol Z is magnified and shown in Figure 1 with a grid superimposed.

Figure 1

The image in Figure 1 is to be encoded and encrypted using the following steps:

1 Each of the five horizontal rows of the picture is encoded as a 5-bit binary

number. White squares are encoded as 0s and black squares as 1s. The top

row is therefore encoded as 01111.

2 Starting from the left, the first binary digit is multiplied by 16, the second by 8,

the third by 4, the fourth by 2, and the fifth by 1. For the top row the result is

(0 × 16) + (1 × 8) + (1 × 4) + (1 × 2) + (1 × 1) = 0 + 8 + 4 + 2 + 1 = 15.

3 The value representing each row is encrypted using modular addition with a

modulus of 32 and a key of 27.

4 The result is converted to a 5-bit binary number.

Use steps 1 to 4 to work out the 5-bit binary number of each row. Show your working.

(5 marks)

(b) This part of the question is based on the practical activities you did in Part 6. It relates

to Activity 6.8 where you registered an account and tested the web server.

1 For your answer to this part of the question include the screenshot that shows

the welcome page after you successfully logged in to your account. The

screenshot should show your name, PI number and email address. (2 marks)

2 The web server used in Activity 6.8 is vulnerable to SQL injection attacks. What

SQL injection code can you use to attack the web server? How can the code be