Description

Implementing cryptography requires integers of significant magnitude to resist cryptanalytic attacks. Modern programming languages only provide support for integers which are relatively small and single precision. The purpose of this text is to instruct the reader regarding how to implement efficient multiple precision algorithms. Bignum math is the backbone of modern computer security algorithms. It is the ability to work with hundred-digit numbers efficiently using techniques that are both elegant and occasionally bizarre. This book introduces the reader to the concept of bignum algorithms and proceeds to build an entire library of functionality from the ground up. Through the use of theory, pseudo-code and actual fielded C source code the book explains each and every algorithm that goes into a modern bignum library. Excellent for the student as a learning tool and practitioner as a reference alike BigNum Math is for anyone with a background in computer science who has taken introductory level mathematic courses. The text is for students learning mathematics and cryptography as well as the practioner who needs a reference for any of the algorithms documented within.

Key Features

* Complete coverage of Karatsuba Multiplication, the Barrett Algorithm, Toom-Cook 3-Way Multiplication, and More * Tom St Denis is the developer of the industry standard cryptographic suite of tools called LibTom. * This book provides step-by-step exercises to enforce concepts

Readership

Any programmer implementing public-key cryptography algorithms needs to grasp BigNum Math. BigNum Math is for anyone with a background in computer science who has taken introductory level mathematic courses. The text is for students learning mathematics and cryptography as well as the practioner who needs a reference for any of the algorithms documented within.

Table of Contents

Introduction 1 1.1 Multiple Precision Arithmetic 1.1.1 What is Multiple Precision Arithmetic? 1.1.2 The Need for Multiple Precision Arithmetic 1.1.3 Benefits of Multiple Precision Arithmetic 1.2 Purpose of This Text 1.3 Discussion and Notation 1.3.1 Notation 1.3.2 Precision Notation 1.3.3 Algorithm Inputs and Outputs 1.3.4 Mathematical Expressions 1.4 Exercises 1.5 Introduction to LibTomMath 1.5.1 What is LibTomMath? 1.5.2 Goals of LibTomMath 1.6 Choice of LibTomMath 1.6.1 Code Base 1.6.3 Optimizations 1.6.4 Portability and Stability 1.6.5 Choice 2 Getting Started 13 2.1 Library Basics 2.2 What is a Multiple Precision Integer? 2.2.1 The mp int Structure 2.3 Argument Passing 2.5 Initialization and Clearing 2.5.1 Initializing an mp int 2.5.2 Clearing an mp int 2.6 Maintenance Algorithms 2.6.1 Augmenting an mp int’s Precision 2.6.2 Initializing Variable Precision mp ints 2.6.3 Multiple Integer Initializations and Clearings 2.6.4 Clamping Excess Digit 3 Basic Operations 35 3.1 Introduction 3.2 Assigning Values to mp int Structures 3.2.1 Copying an mp int 3.3 Zeroing an Integer . 3.4 Sign Manipulation 3.4.1 Absolute Value 3.4.2 Integer Negation 3.5.1 Setting Small Constants . 3.5.2 Setting Large Constants . 3.6 Comparisons . 3.6.1 Unsigned Comparisions 3.6.2 Signed Comparisons 4 Basic Arithmetic 53 4.1 Introduction 4.2.2 Low Level Subtracti

Details

No. of pages:
291
Language:
English
Copyright:
© 2006
Published:
Imprint:
Syngress
Electronic ISBN:
9780080488387
Print ISBN:
9781597491129

About the author

Tom St Denis

Tom St Denis is the author of the industry standard LibTom series of projects. Tom is a senior software developer and cryptographer for the Advanced Micro Devices Corporation. He has been engaged in various international development contracts and speaking engagements since 2004. He is at work on his next book, Cryptography for Developers.