300 likes | 409 Views
Capstone Project Presentation A Tool for Cryptography Problem Generation. CSc 499 Mark Weston Winter 2006. Introduction. Idea: Improve Math 121 Problem Generation Client: Professor Kathryn Lesh Current system: Excel based Goal: A better tool for problem generation. Outline.
E N D
Capstone Project PresentationA Tool for Cryptography Problem Generation CSc 499 Mark Weston Winter 2006
Introduction • Idea: Improve Math 121 Problem Generation • Client: Professor Kathryn Lesh • Current system: Excel based • Goal: A better tool for problem generation
Outline • Purpose • A Strategy for Problem Generation • Design • Interface, Demo, Results
Purpose Given a problem type from the course, can we generate “good” instances of the type?
Outline • Purpose • A Strategy for Problem Generation • Design • Interface, Demo, Results
A Strategy for Problem Generation • How to address goodness? • Use student work • Extract measurements: metrics • Algorithms: close relationship • Example metrics • Steps of problem type algorithm(s) • Maximum, minimum values • Trial Count • And many more…
A Strategy for Problem Generation • Idea of metrics gives us our strategy • “Generate and Test” Generate Problem Type Instance Input Desired Metrics Choose Problem Type Test Unsuccessful Test Solution Metrics Test Successful Solve Instance Done
Feasibility of Generate and Test • Random generation • No guarantee • Initial design planned to improve this • Sufficient? • Yes (!)
Problem List • Modular Addition, Subtraction, Multiplication • Properties of Divisibility • GCD • Extended Euclidean Algorithm • Linear Combination Theorem • Modular Exponentiation by Repeated Squares and Square-and-Multiply • Chinese Remainder Theorem Applications • Evaluating Jacobi Symbols • Solovay-Strassen Primality Testing • RSA Key Generation • RSA Signatures • Primitive Root Testing • Factoring by Pollard’s p-1 • Prime Factorization of a Composite • Cryptographic Coin Toss • Factoring by Dixon’s Random Squares
Problem List • Modular Addition, Subtraction, Multiplication • Properties of Divisibility Not needed • GCD • Extended Euclidean Algorithm • Linear Combination Theorem • Modular Exponentiation by Repeated Squares and Square-and-Multiply • Chinese Remainder Theorem Applications • Evaluating Jacobi Symbols • Solovay-Strassen Primality Testing • RSA Key Generation • RSA Signatures • Primitive Root Testing • Factoring by Pollard’s p-1 • Prime Factorization of a Composite • Cryptographic Coin Toss • Factoring by Dixon’s Random Squares
Problem List • Modular Addition, Subtraction, Multiplication • Properties of Divisibility Not needed • GCD • Extended Euclidean Algorithm Collapse w/ LCT • Linear Combination Theorem Collapse w/ EE • Modular Exponentiation by Repeated Squares and Square-and-Multiply • Chinese Remainder Theorem Applications • Evaluating Jacobi Symbols • Solovay-Strassen Primality Testing • RSA Key Generation • RSA Signatures Collapse w/ Mod. Exp. • Primitive Root Testing • Factoring by Pollard’s p-1 • Prime Factorization of a Composite Collapse w/ Pollard • Cryptographic Coin Toss • Factoring by Dixon’s Random Squares
Problem List • Modular Addition, Subtraction, Multiplication • Properties of Divisibility Not needed • GCD • Extended Euclidean Algorithm Collapse w/ LCT • Linear Combination Theorem Collapse w/ EE • Modular Exponentiation by Repeated Squares and Square-and-Multiply • Chinese Remainder Theorem Applications • Evaluating Jacobi Symbols • Solovay-Strassen Primality Testing • RSA Key Generation • RSA Signatures Collapse w/ Mod. Exp. • Primitive Root Testing • Factoring by Pollard’s p-1 • Prime Factorization of a Composite Collapse w/ Pollard • Cryptographic Coin Toss Feasible? • Factoring by Dixon’s Random Squares Feasible?
Problem List (final) • Modular Addition, Subtraction, Multiplication • GCD • Extended Euclidean Algorithm • Modular Exponentiation by Repeated Squares and Square-and-Multiply • Chinese Remainder Theorem Applications • Evaluating Jacobi Symbols • Solovay-Strassen Primality Testing • RSA Key Generation • Primitive Root Testing • Factoring by Pollard’s p-1 • Factoring by Dixon’s Random Squares Feasible • Cryptographic Coin Toss Feasible
Outline • Purpose • A Strategy for Problem Generation • Design • Interface, Demo, Results
Design, Requirements • Design • Follows from generation strategy • A component that generates problems • A component that solves problems • An interface to provide input • Implementation Choice • Java • Java Applet
Other Requirements • Modular • Configure for students • Full Output • Data structures • To deal with number precision • Limit maximum number of digits
Outline • Purpose • A Strategy for Problem Generation • Design • Interface, Demo, Results
Interface, Demo, Results • Go • Source: nsa.gov
Conclusion • One tool – many features • Many problem types • Calculation / Generation • Variable precision, full algorithms • Full output • Refined interface • Students / Professors • Free • No install, lightweight, multiplatform • Support available
Future work • More problems • Usability / Interface • Other improvements • New algorithms • Other Crypto-systems
Thanks! • Client: Professor Kathryn Lesh • Advisor: Professor Brian Postow • Interface Consultants: Professors Chris Fernandes and Aaron Cass
Configuring an Applet • Sign it • Gives permissions to the machine it’s running on • Don’t want the configuration file there… • Want access to the machine the applet is running on • File system access here is tricky, once the applet starts running • Work around • Work around • Have the applet make a URL Connection to the machine it came from • This is legal, even for an unsigned applet • We can then read a file, and configure from that • Plain text • XML • Etc.
Generation of complicated problems • Intelligence • Complexity source • Algorithm • Metrics • Composition • Target sub problems
Dealing with precision, size of numbers • Use a number class • Arithmetic with objects!? • Vary internal representation independently of the interface • Limit number of digits • Watch Number class for add/multiply - cause growth • Exception? • Restart the problem • Lower inputs • Try 10 times, give up
An Example • Greatest Common Divisor (GCD) • A problem type has: • Inputs -> Instance • GCD(a, b), vary values a and b • Algorithm -> Metric of “Goodness” • The Euclidean Algorithm and the number of steps it takes