Five-minute starter task

Slides:



Advertisements
Similar presentations
Computer Science 101 Data Encryption And Computer Networks.
Advertisements

Making “Good” Encryption Algorithms
Cryptology Terminology and Early History. Cryptology Terms Cryptology –The science of concealing the meaning of messages and the discovery of the meaning.
 Caesar used to encrypt his messages using a very simple algorithm, which could be easily decrypted if you know the key.  He would take each letter.
Python Magic Select a Lesson: Why Learn to Code? Basic Python Syntax
CYPHER INDEX n Introduction n Background n Demo INTRODUCTION n Cypher is a software toolkit designed to aid in the decryption of standard (historical)
CPSC CPSC 3730 Cryptography Chapter 2 Classical Encryption Techniques.
 8 groups of 2  5 rounds  Basic Definitions  Substitution Cryptosystems  Math  Tricky Questions  Comparing Cryptosystems  10 questions per round.
Cryptography Programming Lab
Computer Security coursework 2 Dr Alexei Vernitski.
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Bit Cipher 1. Example of bit Cipher 2 Practical Stream Cipher 3.
© G. Dhillon, IS Department Virginia Commonwealth University Principles of IS Security Cryptography and Technical IS Security.
Python Programming in Context Chapter 3. Objectives To introduce the string data type To demonstrate the use of string methods and operators To introduce.
Encryption on the Internet Eirik Albrigtsen. Encryption & Decryption Text Unreadable Text key + encryption method Unreadable Text Text key + decryption.
Examples of comparing strings. “ABC” = “ABC”? yes “ABC” = “ ABC”? No! note the space up front “ABC” = “abc” ? No! Totally different letters “ABC” = “ABCD”?
24-Nov-15Security Cryptography Cryptography is the science and art of transforming messages to make them secure and immune to attacks. It involves plaintext,
CRYPTOLOGY IN WWII ByJOE&SEAN. SIGABA SIGABA was similar to the Enigma in basic theory A series of rotors enciphered every character of the plaintext.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 8: Fun with strings.
Cryptography.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (2) Information Security.
ROT13 cipher. The ROT13 cipher is a substitution cipher with a specific key where the letters of the alphabet are offset 13 places. Example: all 'A's.
How the internet works Cryptography. LO: Define the terms encryption and decryption Construct a secure message using encryption LO: Define the terms encryption.
Encryption. LEARNING OBJECTIVES: BY THE END OF THE LESSON YOU SHOULD KNOW. What encryption is and why it is important The basics of encryption techniques.
Substitution Ciphers Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
Information and Computer Security CPIS 312 Lab 1
LAB#3 CLASSICAL ENCRYPTION CPIT 425. This diagram is taken from Dr.Omaima slides.
Variables Variables are used to store data or information.
Teaching with Python Lukasz Ziarek SUNY Buffalo
Whatcha doin'? Aims: To understand the Caesar Cipher.
CAP Cryptographic Analysis Program
Topics discussed in this section: 30-2 SYMMETRIC-KEY CRYPTOGRAPHY Symmetric-key cryptography started thousands of years ago when people needed.
Synchronizing Text & Objects
Topic 3: Data Encryption.
Cryptography Survey.
English Language Quiz.
Transposition Ciphers
A1 Student Posters Posters Print Services  Robinson Library  University of Newcastle  phone: Introduction The.
<ELLIIT Project Name>
Encryption on the Internet
Teaching London Computing
Encryption and Decryption
Presentation title.
Presentation title.
Cryptography Survey.
Cryptography and Network Security
CEV208 Computer Programming
Simple Encryption- Lesson 5
Poster Title Heading Heading Heading Heading Heading Heading
2016 REPORTING The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
2016 REPORT.
Fundamentals of Python: First Programs
Fun with Cryptography The Science of Secrecy.
English Language Quiz.
2016 REPORT.
String Processing 1 MIS 3406 Department of MIS Fox School of Business
A1 Student Posters Posters at Print Services  Robinson Library  University of Newcastle  phone: Introduction.
Python Strings.
T A R S E L I T L I S S T O TEMPLATE – SUBTITLE
Double Transpositions
201X REPORT.
目 录 The quick brown fox. 目 录 The quick brown fox.
ASCII LP1.
Symmetric Encryption or conventional / private-key / single-key
Chapter Goals Define cryptography
KEYBOARDING: SPEED & ACCURACY
2016 REPORT.
Self-Balancing Search Trees
10/7/2019 Created by Omeed Mustafa 1 st Semester M.Sc (Computer Science department) Cyber-Security.
Presentation transcript:

Five-minute starter task Write a function that takes a string argument and returns a spaced out version of the string E.g. spaceOut("Hello") H e l l o

The spaceOut task You can iterate over a string, like you can a list: for x in myString: do something You cannot change the letters of a string one by one like this: for x in myString x = x + ' ' You have to build up a NEW STRING and then RETURN IT newStr = "" newStr = ….

Examples of string functions in Python Find full documentation here: http://docs.python.org/3/library/string.html

Caesar Ciphers

Examples Plain text: The quick brown fox jumps over the lazy dog Cipher text: uif rvjdl cspxo gpy kvnqt pwfs uif mbaz eph

y = string.ascii_lowercase.find(x) + 1 Clues: You may find these lines of code useful (they are not in order!) for x in plainText: # do something with each letter y = string.ascii_lowercase.find(x) + 1 cipherText = cipherText + string.ascii_lowercase[y] plainText = plainText.lower() You may also find the % operator useful…

More clues for every character in plain text: index = number of the character in the alphabet index = index + 1 cipher character = index'th letter of alphabet add cipher character to cipher text This will work in most cases, but you will have a problem when you come across a 'z' and when you come across an upper case letter, and when you come across a space or some punctuation character.

Extension tasks My example only returns cipher text in lower case. Can you write a function that returns mixed cases? My example will raise an error if the plain text contains punctuation. Can you make your function cope with it? Write a function that will encrypt txt using ANY rotation. Write a function that will decrypt anything encrypted using a Caesar cipher.

Transposition Ciphers