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

  • SEARCH
  • Home
  • 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 7912713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:40:37+00:00 2026-06-03T13:40:37+00:00

In one of my current projects, i’m making use of a single-user authentication system.

  • 0

In one of my current projects, i’m making use of a single-user authentication system. I say “single-user” as i’ve no plans on making this work for multiple users on the same Windows account (simply because it’s not something i’m looking to do).

When the user starts the application, they’re presented with an authentication screen. This authentication screen uses an image (i.e. click 3 specific points in the image), a username (a standard editbox), and an image choice (a dropdown menu allowing them to select which image they wish to use). The image choice, username, and the points clicked on the image must all match what the user specified when setting up the password.

All 3 results are combined into a string, which is then encoded with the Soap.EncdDecd.EncodeString method. This is then hashed using SHA-512. Finally, it’s encrypted using DES. This value is then compared with the value that was created when they setup their password. If it matches, they’re granted access. If not, access is denied. I plan to use the SHA512 value at other points in the application (such as a “master password” for authorising themselves with various different modules within the main application).

In one example, the initial string is 29 characters in length, the SOAP encoded string is around 40 characters, the SHA-512 string is 128 characters, and the DES value is 344 characters. Since i’m not working with massive strings, it’s actually really quick. SOAP was used as very basic obfuscation and not as a security measure.

My concern is that the first parts (plain string and SOAP) could be the weak points. The basic string won’t give them something they can just type and be granted access, but it would give them the “Image click co-ordinates”, along with the username and image choice, which would potentially allow them access to the application. The SOAP string can be easily decoded.

What would be the best way to strengthen up this first part of the authentication to try and avoid the values being ripped straight from memory? Should i even be concerned about a potential exploiter or attacker reading the values in this way?

As an additional question directly related to this same topic;

What would be the best way to store the password hash that the user creates during initial setup?

I’m currently running with a TIniFile.SectionExists method as i’ve not yet got around to coming up with something more elegant. This is one area where my knowledge is lacking. I need to store the password “hash” across sessions (so using a memory stream isn’t an option), but i need to make sure security is good enough that it can’t be outright cracked by any script kiddie.


It’s really more about whether i should be concerned, and whether the encoding, hashing, and encryption i’ve done is actually enough. The picture password system i developed is already a great basis for stopping the traditional “I know what your text-based password is so now i’m in your system” attack, but i’m concerned about the more technical attacks that read from memory.

  • 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-03T13:40:39+00:00Added an answer on June 3, 2026 at 1:40 pm

    Using SHA-512, it is NOT feasible (at least not before 20 years of computing power, and earth electric energy) to retrieve the initial content from the hash value.

    I even think that using DES is not mandatory, and add complexity. Of course, you can use such slow process to make brute force or dictionary-based attacks harder (since it will make each try slower). A more common is not to use DES, but call SHA-512 several times (e.g. 1000 times). In this case, speed can be your enemy: a quick process will be easier to attack.

    What you may do is to add a so-called “salt” to the initial values. See this Wikipedia article.

    The “salt” can be fixed in the code, or stored within the password.

    That is:

    Hash := SHA512(Salt+Coordinates+UserName+Password);
    

    Last advices:

    • Never store the plain initial text in DB or file;
    • Force use of strong passwords (not “hellodave”, which is easy to break thanks to a dictionary);
    • The main security weakness is between the chair and the keyboard;
    • If you are paranoid, overwrite explicitly (i.e. one char per one char) the pain initial text memory before releasing it (it may still be somewhere in the RAM);
    • First learn a little bit about well known techniques: you should better use a “challenge” with a “nonce” to avoid any “replay” or “main in the middle” attacks;
    • It is safe to store the password hash in DB or even an INI file, if you take care of having a strong authentication scheme (e.g. with challenge-response), and secure the server access.

    For instance, here is how to “clean” your memory (but it may be much more complex than this):

     Content := Salt+Coordinates+UserName+Password;
     for i := 1 to length(Coordinates) do
       Coordinates[i] := ' ';
     for i := 1 to length(UserName) do
       UserName[i] := ' ';
     for i := 1 to length(Password) do
       Password[i] := ' ';
     Hash := SHA512(Content);
     for i := 1 to length(Content) do
       Content[i] := ' ';
     for i := 1 to 1000 do 
       Hash := SHA512(Hash);
    

    When it deals with security, do not try to reinvent the wheel: it is a difficult matter, and you would better rely on mathematically proven (like SHA-512) and experienced techniques (like a salt, a challenge…).

    For some sample of authentication scheme, take a look at how we implemented RESTful authentication for our Client-Server framework. It is certainly not perfect, but it tried to implement some best practices.

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

Sidebar

Related Questions

In one of my current projects we keep running into this very wierd problem
This question is vital to one of my current projects involving creating HTML tables
Our current solutions/projects have several classes combined into one file, I'm told this was
In one of my projects, the current implementation of a log system uses a
I'm using the SliderBar from the GWT Incubator in one of my current projects.
In one of my latest projects I use Solr 1.4 for searching products.However I
I like to use ltree from PostgreSQL contrib in one of my projects, and
For one of my current projects I have an interface defined for which I
yes this is one of my homework projects - to implement a Circular Linked
I'm using Maven's exec:java to run jline for one of my projects (current POM

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.