Encryption Theory CSC380 – Flint Joasaint, Marcial White.

Slides:



Advertisements
Similar presentations
Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Advertisements

Da Vinci Challenge Code Breaking Due to a teacher vocational exchange in 2010/11, nine teams can compete in Code breaking (the interpretation.
1 CSCD434/539 Winter 2013 Lecture 11 Cryptography - Basics.
Hand Trace and Output for: int digit = 0; int number = 1423; do { digit = number % 10; System.out.println(digit); number = number / 10; } while (number.
Strings Input/Output scanf and printf sscanf and sprintf gets and puts.
 2000 Prentice Hall, Inc. All rights reserved Fundamentals of Strings and Characters String declarations –Declare as a character array or a variable.
C Intro.
Encryption/Decyprtion using RC4 Vivek Ramachandran.
95-752:4-1 Encryption - I :4-2 Definitions Plaintext: easy to understand form (original message) Ciphertext: difficult to understand form Encryption:
1 Codes, Ciphers, and Cryptography-Ch 2.1 Michael A. Karls Ball State University.
Classical Cryptography
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Fundamentals of Strings and Characters Characters.
Session 1: Introduction to cryptology. Cryptology Cryptology: criptos=secret + logos=science Cryptology = Cryptography + Cryptanalysis Opposite and complementary.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 8 - Characters and Strings Outline 8.1Introduction.
1 Array, Pointer and Reference ( I ) Ying Wu Electrical Engineering and Computer Science Northwestern University EECS 230 Lectures.
String What it is Why it’s useful library routines for handling strings how to input a string from the keyboard.
CS 240: Data Structures Supplemental: Command Line Input.
Cryptography and Network Security Chapter 2 Fourth Edition by William Stallings.
第四讲 古典替换密码. 1 。多字母表替换密码 (Polyalphabetic ciphers) 增强密码安全性的方法是使用多字母替换密码 hence the name polyalphabetic ciphers 使得密码分析更困难,因为有较多的密码表去 猜测 打乱了字母出现的频率 用一个密钥决定对每个字母使用什么字母变换.
Cryptography Programming Lab
Intro to MIS – MGS351 Protecting People and Information Chapter 8.
Elements of a C++ program 1. Review Algorithms describe how to solve a problem Structured English (pseudo-code) Programs form that can be translated into.
C# B 1 CSC 298 Writing a C# application. C# B 2 A first C# application // Display Hello, world on the screen public class HelloWorld { public static void.
Cryptology I.Definitions II.Substitution Ciphers III.Transpositions Ciphers IV.The DES Algorithm V.Public-Key Cryptology.
Practical Electronics & Programming
STRING Dong-Chul Kim BioMeCIS UTA 10/7/
The char Data Type A char is a one byte integer type typically used for storing characters. Example: char oneLetter = ’D’; We enclose the character in.
Passing Other Objects Strings are called immutable which means that once a String object stores a value, it never changes –recall when we passed a message.
JAVA Tokens. Introduction A token is an individual element in a program. More than one token can appear in a single line separated by white spaces.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
CSC1201: Programming Language 2 Lecture 1 Level 2 Course Nouf Aljaffan Snd Term Nouf Aljaffan (C) CSC 1201 Course at KSU1.
Polyalphabetic CIPHERS Linguistics 484. Summary The idea How to recognize: index of coincidence How many alphabets: Kasiski.
Chapter 2: Java Fundamentals
Character Arrays Based on the original work by Dr. Roger deBry Version 1.0.
CS50 Week 2. RESOURCES Office hours ( Lecture videos, slides, source code, and notes (
Array, Pointer and Reference ( I ) Ying Wu Electrical & Computer Engineering Northwestern University ECE230 Lectures Series.
Lab5 Please submit the lab before you leave Please include at a minimum your name, the date, and the lab- program number at the top of the program as a.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee C Language Part 4.
ENG College of Engineering Engineering Education Innovation Center 1 Array Accessing and Strings in MATLAB Topics Covered: 1.Array addressing. 2.
Cryptography and the Web Lincoln Stein Whitehead Institute/MIT Center for Genome Research.
CSC1201: Programming Language 2 Lecture 1 Level 2 Course Nouf Aljaffan (C) CSC 1201 Course at KSU1.
Chapter 4 Practice cont.. Practice with nested loops 1.What will be the output of the following program segment: 1.for (int i = 1; i
1 Cannon_Chapter9 Strings and the string Class. 2 Overview  Standards for Strings  String Declarations and Assignment  I/O with string Variables 
Homework #2: Functions and Arrays By J. H. Wang Mar. 20, 2012.
Java for C++ Programmers A Brief Tutorial. Overview Classes and Objects Simple Program Constructors Arrays Strings Inheritance and Interfaces Exceptions.
Homework #4: Operator Overloading and Strings By J. H. Wang Apr. 17, 2009.
Homework #2: Functions and Arrays By J. H. Wang Mar. 24, 2014.
Cryptography.
1 Reverse a String iPhone/iPad, iOS Development Tutorial.
What is a String? A string is actually a character array.
Chapter 8 Characters and Strings. Objectives In this chapter, you will learn: –To be able to use the functions of the character handling library ( ctype).
Scott Marino MSMIS Kean University MSAS5104 Programming with Data Structures and Algorithms Week 1 Scott Marino.
Introduction to Cryptography Lecture 4. Caesar Cipher Gaius Julius Caesar (100 B.C.- 44 B.C.) General Politician Dictator of Rome Creator of Caesar Cipher.
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.
Information and Computer Security CPIS 312 Lab 1
Mohammad Alauthman 6/12/2016© 2004 Dr. Khalid Kaabneh.2 CRYPTOLOGY Definition: Cryptology : from the Greek Crypto meaning secret.
Lecture 2 Classical Cipher System SIMPLE SUBSTITUTION CIPHERS By: NOOR DHIA AL- SHAKARCHY
LAB#3 CLASSICAL ENCRYPTION CPIT 425. This diagram is taken from Dr.Omaima slides.
Norissa Lamaute, Alexa Piccoli, Li-Chiou Chen, and Andreea Cotoranu
REEM ALAMER REVISION FOR C LANGUAGE COURSE. OUTPUTS int main (void) { int C1, C2; int *p1, *p2; C1 = 8; p1 = &C1; C2 = *p1 / 2 + 5; p2 = &C2; printf ("C1.
Cryptography.
Section 3.2c Strings and Method Signatures
Introduction to Java Programming
Simple Encryption- Lesson 5
CSCD 303 Fall 2018 Lecture 18 Cryptography - Basics.
CSC215 Homework Homework 05 Due date: Oct 21, 2016.
Java for Beginners University Greenwich Computing At School DASCO
Computer Security Mohammad Alauthman
CSCD434 Spring 2019 Lecture 12 Cryptography - Basics.
Presentation transcript:

Encryption Theory CSC380 – Flint Joasaint, Marcial White

The Algorithm RPG Program CCED01 Originally intended for 16 digit keys, We’ve extended it to 24 digits (A-Z) Originally intended for 16 digit keys, We’ve extended it to 24 digits (A-Z) abcdefghijklmnopqrstuvwxyz bcdefghijklmnopqrstuvwxyza cdefghijklmnopqrstuvwxyzab defghijklmnopqrstuvwxyzabc efghijklmnopqrstuvwxyzabcd fghijklmnopqrstuvwxyzabcde ghijklmnopqrstuvwxyzabcdef hijklmnopqrstuvwxyzabcdefg ijklmnopqrstuvwxyzabcdefgh jklmnopqrstuvwxyzabcdefghi klmnopqrstuvwxyzabcdefghij abcdefghijklmnopqrstuvwxyz bcdefghijklmnopqrstuvwxyza cdefghijklmnopqrstuvwxyzab defghijklmnopqrstuvwxyzabc efghijklmnopqrstuvwxyzabcd fghijklmnopqrstuvwxyzabcde ghijklmnopqrstuvwxyzabcdef hijklmnopqrstuvwxyzabcdefg ijklmnopqrstuvwxyzabcdefgh jklmnopqrstuvwxyzabcdefghi klmnopqrstuvwxyzabcdefghij lmnopqrstuvwxyzabcdefghijk mnopqrstuvwxyzabcdefghijkl nopqrstuvwxyzabcdefghijklm opqrstuvwxyzabcdefghijklmn pqrstuvwxyzabcdefghijklmno qrstuvwxyzabcdefghijklmnop rstuvwxyzabcdefghijklmnopq stuvwxyzabcdefghijklmnopqr tuvwxyzabcdefghijklmnopqrs uvwxyzabcdefghijklmnopqrst vwxyzabcdefghijklmnopqrstu lmnopqrstuvwxyzabcdefghijk mnopqrstuvwxyzabcdefghijkl nopqrstuvwxyzabcdefghijklm opqrstuvwxyzabcdefghijklmn pqrstuvwxyzabcdefghijklmno qrstuvwxyzabcdefghijklmnop rstuvwxyzabcdefghijklmnopq stuvwxyzabcdefghijklmnopqr tuvwxyzabcdefghijklmnopqrs uvwxyzabcdefghijklmnopqrst vwxyzabcdefghijklmnopqrstu Etc…

Algorithm Continued … Program CCED01 has only one parameter: a 25-byte character value. The first 24 bytes contain a left-justified letter. The last byte must contain E to encrypt or D to decrypt. CALL PGM (CCED01) PARM (‘Hello World E') Will yield “HDJKK QHJCT” CALL PGM (CCED01) PARM (‘HDJKK QHJCT D') Will decrypt the message.

Algorithm Continued Array Element abcdefghijklmnopqrstuvwxyz bcdefghijklmnopqrstuvwxyza cdefghijklmnopqrstuvwxyzab defghijklmnopqrstuvwxyzabc efghijklmnopqrstuvwxyzabcd fghijklmnopqrstuvwxyzabcde ghijklmnopqrstuvwxyzabcdef hijklmnopqrstuvwxyzabcdefg ijklmnopqrstuvwxyzabcdefgh jklmnopqrstuvwxyzabcdefghi klmnopqrstuvwxyzabcdefghij Input Letter H D J K Q H J C T Output Letter H E L O W O R L D For decryption …

The Interface

The Code public class simple { // Might randomize placement of characters in array later string[] characters = {"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"}; string[] cypertext = public simpleencrypt() { } public string EncryptString(string Data, string Key) { if(Data.Length == 0) throw new ArgumentException("Hey Your key must be at please 1 digit."); uint[] formattedKey = FormatKey(Key); if(Data.Length%2!=0) Data += '\0'; byte[] dataBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(Data); string changedtext = string.Empty; uint[] tempData = new uint[2]; for(int i=0; i

The Code, Cont… public class simple { // Might randomize placement of characters in array later string[] characters = {"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 "}; string[] cypertext = public simpleencrypt() { } public string EncryptString(string Data, string Key) { if(Data.Length == 0) throw new ArgumentException("Hey Your key must be at please 1 digit."); uint[] formattedKey = FormatKey(Key);

Code cont … if(Data.Length%2!=0) Data += '\0'; byte[] dataBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(Data); string changedtext = string.Empty; uint[] tempData = new uint[2]; for( int ix = 0; ix < data.Count; ++ix ) { str = ( string )data[ ix ]; sentences[ ix ] = str.Split( char ); } changedtext += Util.ConvertUIntToString(tempData[0]) + Util.ConvertUIntToString(tempData[1]); } return changedtext; }