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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:52:53+00:00 2026-06-04T16:52:53+00:00

I want to implement MD5 in my program (for education). And i have a

  • 0

I want to implement MD5 in my program (for education).
And i have a problem with understanding.

On Wikipedia there is written:

  1. append “1” bit to message
  2. append “0” bits until message length in bits ≡ 448 (mod 512)
  3. append length mod (2 pow 64) to message

And my idea is like that:

  1. get size of msg
  2. until size >= 64 ==> memcpy 64 bytes to buffer and calculate functions
  3. if size < 64, memcpy “size” bytes and prepare padding.

And now, lets say, message is 127 bytes. Program takes first 64 bytes, calculate, and then wants to take second part. Took 63 bytes (504 bits), so need to add padding. Adds 1, so now its 505 bits.

What now? I should add zeroes up to 448 (mod 512), so 448+7 zeroes? So there will be two chunks again? Or what?

Im asking becouse it looks werid for me 😉 Probably its good, but.. i dont know.

Thanks in advance, M

  • 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-04T16:52:54+00:00Added an answer on June 4, 2026 at 4:52 pm

    The Wikipedia description is correct. There is no possible way to design a padding scheme that won’t add an extra block at least some of the time. (Provable trivially by counting.)

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

Sidebar

Related Questions

This is the bit of Ruby I want to implement in Python: Base64.urlsafe_encode64([Digest::MD5.hexdigest(url).to_i(16)].pack(N)).sub(/==\n?$/, '')
I want to implement custom JSP list tag, but have problem with accessing properties
i have question for example i want to implement binary tree with array i
I want implement a program that can do a a Vision-based Page Segmentation. I
I want to implement UITableView Where I want to have 3 buttons in each
I have WSDL and XSD files and want implement a webservice based on this
I want to implement a contact us page where there are few phone numbers,
I want to implement a salt into my login system but am a bit
I want to implement a picker that will have only 2 part. consider the
i want implement geolocation notification like the app reminders. this is what i have

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.