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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:06:03+00:00 2026-05-16T22:06:03+00:00

I know the process for padding in md5, but what is the purpose of

  • 0

I know the process for padding in md5, but what is the purpose of adding a 1 and several 0’s to a message that is already the correct length?

Is this for security or just a marker?

  • 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-16T22:06:03+00:00Added an answer on May 16, 2026 at 10:06 pm

    The padding procedure must not create collisions. If you have a message m it is padded into pm, which has a length multiple of 512. Now imagine pm as a message m’ in itself, i.e. the padding bits already added as if they were part of the message. If padding just keeps m’ unchanged, as you suggest, then m and m’ would yield the same hash value, even though they are distinct messages. That would be a collision, also known as “not good at all”.

    Generally speaking, the padding procedure must be such that it could potentially be unambiguously removed: you must be able to look at a padded message, and decide without hesitation which bits are from the message itself, and which were added as padding. Nothing in the course of the hash function actually removes the padding, but it must be conceptually feasible. This is kind of mathematically impossible if messages of length multiple of 512 are “padded” by adding no bit at all.

    The above is generic to all hash functions. MD5 and a few functions of the same general family (including SHA-1, SHA-256…), using the Merkle-Damgård construction, also need the input data length to be encoded in the padding (this is necessary to achieve some security proofs). In MD5, the length is encoded as a 64-bit number. With the ‘1’ bit, there are at least 65 padding bits for any message (and at most 511).

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

Sidebar

Related Questions

Background: The compiler may insert padding into a struct to make it's members align
I am implementing a simple license-file system, and would like to know if there
I found a bit of code that gets me access to the raw pixel
Sort of a continuation from an earlier question, done a bunch of googling, but
I've got a pretty simple little bit of code. It goes like this: <html
I trying to call 2 functions in the same page to submit jquery-ajax at
My web site uses google maps and i'm simply showing the map with some
I've been trying the below script (within a larger app I'm working on) for
So, basically, I have a MySQL table called 'topics' and another one called 'replies',
I have a listview which I have binded (twoWay) to a datatable. The binding

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.