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 1928788
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T07:01:26+00:00 2026-05-17T07:01:26+00:00

Overview I’m looking to analyse the difference between two characters as part of a

  • 0

Overview

I’m looking to analyse the difference between two characters as part of a password strength checking process.

I’ll explain what I’m trying to achieve and why and would like to know if what I’m looking to do is formally defined and whether there are any recommended algorithms for achieving this.

What I’m looking to do

Across a whole string, I’m looking to compare the current character with the previous character and determine how different they are.

As this relates to password strength checking, the difference between one character and it’s predecessor in a string might be defined as being how predictable character N is from knowing character N – 1. There might be a formal definition for this of which I’m not aware.

Example

A password of abc123 could be arguably less secure than azu590. Both contain three letters followed by three numbers, however in the case of the former the sequence is more predictable.

I’m assuming that a password guesser might try some obvious sequences such that abc123 would be tried much before azu590.

Considering the decimal ASCII values for the characters in these strings, and given that b is 1 different from a and c is 1 different again from b, we could derive a simplistic difference calculation.

Ignoring cases where two consecutive characters are not in the same character class, we could say that abc123 has an overall character to character difference of 4 whereas azu590 has a similar difference of 25 + 5 + 4 + 9 = 43.

Does this exist?

This notion of character to character difference across a string might be defined, similar to the Levenshtein distance between two strings. I don’t know if this concept is defined or what it might be called. Is it defined and if so what is it called?

My example approach to calculating the character to character difference across a string is a simple and obvious approach. It may be flawed, it may be ineffective. Are there any known algorithms for calculating this character to character difference effectively?

  • 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-05-17T07:01:26+00:00Added an answer on May 17, 2026 at 7:01 am

    It sounds like you want a Markov Chain model for passwords. A Markov Chain has a number of states and a probability of transitioning between the states. In your case the states are the characters in the allowed character set and the probability of a transition is proportional to the frequency that those two letters appear consecutively. You can construct the Markov Chain by looking at the frequency of the transitions in an existing text, for example a freely available word list or password database.

    It is also possible to use variations on this technique (Markov chain of order m) where you for example consider the previous two characters instead of just one.

    Once you have created the model you can use the probability of generating the password from the model as a measure of its strength. This is the product of the probabilities of each state transition.

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

Sidebar

Related Questions

Overview I am trying to get a photo feed on to my site using
Overview: Trying to write a trigger for a SQL Server 2008 database. TableA and
Overview I'm looking for advice / solutions on standardizing color profiles on comps so
Overview: I have two text boxes at the top of this form for inputting
Overview I'm in the process of porting a simple utility app over from C#
Overview: I am trying to avoid a race condition with accessing an IndexedDB from
Overview: I'm trying to design an application that will encrypt files to safely send
Overview: I have two pages in my program; the main page and the other
Overview So I'm trying to get a grasp on the mechanics of neural networks.
I need an overview of the iOS architecture (Process management, system memory management, kernel)

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.