CS 627 Project RSA Encryption/Decryption supporting Big Integer Arithmetic …Sagar Chivate.

Slides:



Advertisements
Similar presentations
Compiling Web Scripts for Apache Jacob Matthews Luke Hoban Robby Findler Rice University.
Advertisements

Modular Programming With Functions
Factoring of Large Numbers using Number Field Sieve Matrix Step Chandana Anand, Arman Gungor, and Kimberly A. Thomas ECE 646 Fall 2006.
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Real-Time Authentication Using Digital Signature Schema Marissa Hollingsworth BOISECRYPT ‘09.
Efficient generation of cryptographically strong elliptic curves Shahar Papini Michael Krel Instructor : Barukh Ziv 1.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
The Analytical Engine Module 6 Program Translation.
Sets and Maps Chapter 9. Chapter 9: Sets and Maps2 Chapter Objectives To understand the Java Map and Set interfaces and how to use them To learn about.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Data Structure and Algorithm 1 Yingcai Xiao. You Me The Course (
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Templates. Objectives At the conclusion of this lesson, students should be able to Explain how function templates are used Correctly create a function.
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Protection of Agent Teamwork By Jeremy Hall. Agent Teamwork Overview ● Mobile agent framework  AgentTeamwork 2 is a mobile-agent based middleware system.
1 CSC241: Object Oriented Programming Lecture No 07.
The Fundamentals: Algorithms, the Integers & Matrices.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
CS102 Introduction to Computer Programming
MATH 224 – Discrete Mathematics
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 62 – Manipulating Data Using Methods – Day 1.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Sd&m software design & management GmbH & Co. KG Thomas-Dehler-Straße München Telefon (0 89) Telefax (0 89)
Programming With C.
File Structures Foundations of Computer Science  Cengage Learning.
Implementing RSA Encryption in Java
Strength of Cryptographic Systems Dr. C F Chong, Dr. K P Chow Department of Computer Science and Information Systems The University of Hong Kong.
Lecture #5 Introduction to C++
RSA Prepared by: SITI ZAINAH ADNAN
© 2005 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures for Java William H. Ford William R. Topp Chapter 28 Number.
Theory of Computation II Topic presented by: Alberto Aguilar Gonzalez.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 3, Lecture 1.
Lecture 5 1.What is a variable 2.What types of information are stored in a variable 3.Getting user input from the keyboard 1.
Chapter Twelve sed, awk & perl1 System Programming sed, awk & perl.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
File Systems cs550 Operating Systems David Monismith.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer Graphics Lab 1 OpenGL.
The Instruction Set Architecture. Hardware – Software boundary Java Program C Program Ada Program Compiler Instruction Set Architecture Microcode Hardware.
DIGITAL SIGNATURE IMPLEMENTATION
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
Sets and Maps Chapter 9. Chapter Objectives  To understand the Java Map and Set interfaces and how to use them  To learn about hash coding and its use.
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
RSA Algorithm Date: 96/10/17 Wun-Long Yang. Outline Introduction to RSA algorithm RSA efficient implementation & profiling.
CS 2130 Computational Structures (Discrete Mathematics for Computing)
General Purpose computing on Graphics Processing Units
INF230 Basics in C# Programming
Engineering Problem Solving With C An Object Based Approach
Type Checking Generalizes the concept of operands and operators to include subprograms and assignments Type checking is the activity of ensuring that the.
OpenGL project setup.
MatLab Programming By Kishan Kathiriya.
Outline of implementation
Lecture 2 of Computer Science II
C++ Programming: From Problem Analysis to Program Design
Chapter 27 WWW and HTTP.
Java for Teachers Intermediate
MIRACL & PBC Yung-Hsiang Liu.
Computer Science Projects Database Theory / Prototypes
Introduction to Data Structure
C++ Programming Basics
Presentation transcript:

CS 627 Project RSA Encryption/Decryption supporting Big Integer Arithmetic …Sagar Chivate

Motivation Curiosity to know how the big integer calculations are performed in real world Why RSA RSA allowed me to develop my own encryption and decryption algorithms, instead of using some already existing ones

Functionality Encryption Take file to be encrypted from user Take encryption key, n, output file from user Encrypt file and store encrypted file Decryption Take file to be decrypted from user Take decryption key, n, output file from user Decrypt file and store decrypted file

Other Functionality Find d from e Takes d and output file from user Uses Euclid’s algorithm Calculates e and stores it Find prime Takes number of bits, output file from user Calculates and stores prime of specified bit order Find N Calculates and stores N taking P and Q as input

System Architecture VB (exe) VC++ (dll) VC++ (lib) User Inter -face Encrypt / Decrypt Big Integer Calc. RSA.exe encryptdecrypt.dll bigint.lib

Development: Step1 Develop bigint.lib  Go to  Download NTL(library to do number theory)  Create a VC++ project: win32 statically linked library  Add all (96) files (.cpp and.h)in downloaded src folder to the project  Set category: Preprocessor, specify include path in directories  Build the project. It should successfully (with 49 warnings) create.lib file (size around 10MB)

About NTL Created by Victor Shoup (IBM) NTL is a high-performance, portable C++ library providing data structures and algorithms for manipulating signed, arbitrary length integers, and for vectors, matrices, and polynomials over the integers and over finite fields For big integers it supports: All basic mathematical operations (+, -,/,*,exp,mod,sqrt) Data type conversions Find GCD,primes,primality checking,next prime Bitwise operations Random number generation etc…

Implementation details of NTL ZZ is big integer data type implemented in NTL. It is actually a structure, which as a whole holds the big integer Most of the normal arithmetic operators are overloaded for ZZ data type All the calculation are performed at the bit level The maximum integer this can handle, is of the order of 2 2^15 bits integer. This is because the number of bits is handled as “long” (15 digit precision) everywhere, which puts the limit on the maximum order of the integer

Development: Step2 Develop encryptdecrypt.dll  Create a VC++ project: win32dynamic-link library  Implement methods for: Encryption, Decryption, calculate d from e, find prime, calculate n in a.cpp file  Use ZZ data type and inbuilt functions in bigint.lib to handle big integer arithmetic. Refer ZZ.h for prototypes of all supported functions  Throw the errors (if any) to calling RSA.exe  Create a.def (definition) file to specify dll entry points Build the project to create dll file

Development: Step3 Develop RSA.exe Create standard exe VB project Design and implement user interface Responsible for all user input/output and file handling Write wrapper functions for all the implemented methods in encryptdecrypt.dll Use encryptdecrypt.dll methods to achieve functionality Handle errors and prompt user with the perceived error Create executable (RSA.exe) file

Testing Generate two huge primes, p and q (of the order of 2048 bits) Select e (small to speed up encryption) Find d from e Encrypt any file Decrypt encrypted file Compare original file with the decrypted one. Ideally(!), they should match

Links 1.ARIBAS: It has own Pascal like scripting language. You can write your own functions. But its functionality is limited to handle mathematical operations.ARIBAS 2.LiDIA: A C++ Library For Computational Number Theory. The LiDIA Group at the Darmstadt University of Technology developed LiDIA. LiDIA 3.Bit::Vector: It is an efficient C library which allows you to handle "big integer arithmetic" There are also Perl wrapper modules developed for Bit::VectorBit::Vector 4.BeeCrypt: Java's BigInteger libraryBeeCrypt 5.MegaNumberS: It is prime number and very large integer R&D web site.MegaNumberS 6.NTL: Library to do number theoryNTL