Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If we have a large development team, say 100, and we would like to keep our encryption key hidden from developers who are not directly involved in the encryption module/algorithm, what are some best practices to keep this key as secret as possible while still allowing for development and debugging?

share|improve this question
Can't you just generate a key for development/debugging and then later generate one for production? – Jon Lin Jul 20 '12 at 17:50
No, testing involves the entire system, the key would be used in multiple products. – Nick Sinas Jul 20 '12 at 19:03
What kind of key are you talking about? – CodesInChaos Jul 24 '12 at 10:18

The Apache foundation has a pretty simple yet effective way to handle this. The encryption key (or code signing cert) lives in a separate repository only accessible by the trusted and the BuildBot. When building the bits that need the key, the bot checks it out -- or more properly just downloads it -- and includes it in the appropriate place in the solution. You get change control and security while not interrupting the modern development practice.

All that said, I would address the underlying problem of not being able to fob the encryption key off to infrastructure that dev never has to see.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.