“TEST - Multiply-by-two” X 2

Slides:



Advertisements
Similar presentations
Slide-1 University of Maryland Five Common Defect Types in Parallel Computing Prepared for Applied Parallel Computing Prof. Alan Edelman Taiga Nakamura.
Advertisements

Introduction to Assembly language
CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
Files in C Rohit Khokher. Files in C Real life situations involve large volume of data and in such cases, the console oriented I/O operations pose two.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Embedded Systems Programming Introduction to cross development techniques.
Programming The Development Environment and Your First C Program.
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
Chapter 3 Software Two major types of software
Computer Software.
Chapter 1 - Introduction. Ch 1Goals To understand the activity of programming To learn about the architecture of computers To learn about machine code.
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
By: Mr. Baha Hanene Chapter 3. Learning Outcomes We will cover the learning outcome 02 in this chapter i.e. Use basic data-types and input / output in.
Java the UML Way version Only to be used in connection with the book "Java the UML Way", by Else Lervik and.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
CIS Computer Programming Logic
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
CISC105 General Computer Science Class 1 – 6/5/2006.
C for Java Programmers Tomasz Müldner Copyright:  Addison-Wesley Publishing Company, 2000 Introduction to C Muldner, Chapters 1, 2.
1 Agenda Administration Background Our first C program Working environment Exercise Memory and Variables.
Lone Leth Thomsen Input / Output and Files. April 2006Basis-C-8/LL2 sprintf() and sscanf() The functions sprintf() and sscanf() are string versions of.
CP104 Introduction to Programming File I/O Lecture 33 __ 1 File Input/Output Text file and binary files File Input/output File input / output functions.
Introduction to Computers and Java Chapter 1.3. A Sip of Java: Outline History of the Java Language Applets A First Java Program Compiling a Java Program.
Input & Output In Java. Input & Output It is very complicated for a computer to show how information is processed. Although a computer is very good at.
Fall 2006Slides adapted from Java Concepts companion slides1 Introduction Advanced Programming ICOM 4015 Lecture 1 Reading: Java Concepts Chapter 1.
Chapter 8 : Binary Data Files1 Binary Data Files CHAPTER 8.
CSE1301 Computer Programming: Lecture 14 I/O and Files.
Chapter 7 Files By C. Shing ITEC Dept Radford University.
CS415 C++ Programming Takamitsu Kawai x4212 G11 CERC building WV Virtual Environments Lab West Virginia University.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
FOCOMM_CAMAC Setup and Usage Guide Andrew Wong, Larry Ruckman.
FILES. open() The open() function takes a filename and path as input and returns a file object. file object = open(file_name [, access_mode][, buffering])
ME-2221 COMPUTER PROGRAMMING Lecture 18 FILE OPERATIONS Department of Mechanical Engineering A.H.M Fazle Elahi Khulna University of engineering & Technology.
Program Development Cycle 1.Edit program 2.Compile program - translates it from C to machine language 3. Run/execute your program. 4. If not satisfied,
Computer Programming A simple example /* HelloWorld: A simple C program */ #include int main (void) { printf (“Hello world!\n”); return.
FILES IN C. File Operations  Creation of a new file  Opening an existing file  Reading from a file  Writing to a file  Moving to a specific location.
Connecting to Files In order to read or write to a file, we need to make a connection to it. There are several functions for doing this. fopen() – makes.
C Programming Day 2. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/LA07/003 Version No. 1.0 Union –mechanism to create user defined data types.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Chapter 1 slides1 What is C? A high-level language that is extremely useful for engineering computations. A computer language that has endured for almost.
Hank Childs, University of Oregon April 15 th, 2016 CIS 330: _ _ _ _ ______ _ _____ / / / /___ (_) __ ____ _____ ____/ / / ____/ _/_/ ____/__ __ / / /
Lecture 3: Getting Started & Input / Output (I/O)
INC 161 , CPE 100 Computer Programming
Putting Computer Systems to Work
Development Environment
Egyptian Language School
Engineering Problem Solving With C An Object Based Approach
Hardware and Software Hardware refers to the physical devices of the computer system e.g. monitor, keyboard, printer, RAM etc. Software is a set of programs,
CSCI-235 Micro-Computer Applications
Microprocessor Systems Design I
An Introduction to C Programming
File I/O.
CO6025 Advanced Programming
CS111 Computer Programming
Teaching Computing to GCSE
Teaching Computing to GCSE
Programming languages and software development
Hank Childs, University of Oregon
File I/O We are used to reading from and writing to the terminal:
Text and Binary File Processing
How Computers Work Part 1 6 February 2008.
Understand the interaction between computer hardware and software
Tonga Institute of Higher Education IT 141: Information Systems
C Preprocessing File I/O
Tonga Institute of Higher Education IT 141: Information Systems
ULTRA-FAST BIQUAD FILTERING OPTIMIZED FOR CORTEX-M4/M7
File I/O We are used to reading from and writing to the terminal:
Presentation transcript:

“TEST - Multiply-by-two” X 2 Example of source-code package to explain the delivery procedure X 2 Package’s LOGO

Source-code package overview What the code do, which language is used Type of processing, references to public data on Internet, language (C, C++, Matlab, Perl, ..), processor’s assembly.. What it does not Remove any type of confusion before next slides which give the detailed APIs Which compilation tool is used with which revision and operating system List of the Matlab libraries used, C language syntax version, where can the compilers be downloaded, any specific information related to the OS used. CPU and RAM consumption with or without floating point accelerator Performance data for MHz, RAM, wait-states (map-file is part of the package when applicable), which CPU revision is assumed with which instruction-set.

Source-code package details List of the APIs APIs with detailed parameters. A “main” function is provided as example. Data example Explanations for the provided data given as activation examples (file formats, data scaling ..) Exceptions For example : what happens when the input files have not the right format. Computation results File formats of the results, graphical view.

Code extracts and other details APIs code extracts Screen-shots of the program usage. List of the files in the package Screen-shots of the file listings. Deciphering process How to decipher the source-code and file listings

“TEST - Multiply-by-two” X 2 Deciphering tools X 2 Package’s LOGO

Source-code delivery procedure Each software package contains : An overview in PDF format, with APIs, performances, … A “main” calling the subroutine Test-patterns and corresponding results The source codes {1,2,3} are free of access, {4} is encrypted with a picture used as a key. Once your payment is accepted we give you the key to decipher it.

Encryption process (done offline, the key is never on the site) The source-code folder is packed and compressed : tar cvfz src.tar.gz source_code_folder The compressed file is encrypted using a picture used as key : perl xor_img.pl src.tar.gz key.jpg src.otp The result is translated to a text file format : base64 src.otp > file_to_download.txt Deciphering process The file found on our site is translated to binary format : base64 -d file_downloaded.txt > src.otp Deciphering made from the picture-key you received by mail from us : The result source-code folder is unpacked and uncompressed : tar xvfz src.tar.gz ls source_code_folder\*

Example Source-code folder “./P6_TEST_PROT” packed and compressed to file “src.tar.gz”. Encryption using the key-file “KEY0.jpg” and conversion to text format. Dump of the text. Conversion to binary, deciphering, unpacking and recovery of the original source-code folder. tar cvfz src.tar.gz P6_TEST_PROT P6_TEST_PROT/ P6_TEST_PROT/TEST.m P6_TEST_PROT/TEST_TOP.m perl xor_img.pl src.tar.gz KEY0.jpg src.otp base64 src.otp > src.txt cat src.txt 4FP34H/kvBBJRe2VTG7beAzOfTZvJMAIgHRZNn36UfbUnxlu22sqD8BVX2K1Z0420v/+VnDVI8y8 WdWszPOVbJF2/c0zM8aA85xj/2768mfw1nYRjBojBq7f0FI/j5AmCDT4wL0zyfQ4RfQsgbEsgO8o +CxxKTN3+Mo+AezFyyLHzih3IuJauUBE9GK0Oqv8eS5qt/l7p0Ph3cN0pfKG2m76F+Zx/ioNMy2C oSr4CO54AmM3+GHiTmT93N1rglrf9m27AqOW9hbRHz5T+GM9joAQro9eNEXAHbrFFsE68yQAp39d 8qovVB67LPG7tlBoUfPEL410taQ/v6DWLEcOcMQdSCqjRk0ItLptl7qmRqqlnoHkP3skEmhqjw7Q Viq7QlU5xrKjom2kB2X0ukJXN7w8tFNMMMVKaQdSSOBt5wA1S3jKeodzNQpMWRuqlMZxZZJtN8hZ oKFf1TiiYEoRV2REhTytI1jHQXFn57YM+m0QMdZaujo2nNRgk3+yK3KWbmi1LVYdgtFadQKT+sSe 9cbx83tOqueTamY5MJBK6Zc3VJE1UIxNZvuRsYa1zWxru5cR+xsw7se1H0K1Zc+xmrq86gYetqTV 6Mgc8uvPsZBIGNEw2yi8Z3Rv0zPebEaFf/wRLVkfHslYGXTHykoogKoM6hTfW4SAqwtUQQdXTAha VxVFUhZIXRtzYCR2Y5lHk36DbBCHeFF6gg== base64 -d src.txt > src.otp perl xor_img.pl src.otp KEY0.jpg src.tar.gz tar xvfz src.tar.gz

Screen-shot

Cipher programs in Perl and C #include <stdio.h> void main (int argc, char *argv[]) { FILE *out_file, *inp_file, *key_file; int i, n; char ci, ck, co; if ((0 == (inp_file = fopen (argv[1], "rb"))) || (0 == (key_file = fopen (argv[2], "rb"))) || (0 == (out_file = fopen (argv[3], "wb"))) ) { printf("fopen error \n");} else { i = 0; n = fread (&ci, 1, 1, inp_file); while (n > 0) fread (&ck, 1, 1, key_file); co = ci ^ ck; fwrite (&co, 1, 1, out_file); i++; if (i > 8191) fclose (key_file); key_file = fopen (argv[2], "rb"); i = 0; } fclose (out_file); fclose (inp_file); #!/usr/bin/perl open INPUT, "<$ARGV[0]" ; binmode INPUT; open INPUTKEY, "<$ARGV[1]"; binmode INPUTKEY; open OUTPUT, ">$ARGV[2]"; binmode OUTPUT; $i = 0; while (($n = read INPUT, $byte, 1) != 0) { read INPUTKEY, $key, 1; $xored = $byte ^ $key; print OUTPUT $xored; $i = $i+1; if ($i > 8191) close INPUTKEY; open INPUTKEY, "<$ARGV[1]"; binmode INPUTKEY; } close INPUT; close OUTPUT; close INPUTKEY;