COPYRIGHT RESERVED 2009 BY MAX TSAI



Visit Max Tsai at Facebook | Twitter | atom

Showing posts with label Architecture. Show all posts
Showing posts with label Architecture. Show all posts

Friday, February 20, 2009

Regeneratable Passwords, but still Safe (I hope so)

It comes up a need to create regenerate'ble passwords for users, but need to made sure no one else can regenerate or decode it. Here is the idea:
  1. Using user id, i.e. maxtheman
  2. Add a secret salt in the beginning and the end of the User ID, for instance,
    $preSalt="aloha";
    $postSalt="goodbye";
    $Token = $preSalt + $UID + $postSalt;
    for our example, it is "alohamaxthemangoodbye"
  3. Hash it with md5 (just b/c there is a md5 function everywhere; so, I use it):
    md5($Token) that is
    md5("alohamaxthemangoodbye") = ee15d0b677a8ed1b25e470fe888958d7
  4. Then, we chop the word -- any part you like thefirst8letters("ee15d0b677a8ed1b25e470fe888958d7") = ee15d0b6
Use ee15d0b6 as the assigned user password and the user can not change it. You can enhance the security by changing the Salts as often as you want.

How do you think?

Tuesday, March 7, 2006

Top-down!

Tomorrow, I am going to talk to my boss on a old idea, but new interprepertation. How cool!
to be continued ....

[here is the follow up]
So, top-down or bottom-up are the two approach of software developement. Idealy, you would want to gother all the use cases and requirements before designing an application; however, in some cases, the application is actually built as on demand - frenquently, my users told me that we need this, TOO. Especially, for portal integrations, it becomes less and less control on what user applications to expected. So, form Top-down approach to get a framework/architecture to support and base on that architecture to decide