Q

Password encryption program: Best practices and alternatives

If you want to create password encryption code, check out these best practices from IAM expert Randall Gamby. He also offers alternatives to encrypting, such as using Kerberos or Federation SAML.

What best practices are there for writing code to encrypt a password? Could you provide or point to sample code?

Interesting question: First, I'd have to ask why you're implementing a password encryption program to begin with, instead of letting an operating system or application manage this bit of information. I assume you're asking in the context of writing the application that will manage the encryption code itself.

The general contemporary thinking in this regard is not to put passwords in code, but to use certificates, like Kerberos, or trust relationship information, like Federation SAML assertions, in the code since any hacker with enough time and energy can eventually crack an encrypted password.

With that said, however, best practices for encryption depend on what language you're writing in. There are two sites that come to mind (granted, googling "encrypt password" will show a number of sites with sample code): One is Encrypt HTML, which has a number of tools, not just html; the other is JavaScript Kit, which allows you to put in a password and it will generate java code for you. Good luck, and happy writing.

For more information:

This was first published in March 2010

Dig deeper on Password Management and Policy

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchCloudSecurity

SearchNetworking

SearchCIO

SearchConsumerization

SearchEnterpriseDesktop

SearchCloudComputing

ComputerWeekly

Close