17
Contents Task 1: ..................................................................................................................................................... 2 Task 2: ..................................................................................................................................................... 3 Task 2.2 ............................................................................................................................................... 6 Task 3 ...................................................................................................................................................... 8 Homework............................................................................................................................................. 12 Peripheral Homework ....................................................................................................................... 15 Web Presence ....................................................................................................................................... 16 References ............................................................................................................................................ 17

Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

Contents Task 1: ..................................................................................................................................................... 2

Task 2: ..................................................................................................................................................... 3

Task 2.2 ............................................................................................................................................... 6

Task 3 ...................................................................................................................................................... 8

Homework............................................................................................................................................. 12

Peripheral Homework ....................................................................................................................... 15

Web Presence ....................................................................................................................................... 16

References ............................................................................................................................................ 17

Page 2: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

Task 1: The topic of cryptography which I chose to research and present to the kids of Bablake school was the topic of substitution ciphers. Before creating the presentation many hours of research went into the topic of substitution ciphers this was an necessary step as the topic of cryptography as a whole was a topic which I believe was my weakness, I did not have much knowledge of cryptography and its sub topics such as substitution ciphers. hashing etc.

After doing some extensive research on the topic of substitution ciphers I was able to find out a lot of information of the topics in regards to how it is done, the pro's and con's of using the substitution ciphers and more.

Substitution ciphers are done by getting a plain text and encoding it so that the message of the plaintext changes so what we are left with is a ciphered message which does not make sense. This is done by substituting each character of the plaintext with another which the name substitution implies, there are many ways in which the characters can be substituted such as polyalphabetic substitution (Wikipedia 2005), which is the method of reusing characters from the alphabet multiple times. The most common way is by shifting the alphabet by a certain amount. For example if I have the letter C in my plaintext and in the cipher text F that would mean that the alphabet has been shifted by 3.

(Wikipedia2005)

We can always be sure that the string of texts when ciphered are in the same order in terms of grouping of words, for example "The grass is green on the other side" when this text is encoded the order of the words would remain the same "Vjg itcuu ku itggp qp vjg kvjgt ukfg" this is the encoded message from the string about we can see that the string of words have remained the same

The disadvantages of using substitution ciphers are that they are symmetric meaning that anyone can decipher the message. do to the fact that substitution ciphers most of the time shift the alphabet in order encode the message one just has to subtract the shift in order to reveal the massage. (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher

When doing the research and the presentation there were not many problems encountered, the only few problems that were encountered we during the research of the topic, The problems that aroused where mainly me not understand the principles that were being explained and how I could teach the kids about that principle. I overcame this problem by asking my team members for help in terms of explaining the principle that I was stuck on. This allowed me grasp the ideas that were being implied and allowed me to create a way in which i would be able to explain the concept to the kids in a way that they would understand.

Page 3: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

Task 2: Caesar Cipher Code:

import javax.swing.JOptionPane; //Public Class public class Cipher { //String which holds encode, allows the encoding of the texts private static String encode; //Main method area which houses the cipher code public static void main(String[] args) { //string variable message is created and holds the message which is going to be encoded by the cipher.encode String msg = Cipher.encode = JOptionPane.showInputDialog(null, "msg"); //prints out the message that has been encoded System.out.println(msg); //prints out decoded message System.out.println(Cipher.decode(msg, 12)); } //same as the encode string but for decrypting the message public static String decode(String msg, int offset) { //returns the unencoded message return encode(msg, -offset); } //msg is stored in string and offset value is stored public static String encode(String msg, int offset) { // ofset value is made offset = offset % 26 + 26; //new object StringBuilder encoded = new StringBuilder(); // for loops which checks the lower case of each character and stored in array for (char i : msg.toLowerCase().toCharArray()) { //if statement used for checking characters and offsetting the character if (Character.isLetter(i)) { int e = (i - 'a' + offset) % 26; encoded.append((char) (e + 'a')); } else { encoded.append(i); } } return encoded.toString(); } }

Page 4: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

The source code above is for a Caesar cipher which I created. It takes plaintext with the user has inputted into the dialog box and encrypts the plaintext by shifting the plaintext alphabet by 14 so that the message becomes completely different, more over the cipher also decrypts the message that was encoded by subtracting the offset value.

Creating the Caesar cipher was quite a hard and gruelling task, it was one which I had to spend quite a lot of time on in order to learn how to create the Caesar Cipher so that it could encode and decode the plain text as well as the cipher text.

I decided to create my cipher using JavaScript, I had a very vague knowledge on how to use JavaScript so I decide to learn JavaScript by using a site called CodeAcadamy (Zach 2011), by following all the lessons that were on it I was able to grasp the concept of using JavaScript to code. After learning JavaScript I went online looking trying to look for examples on how I could create a Caesar cipher that would both encrypt and decrypt. After looking at a few examples I started to program a Caesar cipher using the knowledge and skills which learnt from the CodeAcadamy course.

Problems that aroused for me when creating this Caesar cipher was that I was trying to find out how to create an offset value so that the plaintext could be offset. This was the hardest part I tried for some time to figure out how to get it working then I decide to go online to sites like stackoverflow and search for similar problems that other people where having. After researching the problem I was having I found out that the way I was trying to use modulo operator (Codebug 2009) was wrong this started causing problems for me as it was effecting the way in which the offsetting was working.

Page 5: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

Start

Generate Dialog input message box with instruction for user

encode message that was inputted and display.

Show decoded version of message

Decode message by shifting alphabet to the left by offset number

return decoded message

store user input in a string for encoding

create an offset value to be used

create new object called StringBuilder

for loop checks for lower case characters and stored it in an array

if statement checks each characters and offsets it by offset value

Return encoded message back and stores it as a string.

Finish

Page 6: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

Task 2.2 CipherText

VA RFFRAPR, BIRE N CREVBQ BS GVZR FRIRENY FUVCF UNQ RAPBHAGRERQ "NA RABEZBHF GUVAT" NG FRN, N YBAT FCVAQYR-FUNCRQ BOWRPG, FBZRGVZRF TVIVAT BSS N CUBFCUBERFPRAG TYBJ, VASVAVGRYL OVTTRE NAQ SNFGRE GUNA NAL JUNYR.

Offset value = 13

Plaintext

In essence, over a period of time several ships had encountered "an enormous thing" at sea, a long spindle-shaped object, sometimes giving off a phosphorescent glow, infinitely bigger and faster than any whale.

2.2 Ciphertext (Moderate):

AS HSPLTUI BPBUSL HRAMU DHE LTIPFCT LTU CRHEE HSN THN KFBWUN RACTLRV NPDS ASLP LTU RPPOASC-CRHEE IPPB. LTU ZUIV XAIEL LTASC ETU NAN DHE LP RPPO DTULTUI LTUIU DHE H XAIU AS LTU XAIUWRHMU, HSN ETU DHE JFALU WRUHEUN LP XASN LTHL LTUIU DHE H IUHR PSU, YRHGASC HDHV HE YIACTLRV HE LTU PSU ETU THN RUXL YUTASN.

Plaintext:

IN ANOTHER MOMENT ALICE WAS THROUGH THE GLASS AND HAD JUMPED LIGHTLY DOWN INTO THE LOOKINGGLASS ROOM THE VERY FIRST THING SHE DID WAS TO LOOK WHETHER THERE WAS A FIRE IN THE FIREPLACE AND SHE WAS QUITE PLEASED TO FIND THAT THERE WAS A REAL ONE BLAZING AWAY AS BRIGHTLY AS THE ONE SHE HAD LEFT BEHIND

Ciphertext alphabet order: a, b, c, d, e, f, g, h, I, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z

Plaintext alphabet order: I, m, g, w, s, v, z, a, r, q, j, t, c, d, k, o, x, l, n, h, e, y, p, f, b, v

Ciphertext (Hard)

KZVARJYBJPHCGUMCGNYVDEVRCGQGFTUVJTHVPRNQTOYVZTSDUZZRHNQIIFSMVVVPSQGFDTSHGAWGFZFHJJOQGRJPSDPATNWAGOIFONKFZEYJPSYCPJWHIKBZJCPTGAQFRJSIKORCYZFWOYONLINVRVAZDIVOKOOVSHRHZFHJTWNGPPVKVUBJVOWNSOQGOKFAQFVUWCCDKGBZFHJNWZQBHAPVEYDHCPPRHAOMOGVPRGGUNYSMGGOTCIIZTHONVSIGRJPSVEVNKRZVCOJSBTCPPRVPRHAVVKFRJWXJKVUZJPUVPROJWXMHDGRYQKIKBOJSNCAZOOIPSM

Plaintext:

ILAYDOWNONTHEGRASSWHICHWASVERYSHORTANDSOFTWHEREISLEPTSOUNDERTHANEVERIREMEMBEREDTOHAVEDONEINMYLIFEANDASIRECKONEDABOUTNINEHOURSFORWHENIAWAKEDITWASJUSTDAYLIGHTIATTEMPTEDTORISEBUTWASNOTABLETOSTIRFORASIHAPPENEDTOLIEONMYBACKIFOUNDMYARMSANDLEGSWERESTRONGLYFASTENEDONEACHSIDETOTHEGROUNDANDMYHAIRWHICHWASLONGANDTHICKTIEDDOWNINTHESAMEMANNER.

Page 7: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

Key length = 3

For Task 2.2 I was given a 3 cipher texts ranging from easy to hard. I had to decipher the text into the original plain text and reveal the message, I had to use 3 different types of the ciphers in order to decrypt each cipher text. For the first cipher text I had to use the Caesar Cipher in order to decrypt the Ciphertext. I scrolled through the offset values in order to reveal the message, by doing this I found out that the offset value was 13 meaning that the alphabet was shifted to by 13 characters meaning that A became N. This first cipher text was not too hard to solve as it was a matter of trial and error in order to figure out the plaintext.

(Singh Simon 2013) The second required me to use a substitution cracking tool to crack the given cipher. By inputting the cipher text in to the cracking tool I got the frequency of each individual characters in the cipher text. After obtaining the individual characters I had to put in the characters in the correct order in the plain text alphabet order in order for the plain text message to be revealed. This was a tedious task as it required to guess work in order for me to get the correct order, but realised that some string of letters such as 2 string letters had to be some of the more common ones that we would see in the a normal English sentence e.g. in, to and more, after learning this I was able to start narrowing the alphabet order down which allowed me to obtain the plain text message.

(Singh Simon 2013)

Page 8: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

For the final Cipher text I had to use Vigenère cracking tool. Out of the 3 cipher text this was the hardest one I found to crack. While looking online on how to use the Vigenère cracking tool I slowly started to understand how to use it properly, some online help made it confusing but by using the help on the black chamber website (Singh Simon 2013) and some help from friends I was able to crack the code.

(Singh Simon 2013)

Task 3 The requirements for task 3 was to create a digital file repository where the user can upload their files onto the repository. With each file uploaded there would be a small abstract from the file, If anyone wanted to gain a full copy of the file they would have to first pay for it.

We also had to show to the person who brought the full copy that the copy they got was genuine, moreover we had to make it so that only the author and only the author can view who has purchased a copy of their file from our site.

As this was a group project we split up the tasks and started working on our parts. I was designated the task of creating online database which would store all the files that were uploaded to the site. By using a free server hosting site called 000webhost I was able to create a free server which I could use as a database to store all the files, using SQL a programming language used for managing data which would be held in a database i create a table which would stored the files that were uploaded.

Page 9: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

after creating the database I gave another group member the hosting details so that they could set up the repository site which would send over the files to the storage database for it to be stored.

as you can see from the image above this is a php database that was created as part of the repository to store the users documents.

PHP and MySQL was a new topic for me, it was something which I had heard of but didn't know much about, so it became a topic of interest for me as I had to learn it in order for me to create the database server for the repository. I started researching online about what PHP and mySQL was but that was not much help to me as I wasn't able to understand the concepts so I asked help from fellow team members who were familiar to it and knew how to use it in order for me to create the

Page 10: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

repository. The topic concerning PHP and mySQL is one which I still need to work on as I have yet still much more to learn about it.

Page 11: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

Mark (out of 10) Group member name

Meeting of objectives or completion of tasks set.

Overall contribution to group tasks

Professionalism (includes, punctuality, organization, team working)

Evidence (entry logs, tasks completed etc.)

Matthew Pickford

10 10 7 Did most of task 3, a very hard worker.

Tom Heenan 10 7 7 Helped with task 1 and 3 very diligent in the work done

Scott Mirams 10 8 7 Hard worker help complete task 1, very helpful helping others with the research

Rohit Karir 10 8 7 Hard worker, helped with work related to task one to the best of his ability.

Group Project Log address:

https://drive.google.com/?tab=wo&urp=https://www.google.co.uk/&authuser=0#folders/0BzUi8WQB-LlLN1lUNkN1SnoyTnM __________________________________________________________________________________

Page 12: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

Homework Computer Architecture and Networks – 120CT

Sequential Logic Exercise

SECTION A

1) A latch has two stable states. (True)

2) A latch is considered to be in the SET state when the Q output is LOW. (False)

3) A gated D latch must be enabled in order to change state. (True)

4) Flip-flops and latches are both bistable devices. (True)

5) An edge-triggered D flip-flop changes state whenever the D input changes.

(True)

6) A clock input is necessary for an edge-triggered flip-flop. (True)

7) In an asynchronous counter, all flip-flops change state at the same time. (False)

8) In a synchronous counter, all flip-flops are clocked simultaneously. (True)

9) An asynchronous counter is also known as a ripple counter. (True)

10) Shift registers consist of an arrangement of flip-flops. (True)

11) Two functions of a shift register are data storage and data movement. (True)

12) In a serial shift register, several data bits are entered at the same time. (False)

13) All shift registers are defined by specified sequences. (False)

14) A shift register can have both parallel and serial outputs. (True)

15) A shift register with four stages can store a maximum count of fifteen. (True)

SECTION B

1) If an S-R latch has a 1 on the S input and a 0 on the R input and then the S input

goes to 0, the latch will be

a) set

b) reset

c) invalid

d) clear

2) The invalid state of an S-R latch occurs when

a) S = 1, R = 0

Page 13: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

b) S = 0, R = 1

c) S = 1, R = 1

d) S = 0, R = 0

3) For a gated D latch, the Q output always equals the D input

a) before the enable pulse

b) during the enable pulse

c) immediately after the enable pulse

d) answers (b) and (c)

4) Like the latch, the flip-flop belongs to a category of logic circuits known as

a) monostable multivibrators

b) bistable multivibrators

c) astable multivibrators

d) one-shots

5) The purpose of the clock input to a flip-flop is to

a) clear the device

b) set the device

c) always cause the output to change states

d) cause the outputs to change states depending on the controlling

(S-R, J-K, or D) inputs

6) For an edge-triggered D flip-flop,

a) a change in the state of the flip-flop can occur only at a clock pulse edge

b) the state that the flip-flop goes to depends on the D input

c) the output follows the input at each clock pulse

d) all of these answers

7) A feature that distinguishes the J-K flip-flop from the S-R flip-flop is the

a) toggle condition

b) preset input

c) type of clock

d) clear input

Page 14: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

8) A J-K flip-flop is in the toggle condition when

a) J = 1, K = 0

b) J = 1, K = 1

c) J = 0, K = 0

d) J = 0, K = 1

9) Asynchronous counters are known as

a) ripple counters

b) multiple clock counters

c) decade counters

d) modulus counters

10) An asynchronous counter differs from a synchronous counter in

a) the number of states in its sequence

b) the method of clocking

c) the type of flip-flops used

d) the value of the modulus

11) A stage in a shift register consists of

a) a latch

b) a flip-flop

c) a byte of storage

d) four bits of storage

12) To serially shift a byte of data into a shift register, there must be

a) one clock pulse

b) one load pulse

c) eight clock pulses

d) one clock pulse for each 1 in the data

13) To parallel load a byte of data into a shift register with a synchronous load, there

must be

a) one clock pulse

b) one clock pulse for each 1 in the data

c) eight clock pulses

d) one clock pulse for each 0 in the data

Page 15: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

14) The group of bits 10110101 is serially shifted (right-most bit first) into an 8-bit

parallel output shift register with an initial state of 11100100. After two clock

pulses, the register contains

a) 01011110

b) 10110101

c) 01111001

d) 00101101

Peripheral Homework Razer is a private company which was founded in 1998, by a group of engineers and marketers. The company was created in order to develop top of the range PC gaming peripherals. The companies first gaming peripheral was a gaming mouse known as the Boomslang. The peripheral which I will be looking at is the Razer Black Widow Ultimate. It is a newer version of the Razer Black Widow, between the two gaming keyboards there is actually not much different, the only few differences are that the Razer Black Widow ultimate has 3 features which the black widow lacked and those were back-lit keys with 5 modes, ear-phones in and mic jacks out and the final difference is that the ultimate comes with addition USB ports which the original lacked.

Razer gaming peripheral are seen as one of the best if not the best gaming peripherals for PC gamers and all their products revolver around the gamers, taking in feedback from current peripherals and trying to improve the quality of the peripherals so that it can be the best. Razer do many different types of peripherals such as mouses, headphones, keyboards. Looking at the keyboards that they have made we can see many different types of features that they have implemented into their keyboards such as red cherry keys, touch screens, LCD panels and many more.

These technologies which they have employed on to their keyboard such as the LCD screens, red cherry keys were implemented to help competitive gaming to become easier by making the peripheral more responsive, accurate and comfortable.

The second peripheral which I am going to look at it the Astro Gaming Headset made by AstroGaming, a subsidiary company which is part of the company AstroStudio. AstroGamings main peripheral focus are gaming headsets and are seen in the gaming community as the leader of the gaming headset industry. The headsets that they make are top end same as the Razer peripheral.

The Astro A40 is the companies most critically acclaimed headset, It is an innovative invention which pushes the boundaries of sound quality to the max by incorporating many sound enhancing features. The Astro A40 comes packed with a 7.1 Dolby surround sound, 7 speakers pumping out the highest quality sounds possible from a game, it also comes is a mix amp to alter the sound quality more to reach ever higher standard.

Not only is the headset known for its gaming sound quality but also the clarity of the voice chat. That is what makes it the most used gaming headset in the competitive scene, it is used by many gaming leagues players in high stake tournaments but also by many other casual gamers and YouTuber because of the quality of the items.

Page 16: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

The final peripheral I will be talking about is the Scuf controller, another top range gaming peripherals for gaming consoles. Scuf was created in 2010 and was created to help stop the hindrance caused by standard gaming controllers. The company creates custom controllers by adding paddles to the backs of the controller by soldering wires on to specific parts of the motherboard, and then mapping button keys to the paddles.

Scuf's are mainly known for their added paddles on the back of the controller, as it helps avoid the hindrance the standard controllers cause also because the controller case is also customized as the company believes that one size does not fit all meaning that some people may need bigger controllers or smaller depending on the palm size.

Web Presence http://dewanali.wordpress.com/

Page 17: Contents · 2014. 2. 21. · (Kioskea 2014). That is one of the reasons why the substitution cipher is also called the simple cipher . When doing the research and the presentation

References Wikipedia(2005) Substitution cipher [online] available from <http://en.wikipedia.org/wiki/Substitution_cipher> last accessed [10/1/2014]

Wikipedia(2005) Substitution cipher [online] available from <http://en.wikipedia.org/wiki/Substitution_cipher> last accessed [10/1/2014]

Kioskea(2014) substitution cipher [online] available from <http://en.kioskea.net/contents/143-substitution-cipher> last accessed [10/1/2014]

Zach (2011) CodeAcadamy [online] available from <http://www.codecademy.com/> last accessed [15/1/2014]

Codebug (2009) Stackoverflow [online] available from <http://stackoverflow.com/questions/2609315/recognizing-when-to-use-the-modulus-operator> last accessed [17/1/2014]

Singh Simon (2013) theblackchamber [online] available from <http://www.simonsingh.net/The_Black_Chamber/caesar.html> last accessed [18/1/2014]

Singh Simon (2013) theblackchamber [online] available from < http://www.simonsingh.net/The_Black_Chamber/substitutioncrackingtool.html> last accessed [18/1/2014]

Singh Simon (2013) theblackchamber [online] available from <http://www.simonsingh.net/The_Black_Chamber/vigenere_cracking_tool.html> last accessed [18/1/2014]