Created By: Keith Acosta Instructor: Wei Zhong Courses: Senior Seminar Cryptography

Similar documents
Notification mechanism

MAD ASSIGNMENT NO 3. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.

LifeStreet Media Android Publisher SDK Integration Guide

CSE 660 Lab 7. Submitted by: Arumugam Thendramil Pavai. 1)Simple Remote Calculator. Server is created using ServerSocket class of java. Server.

Software Practice 3 Before we start Today s lecture Today s Task Team organization

Diving into Android. By Jeroen Tietema. Jeroen Tietema,

Android Application Development. By : Shibaji Debnath

Android UI Development

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Mobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator.

IPN-ESCOM Application Development for Mobile Devices. Extraordinary. A Web service, invoking the SOAP protocol, in an Android application.

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Switching UIs

Learn about Android Content Providers and SQLite

Manifest.xml. Activity.java

COMP61242: Task /04/18

South Africa

Tutorial: Setup for Android Development

Topics of Discussion

Simple Currency Converter

An Overview of the Android Programming

Our First Android Application

Basic UI elements: Android Buttons (Basics) Marco Ronchetti Università degli Studi di Trento

<uses-permission android:name="android.permission.internet"/>

Lecture 6: Android XML, Inversion of Control, Timers (Handlers), Activity

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ]

Create Parent Activity and pass its information to Child Activity using Intents.

Applications. Marco Ronchetti Università degli Studi di Trento

Upon completion of the second part of the lab the students will have:

Android Services. Victor Matos Cleveland State University. Services

Solving an Android Threading Problem

Overview. What are layouts Creating and using layouts Common layouts and examples Layout parameters Types of views Event listeners

Fragment Example Create the following files and test the application on emulator or device.

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State

Android Overview. Most of the material in this section comes from

Tutorial: Setup for Android Development

Android Development Tutorial. Yi Huang

Software Practice 3 Today s lecture Today s Task

Starting Another Activity Preferences

Getting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering

A Crash Course to Android Mobile Platform

Security model. Marco Ronchetti Università degli Studi di Trento

MOBILE COMPUTING 1/20/18. How many of you. CSE 40814/60814 Spring have implemented a command-line user interface?

1 카메라 1.1 제어절차 1.2 관련주요메서드 1.3 제작철차 서피스뷰를생성하고이를제어하는서피스홀더객체를참조해야함. 매니페스트에퍼미션을지정해야한다.

Getting started: Installing IDE and SDK. Marco Ronchetti Università degli Studi di Trento

Group B: Assignment No 8. Title of Assignment: To verify the operating system name and version of Mobile devices.

Introduction to Android

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Managing Screen Orientation

8/30/15 MOBILE COMPUTING. CSE 40814/60814 Fall How many of you. have implemented a command-line user interface?

Android for Java Developers Dr. Markus Schmall, Jochen Hiller

Android Workshop: Model View Controller ( MVC):

Mobile Software Development for Android - I397

Android - JSON Parser Tutorial

EMBEDDED SYSTEMS PROGRAMMING Android Services

Assignment 1. Start: 28 September 2015 End: 9 October Task Points Total 10

Android Application Model I. CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr.

Android Beginners Workshop

Intents. Your first app assignment

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Mobile Software Development for Android - I397

Android Application Model I

Tip Calculator. xmlns:tools=" android:layout_width="match_parent"

Android + TIBBO + Socket 建國科技大學資管系 饒瑞佶

Android App Development. Mr. Michaud ICE Programs Georgia Institute of Technology

Embedded Systems Programming - PA8001

Agenda. The Android GUI Framework Introduction Anatomy A real word example Life cycle Findings

Android Navigation Drawer for Sliding Menu / Sidebar

Creating a Custom ListView

Intents, Intent Filters, and Invoking Activities: Part I: Using Class Name

EMBEDDED SYSTEMS PROGRAMMING Application Basics

Android & iphone. Amir Eibagi. Localization

User Interface Development in Android Applications

ANDROID PROGRAMS DAY 3

MAD ASSIGNMENT NO 2. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Text Properties Data Validation Styles/Themes Material Design

Java & Android. Java Fundamentals. Madis Pink 2016 Tartu

Android DP SDK Integration Guide

Multiple Activities. Many apps have multiple activities

Cheetah Orion Ad Platform SDK Guide (for Android) V1.0

BSCS 514- Computer Graphics. Course Supervisor : Dr. Humera Tariq Hands on Lab Sessions: Mr. Faraz Naqvi

App Development for Smart Devices. Lec #9: Advanced Topics

East West University

Android HelloWorld - Example. Tushar B. Kute,

Programming with Android: Layouts, Widgets and Events. Dipartimento di Scienze dell Informazione Università di Bologna

Adaptation of materials: dr Tomasz Xięski. Based on presentations made available by Victor Matos, Cleveland State University.

Mobila applikationer och trådlösa nät, HI1033, HT2012

Android - Widgets Tutorial

Programming with Android: Introduction. Layouts. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

Embedded Systems Programming - PA8001

Unit and Functional Testing for the Android Platform. Christopher M. Judd

Hello World. Lesson 1. Android Developer Fundamentals. Android Developer Fundamentals. Layouts, and. NonCommercial

Mobile Programming Lecture 5. Composite Views, Activities, Intents and Filters

Tabel mysql. Kode di PHP. Config.php. Service.php

Advanced Computer Networks. Project Report. Name - Rahul Deepak Prabhu NET ID - rdp Name - ShubhankarVenkatesh NET ID - sxv148130

User Interface Design & Development

Agenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen

CS 4330/5390: Mobile Application Development Exam 1

Android Basics. Android UI Architecture. Android UI 1

Real-Time Embedded Systems

Android Programs Day 5

Transcription:

Created By: Keith Acosta Instructor: Wei Zhong Courses: Senior Seminar Cryptography

1. Thread Summery 2. Thread creation 3. App Diagram and information flow 4. General flow of Diffie-Hellman 5. Steps of the Diffie-Hellman 6. DESede or Triple DES (Data Encryption Standard) Diagram 7. CFB (Cipher Feedback) Diagram 8. Manifest XML 9. Activity XML s 10.Screen Shots

Thread Handling Server Side 1. The Main Activity I. starts the Server Listen Thread II. Passes text to Server listen thread 2. Server listen Thread I. Creates the Cipher Streams II. Opens the socket then starts the Server Send Thread passing it the Cipher Out I. Server listen thread stays in an infinite loop listening for input from the socket II. When the thread receives data it passes the deciphered string back to the main Activity through the handler. III. Passes text through to the Server Send Threads sendtext method 3. Server Send Thread I. Wait in an infinite loop to send data out II. Send message through the Handler to update the Main Activity

Thread Handling Client Side 1. The Main Activity I. starts the Client Send Thread II. Passes text to Client Send thread 2. Client Send Thread I. Creates the Cipher Streams II. Opens the socket then starts the Client Listen Thread passing it the Cipher In III. Wait in an infinite loop to send data out Using Cipher out 3. Client Listen Thread I. Client listen thread stays in an infinite loop listening for input from the socket II. When the thread receives data it passes the deciphered string back to the main Activity through the handler.

Server Threads IP, Port, Handler Text to Send Main Activity Listen Thread UI Update Socket, Cipher Stream, Handler Send Thread

Client Threads IP, Port, Handler Text to Send Main Activity Send Thread UI Update Socket, Cipher Stream, Handler Listen Thread

1 Server Generate D-H Session Key Pair Client Generate D-H Session Key Pair 2 Listen For Client Connect to Open Server Port 3 Send Public Key To Client Receive Servers Public Key

4 Server Receive Client Public Key Client Send Client Public Key 5 Perform Key Agreement Perform Key Agreement 6 Create IV Waiting For Server IV

7 Server Send Server IV Client Receive Server IV 8 Generate DES Key Generate DES Key 9 Create Cipher Stream Create Cipher Stream Connection Established

Socket Creation // create client socket InetAddress serveraddr = InetAddress.getByName(serverIP); Socket s = new Socket(serverAddr, serverport); //creating the listener thread clthread = new ClientListenThread(s, mhandler, cipherin); clthread.start(); //creating server socket serversocket = new ServerSocket(serverPort); Socket client = serversocket.accept(); SocketAddress remoteip = client.getremotesocketaddress(); //creating the Sending Thread ssthread = new ServerSendThread(client, mhandler, cipherout); ssthread.start();

Step 1 & 2 //Generating a Diffie-Hellman KeyPair //creating input/output streams to send and receive //public key data

Step 3 & 4 //Receving public key //Sending public key

//Performing key Agreement Step 5

Step 6, 7 & 8 //Server --Sending IV bytes to client //Client Receiving IV Bytes //Generating DESede Key

Steps 8 & 9 //Creating the Encrypting Cipher Stream //Creating the Decrypting Cipher Stream

Infinite Loops //Loop to send encrypted text while (connected) { If (messagesend) { cipherout.write(texttosend.getbytes()); cipherout.flush(); messagesend = false; } } //loops to recieve and decipher text while (connected) { thechar = cipherin.read(); Char = (char) thechar; if (Char!= '~') msg += Char; if (Char == '~') { updateui("you: " + msg.substring(0, msg.length()), true); msg = ""; } }

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.crypt.cryptapp" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="14" android:targetsdkversion="16" /> <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name="com.crypt.cryptapp.mainactivityserver" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> </application> <uses-permission android:name="android.permission.internet" /> </manifest>

Client Collapsed XML <LinearLayout > <EditText/> <TextView/> <LinearLayout> <Button/> </LinearLayout> <TextView/> <EditText/> Server Collapsed XML <LinearLayout > <TextView/> <TextView/> <EditText> <requestfocus /> </EditText> <Button/> </LinearLayout> <LinearLayout> <Button/> </LinearLayout> </LinearLayout>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".cryptmain" > <EditText android:id="@+id/edittext1" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:hint="ip Address / File to transfer" android:inputtype="numberdecimal text" /> <TextView android:id="@+id/main_local_ip_status_tv" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:text="ip_status_message" />

<EditText android:id="@+id/chat_etb" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:hint="enter message" > <requestfocus /> </EditText> <Button android:id="@+id/chat_btn" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="send Text" /> </LinearLayout>

Main Screens Client Screen with server IP entered Server showing its IP

Matched Server Public Key Client s display of the Server s Public Key Server Displaying Its generated Public Key

Client s displaying generated Public Key Matched Client Public Key Server Display of the Client s Public Key

Matched Session Keys