Join Amazon Prime and ship Two-Day for free and Overnight for $3.99. Already a member? Sign in.

 

or
Sign in to turn on 1-Click ordering.
 
 
More Buying Choices
27 used & new from $29.99

Have one to sell? Sell yours here
 
   
Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get yours here.
 
  

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

by John Viega (Author), Matt Messier (Author)
Key Phrases: symmetric encryption, input validation, authentication method, Solution Use, Public Key Infrastructure, Random Numbers (more...)
4.6 out of 5 stars See all reviews (12 customer reviews)

List Price: $74.99
Price: $67.49 & this item ships for FREE with Super Saver Shipping. Details
You Save: $7.50 (10%)
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
Temporarily out of stock.
Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we ship the item.
Ships from and sold by Amazon.com. Gift-wrap available.

13 new from $55.00 14 used from $29.99
Like this book? Find similar titles from O'Reilly and Partners in our O'Reilly Bookstore.

Best Value

Buy Java Cryptography (Java Series) and get Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More at an additional 5% off Amazon.com's everyday low price.

Java Cryptography (Java Series) + Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More
Buy Together Today: $93.81

One of these items ships sooner than the other. Show details

  • Java Cryptography (Java Series)

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

  • This item: Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More

    Temporarily out of stock.
    Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we ship the item.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

Network Security with OpenSSL

Network Security with OpenSSL

by John Viega
4.5 out of 5 stars (10)  $26.37
Secure Coding in C and C++ (SEI Series in Software Engineering)

Secure Coding in C and C++ (SEI Series in Software Engineering)

by Robert C. Seacord
5.0 out of 5 stars (7)  $40.45
SSL and TLS: Designing and Building Secure Systems

SSL and TLS: Designing and Building Secure Systems

by Eric Rescorla
4.5 out of 5 stars (22)  $38.99
Building Secure Software: How to Avoid Security Problems the Right Way (Addison-Wesley Professional Computing Series)

Building Secure Software: How to Avoid Security Problems the Right Way (Addison-Wesley Professional Computing Series)

by John Viega
4.2 out of 5 stars (26)  $47.99
Applied Cryptography: Protocols, Algorithms, and Source Code in C, Second Edition

Applied Cryptography: Protocols, Algorithms, and Source Code in C, Second Edition

by Bruce Schneier
4.6 out of 5 stars (101)  $37.80
Explore similar items

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

Product Description
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. 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. The 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.

See all Editorial Reviews

Product Details

  • Paperback: 790 pages
  • Publisher: O'Reilly Media, Inc. (July 14, 2003)
  • Language: English
  • ISBN-10: 0596003943
  • ISBN-13: 978-0596003944
  • Product Dimensions: 9 x 6.9 x 1.5 inches
  • Shipping Weight: 2.4 pounds (View shipping rates and policies)
  • Average Customer Review: 4.6 out of 5 stars See all reviews (12 customer reviews)
  • Amazon.com Sales Rank: #121,399 in Books (See Bestsellers in Books)

    Popular in these categories: (What's this?)

    #13 in  Books > Computers & Internet > Programming > Algorithms > Cryptography
    #19 in  Books > Computers & Internet > Networking > Network Programming

Inside This Book (learn more)

What Do Customers Ultimately Buy After Viewing This Item?

Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More
61% buy the item featured on this page:
Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More 4.6 out of 5 stars (12)
$67.49
Network Security with OpenSSL
16% buy
Network Security with OpenSSL 4.5 out of 5 stars (10)
$26.37
Secure Coding in C and C++ (SEI Series in Software Engineering)
11% buy
Secure Coding in C and C++ (SEI Series in Software Engineering) 5.0 out of 5 stars (7)
$40.45
SSL and TLS: Designing and Building Secure Systems
7% buy
SSL and TLS: Designing and Building Secure Systems 4.5 out of 5 stars (22)
$38.99

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
Check the boxes next to the tags you consider relevant or enter your own tags in the field below.

Your tags: Add your first tag
 
Help others find this product — tag it for Amazon search
No one has tagged this product for Amazon search yet. Why not be the first to suggest a search for which it should appear?

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

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

 
31 of 32 people found the following review helpful:
5.0 out of 5 stars Much more than I had expected, very good., August 4, 2003
I hadn't anticipated the heavy amount of crypto related chapters in this book. I honestly had only read about the input validation, avoiding overflows, and access control portions. It turns out it covers those areas plus a wide range of crypto related code. It goes over the fundamentals of Symmetric Crypto in great detail, from simple base64 encoding to parallelizing Encryption and decryption in arbitrary modes. All of the crypto related portions of this book are very clear. I highly recommend this book if you are doing any kind of crypto, whether it's simply encrypting a password, a file, or setting up a socket based secure communication tunnel.

The Networking chapter is a very good reference section for creating SSL clients and servers, as well as using kerberos or securing your connections to your database. There is almost 80 pages of information related to generating random numbers and data from using /dev/random to gathering entropy from Mouse Evens on Win32.

The one chapter I didn't expect to see here that was quite good was Chapter 12, Anti-Tampering. This chapter goes over obfuscating your code, detecting binary modifications, disguising boolean values, etc. It even shows you how to detect SoftICE and other debuggers, which can be useful for attempting to block people from cracking your commercial software. Although, I believe all attempts end up being rather futile when someone is determined enough.

This book really is a must for anyone who is programming. If not just for the basics of protecting yourself from overflows and validating input and environment variables, than definitely for the extremely well written sections on crypto. This book has earned a permanent spot next to K&R and UNP on my desk.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
36 of 39 people found the following review helpful:
5.0 out of 5 stars An author's perspective, October 15, 2003
By John Viega (Boston, MA) - See all my reviews
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.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
15 of 16 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
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.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


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

4.0 out of 5 stars Good developer reference
This is a well-written and example oriented book for C/C++ programmers that covers secure programming in all aspects. Read more
Published on March 22, 2006 by Jonathan Smith

3.0 out of 5 stars a good reference if you've really got to be secure
If you are not sure that you need this book, then you probably don't. But if there is something it the table of contents that you've got to know, and you've got to get it right,... Read more
Published on May 13, 2004 by andrew m fuqua

5.0 out of 5 stars Great book for anyone using C
This is simply a great book for anyone using C or C++.

These guys literally wrote the book on secure code.

Read it!

Published on October 30, 2003 by Eric Kent

3.0 out of 5 stars A task-oriented reference guide
This well-written book covers a lot of topics that I have not read in other books.

Its strengths include:

--Good coverage of cryptography programming
--Task-oriented... Read more

Published on October 16, 2003

5.0 out of 5 stars Secure Programming Recipes
This book is an asset to anyone whose profession requires them to write code. In this day and age code must be designed and written from the beginning with security in mind. Read more
Published on October 15, 2003

5.0 out of 5 stars A valuable tool on the programmers bookshelf
There are many books on how to write programs in C and C++, and many people learn to write programs from them. Read more
Published on September 16, 2003 by Daniel Weeks

5.0 out of 5 stars Required reading if you code in C
This book is required reading if you code in C or C++.

While there are a lot of security problems with C, the authors show how to get around them and write secure code.

Published on September 4, 2003 by Eric Kent

5.0 out of 5 stars Voluminous and comprehensive
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. Read more
Published on August 17, 2003 by W Boudville

5.0 out of 5 stars best o'reilly book I've ever purchased
If you develop software, any kind of software, you need this book.

The importance of understanding the security surrounding the development of software is finally being... Read more

Published on August 8, 2003 by Brian Wotring

Only search this product's reviews



Customer Discussions

 Beta (What's this?)
New! See all customer communities, and bookmark your communities to keep track of them.
This product's forum (0 discussions)
  Discussion Replies Latest Post
  No discussions yet

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


Active discussions in related forums
  Discussion Replies Latest Post
Jobs for Self Taught Programmers? 41 2 hours ago
C# or Java? 33 2 hours ago
   


Product Information from the Amapedia Community

Beta (What's this?)

Listmania!



Look for Similar Items by Category


Avon: Free Shipping

Avon Mark Just Pinched Instant Blush Tint
Get free shipping on all Avon orders of $25 or more. Shop Avon's award-winning makeup, skin care, bath & body items, and more.

Shop Avon now

 

Big Savings in Books

Bargain Books
Find great titles at fantastic prices in our Bargain Books Store.
 

Buy Three Books, Get a Fourth Free

4-for-3 Books
Order any four eligible books under $10 and get the lowest-price book free in our 4-for-3 Books Store. See more details.
 

Best Books

Best of the Month
See our editors' picks and more of the best new books on our Best of the Month page.
 
Ad

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Where's My Stuff?

Shipping & Returns

Need Help?

Your Recent History

  (What's this?)
You have no recently viewed items or searches.

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.

Look to the right column to find helpful suggestions for your shopping session.

Continue shopping: Top Sellers
Free
Free by Chris Anderson
Paranoia
Paranoia by Joseph Finder
My Soul to Lose
My Soul to Lose by Rachel Vincent
Darkfever
Darkfever by Karen Marie Moning

Conditions of Use | Privacy Notice © 1996-2009, Amazon.com, Inc. or its affiliates