Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7971851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:43:25+00:00 2026-06-04T07:43:25+00:00

I am building an authentication system in which some information is being stored encrypted

  • 0

I am building an authentication system in which some information is being stored encrypted so that it can’t be human readable. Because it is encrypted, I need to use the generateSecretKey() function (as I’m not using the CFMX_COMPAT method). I am nervous of just creating this when a user is registered in the system and using it for all time and so I thought about creating a new one every time the user logs in, but wasn’t sure if that is really necessary. I am already calling a method to update the users login timestamp on each login so adding a new secret key isn’t bad, but I wanted to make sure that I didn’t go overboard, so my question is this:

When generating secret keys for users to encrypt information is it best to create a new one every time they login or just create one on registration and use it for all time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:43:27+00:00Added an answer on June 4, 2026 at 7:43 am

    Your answer (as the elves said to Frodo) is both yes and no. Or perhaps in the words of Bob Dole when asked if he wore boxers or breifs… “depends”.

    What you are asking about is tied stringently to the requirements. Ostensibly the second choice – “generating a new key” – would be more secure than reusing the same key. In the first case you have one key per user. In the second your key is more ephemeral and disappears after a session. So the real question is, what level of security is enough for your requirements.

    The trade off is that the code is slightly more complicated, the server has to work a bit harder, and you can’t persist sessions (because restarting the server is going to kill your keys presumably). It might also make things like audit reporting more difficult since it sounds like you are encrypting some log type or audit trail type information.

    I would add that if you store these keys along with the data you might as well not bother with generating new ones. You’ve already degraded whatever benefit you might have garnered by putting the key under the welcome mat 😉

    Hope this helps… sorry to be vague.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick yes/no - I'm building an AJAX application and some scripts require authentication. Can
I'm building a site that has one authentication system for both general users and
I am building a site that requires a simple authentication system to sit on
I'm currently building an Django app that is using an LDAP authentication backend. Because
I 'm building an application in ASP.NET MVC which should use Gmail authentication and
I was building an Active Directory Single Sign-On authentication system for Java web applications
I'm building a system that consists of many clients connecting to a server. The
I am thinking of building some kind of hook function system. Basically a couple
I'm building a site that requires user authentication and authorization. My initial idea was
Im building Phonegap application that uses token authentication strategy to access rest services. Is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.