Secure Programming Cookbook for C and C++ and over one million other books are available for Amazon Kindle. Learn more

Buy New

or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Buy Used
Used - Like New See details
$51.29 & this item ships for FREE with Super Saver Shipping. Details

or
Sign in to turn on 1-Click ordering.
 
   
Kindle Edition
 
   
Sell Back Your Copy
For a $9.03 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More
 
 
Start reading Secure Programming Cookbook for C and C++ on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More [Paperback]

John Viega (Author), Matt Messier (Author)
4.2 out of 5 stars  See all reviews (12 customer reviews)

List Price: $74.99
Price: $62.48 & this item ships for FREE with Super Saver Shipping. Details
You Save: $12.51 (17%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Want it delivered Monday, January 30? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $33.51  
Paperback $62.48  
Sell Back Your Copy for $9.03
Whether you buy it used on Amazon for $39.45 or somewhere else, you can sell it back through our Book Trade-In Program at the current price of $9.03.
Used Price$39.45
Trade-in Price$9.03
Price after
Trade-in
$30.42

Book Description

0596003943 978-0596003944 July 21, 2003 1

Password sniffing, spoofing, buffer overflows, and denial of service: these are only a few of the attacks on today's computer systems and networks. At the root of this epidemic is poorly written, poorly tested, and insecure code that puts everyone at risk. Clearly, today's developers need help figuring out how to write code that attackers won't be able to exploit. But writing such code is surprisingly difficult.

Secure Programming Cookbook for C and C++ is an important new resource for developers serious about writing secure code. It contains a wealth of solutions to problems faced by those who care about the security of their applications. It covers a wide range of topics, including safe initialization, access control, input validation, symmetric and public key cryptography, cryptographic hashes and MACs, authentication and key exchange, PKI, random numbers, and anti-tampering. The rich set of code samples provided in the book's more than 200 recipes will help programmers secure the C and C++ programs they write for both Unix® (including Linux®) and Windows® environments. Readers will learn:

  • How to avoid common programming errors, such as buffer overflows, race conditions, and format string problems
  • How to properly SSL-enable applications
  • How to create secure channels for client-server communication without SSL
  • How to integrate Public Key Infrastructure (PKI) into applications
  • Best practices for using cryptography properly
  • Techniques and strategies for properly validating input to programs
  • How to launch programs securely
  • How to use file access mechanisms properly
  • Techniques for protecting applications from reverse engineering
The book's web site supplements the book by providing a place to post new recipes, including those written in additional languages like Perl, Java, and Python. Monthly prizes will reward the best recipes submitted by readers.

Secure Programming Cookbook for C and C++ is destined to become an essential part of any developer's library, a code companion developers will turn to again and again as they seek to protect their systems from attackers and reduce the risks they face in today's dangerous world.

Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More + Network Security with OpenSSL + SSL and TLS: Designing and Building Secure Systems
Price For All Three: $125.47

Show availability and shipping details

Buy the selected items together
  • In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Network Security with OpenSSL $26.37

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • SSL and TLS: Designing and Building Secure Systems $36.62

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

Review

"This is a book that's long overdue and makes for an interesting and deeply technical read on a topic that we should all core about more. Yes, it's limited to C and C++ readers, but with the majority of key applications being written in these languages that's where the biggest benefit can be had - give the sample chapter a read, and you'll soon be on your way to the books store to buy the rest of it." "A powerful and initially somewhat scary book that will quickly get you thinking about security while you program - as opposed to as an afterthought." - Paul Hudson, LinuxFormat, Christmas 03 - Rating 10/10 - Top Stuff Award

About the Author

John Viega, Founder and Chief Scientist of Secure Software (www.securesoftware.com), is a well-known security expert, and coauthor of Building Secure Software (Addison-Wesley) and Network Security with OpenSSL (O'Reilly). John is responsible for numerous software security tools, and is the original author of Mailman, the GNU mailing list manager. He holds a B.A. and M.S. in Computer Science from the University of Virginia. Mr. Viega is also an Adjunct Professor of Computer Science at Virginia Tech (Blacksburg, VA) and a Senior Policy Researcher at the Cyberspace Policy Institute, and he serves on the Technical Advisory Board for the Open Web Applications Security Project. He also founded a Washington, D.C. area security interest group that conducts monthly lectures presented by leading experts in the field. He is the author or coauthor of nearly 80 technical publications, including numerous refereed research papers and trade articles.

Matt Messier, Director of Engineering at Secure Software, is a security authority who has been programming for nearly two decades. Besides coauthoring Network Security with OpenSSL, Matt coauthored the Safe C String Library, RATS, and EGADS, an Entropy Gathering and Distribution System used for securely seeding pseudo-random number generators. Prior to joining Secure Software, Matt worked for IBM and Lotus, on source and assembly level debugging techniques, and operating system concepts.


Product Details

  • Paperback: 792 pages
  • Publisher: O'Reilly Media; 1 edition (July 21, 2003)
  • Language: English
  • ISBN-10: 0596003943
  • ISBN-13: 978-0596003944
  • Product Dimensions: 9.2 x 7 x 1.5 inches
  • Shipping Weight: 2.4 pounds (View shipping rates and policies)
  • Average Customer Review: 4.2 out of 5 stars  See all reviews (12 customer reviews)
  • Amazon Best Sellers Rank: #578,471 in Books (See Top 100 in Books)

More About the Author

John Viega is CTO of the Software-as-a-Service Business Unit at McAfee, and was previously Vice President, Chief Security Architect at McAfee. John started out writing fiction in high school and college, but Randy Pausch (of Last Lecture Fame) convinced him to make a career in technology.

John lives in Boston, and has two daughters.

 

Customer Reviews

12 Reviews
5 star:
 (8)
4 star:
 (1)
3 star:
 (2)
2 star:    (0)
1 star:
 (1)
 
 
 
 
 
Average Customer Review
4.2 out of 5 stars (12 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

43 of 46 people found the following review helpful:
5.0 out of 5 stars An author's perspective, October 15, 2003
By 
This review is from: Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More (Paperback)
I thought I'd offer some insight on this book, particularly in light of a recently posted bad review that makes a bunch of criticisms that are quite wrong (I am pretty sure the review is due to a personal grudge held by someone who hasn't even read the book).

First, the goal of this book is to be a reference people can use to find solutions for "doing it right", not an elementary text on secure coding principles that gives a bunch of high-level advice that's still difficult to apply securely in practice. Security-relevant design and architecture principles are followed and discussed, but there's definitely a stated assumption that you have read a more elementary book such as "Building Secure Software", "Writing Secure Code" or the free "Secure Programming for Linux and UNIX HOWTO".

Second, the book covers all common security problems one sees in C and C++ programs, going so deep as to give working code and in-depth discussions. It spends hundreds of pages on how to implement and integrate cryptography into applications securely, a topic that is almost completely ignored in the elementary books (and even ignored in most crypto books, which teach building blocks, more than how to use them securely).

Many security problems that affect programs are largely language independent. We give C++-specific code in the few cases where there are C++-specific issues. But, for the most part, problems apply equally to C and C++. In those cases, the code is written in a subset of C that will work directly in C++ programs, but we don't take advantage of C++-specific features. To do so would result in a book nearly 1500 pages long!

All topics are covered for both Microsoft and Unix platforms (much of the code is cross-platform, and was tested on both). There are a couple of instances where a problem or solution doesn't apply to a particular platform. For example, "shatter" attacks are Windows specific, and the jail() protection mechanism works only on FreeBSD, not Windows. We have no platform bias, and even had the leading Windows secure programming expert from Microsoft review things.

This book gives detailed solutions for secure programming in a level of detail that no other book yet does, covering many topics that other books completely ignore.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


14 of 15 people found the following review helpful:
5.0 out of 5 stars Bought it for one reason but ended up using it., October 16, 2003
By 
"lucincia" (Cedar Rapids, IA United States) - See all my reviews
This review is from: Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More (Paperback)
To be truthful, I bought this book because the "gang" I hang out with is mentioned in the Acknowledgments section of the book. That was the ONLY reason when I sent money to Amazon.Com and purchased it for the dusty collection on my bookshelf.

But, when I got it and chuckled over the Acknowledgements section, I started to mindlessly flip through the book. Mindless page flipping soon turned to semi-conscious scanning. Semi-conscious scanning soon turned to serious reading. I find myself reading the book more and more, jumping back and forth between sections I find interesting and useful.

As a Windows C++ programmer for in-house tools, I do not dwell much on secure programming concepts. Yes, this is very, very bad way to program, so those of you reading this review should not try it at home. This book has shown the errors of my ways, revealed security issues that I have overlooked by accident or on purpose and gave concepts and examples that I can apply in my projects.

This book is one reference that I will be going back over and over again. The authors and editors have done a wonderful job to make the reading flow nice and easy. It is also very well laid out by stating the problem you may encounter, followed by a solution and then detailed discussion section with code samples.

For any C/C++ programmer making software to be used by more than one person, this reference book is a must.

You can still read the Acknowledgments and marvel at my name on there, of course.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


16 of 18 people found the following review helpful:
5.0 out of 5 stars Voluminous and comprehensive, August 17, 2003
This review is from: Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More (Paperback)
If you are interested in encryption, you should probably get Bruce Schneier's Applied Cryptography, which is generally considered the standard summary of the field. But suppose you actually want to use some of the symmetric key or public key methods he describes? If you want to code from scratch, his book is a good starting point. But if you want to quickly avail yourself of the best existing methods and you don't want to reinvent the wheel by recoding? Also, it can be risky to do that. A mistake made in coding a crypto algorithm might render it insecure. Better to use reviewed, tested code.

If this describes your needs and you code in C or C++, then this book will be invaluable. Extensive code fragments that show how you can interface to existing crypto packages. Very detailed. You won't find theorems or any elegant maths here. No Chinese Remainder Theorem or Fermat's theorems. You have to already know or accept the theoretical underpinnings.

Given this, the book takes you into the nitty gritty of every major publicly available cryptosystem. With up to date assessments of their comparative strengths.

All of the above is aimed at application developers. The book also has sections for sysadmins of both unix and Microsoft operating systems, replete with suggestions on patching and good practice.

Don't be daunted by the book's heft. It is encyclopaedic in scope, and access is reasonably random access. The authors have striven to comprehensively span the field. You don't have to read from start to finish before you can commence using it.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews










Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
symmetric encryption, input validation, authentication method, secure software, performing authentication, raw key data, entropy server, cipher setup, own secure channel, collecting entropy, internal block size, cipher interface, unsigned char hash, raw encryption, capture replay attacks, resource starvation attacks, int keylen, wordlist file, dropping privileges, cipher context, unsigned char key, provable security properties, incremental interface, authenticated secure channel, message integrity checking
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Solution Use, Public Key Infrastructure, Random Numbers, Mode Implementation, Safe Initialization, Symmetric Cryptography Fundamentals, Solution On Unix, Access Control, Certificate Verification, Solution There, Brian Gladman, Performing Password-Based Authentication, Authenticated Secure Channel Without, Guarding Against Resource Starvation Attacks, Discussion Hash, Restricting Privileges, Obtaining Certificate Revocation Lists, Network Security, Confirming Requests, Restricting Access Based, Application-Level Generator, John Viega, Discussion There, Deriving Symmetric Keys, Performing Interprocess Communication Using Sockets
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:

What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...



Look for Similar Items by Category


Look for Similar Items by Subject