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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:43:49+00:00 2026-05-15T15:43:49+00:00

I need an algorithm that can do a one-to-one mapping (ie. no collision) of

  • 0

I need an algorithm that can do a one-to-one mapping (ie. no collision) of a 32-bit signed integer onto another 32-bit signed integer.

My real concern is enough entropy so that the output of the function appears to be random. Basically I am looking for a cipher similar to XOR Cipher but that can generate more arbitrary-looking outputs. Security is not my real concern, although obscurity is.

Edit for clarification purpose:

  1. The algorithm must be symmetric, so that I can reverse the operation without a keypair.
  2. The algorithm must be bijective, every 32-bit input number must generate a 32-bit unique number.
  3. The output of the function must be obscure enough, adding only one to the input should result big effect on the output.

Example expected result:

F(100) = 98456

F(101) = -758

F(102) = 10875498

F(103) = 986541

F(104) = 945451245

F(105) = -488554

Just like MD5, changing one thing may change lots of things.

I am looking for a mathematical function, so manually mapping integers is not a solution for me. For those who are asking, algorithm speed is not very important.

  • 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-15T15:43:50+00:00Added an answer on May 15, 2026 at 3:43 pm

    Use any 32-bit block cipher! By definition, a block cipher maps every possible input value in its range to a unique output value, in a reversible fashion, and by design, it’s difficult to determine what any given value will map to without the key. Simply pick a key, keep it secret if security or obscurity is important, and use the cipher as your transformation.

    For an extension of this idea to non-power-of-2 ranges, see my post on Secure Permutations with Block Ciphers.

    Addressing your specific concerns:

    1. The algorithm is indeed symmetric. I’m not sure what you mean by “reverse the operation without a keypair”. If you don’t want to use a key, hardcode a randomly generated one and consider it part of the algorithm.
    2. Yup – by definition, a block cipher is bijective.
    3. Yup. It wouldn’t be a good cipher if that were not the case.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a cross-platform library/algorithm that will convert between 32-bit and 16-bit floating point
I need to write and algorithm that can detect which state an application (used
I have a circle divided into fourths. I need an algorithm that can rotate
I need the fastest sphere mapping algorithm. Something like Bresenham's line drawing one. Something
I need to write an algorithm that reads keyboard stream until it gets a
Need a running (moving, rolling) average algorithm to calculate the 5-minute average bits that
I am looking for a fast polygon triangulation algorithm that can triangulate not very
i have a long algorithm that i need to put in a report. i
I have a simple one dimmensional array of integer values that represent a physical
Need Hints to design an efficient algorithm that takes the following input and spits

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.