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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:41:27+00:00 2026-05-21T05:41:27+00:00

Assume you have access to an oracle implementation whose output you trust to be

  • 0

Assume you have access to an “oracle” implementation whose output you trust to be correct.

The most obvious way to do this seems to be to run a set of known plaintext/hash combinations through the implementation and see if they come out as expected. An arbitrary number of these cases could be constructed by generating random plaintexts (using a static seed to keep it deterministic) and using the oracle to find their hashes.

The major problem I see with this is that it’s not guaranteed to hit possible corner cases. Generating more cases will reduce the likelihood of missing corner cases, but how many cases is enough?

There’s also the side issue of specifying the lengths of these random plaintexts because MD5 takes an arbitrary-length string as input. For my purposes, I don’t care about long inputs (say, anything longer than 16 bytes), so you can use the fact that this is a “special purpose” MD5 implementation in your answer if it makes things simpler or you can just answer for the general case if it’s all the same.

  • 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-21T05:41:27+00:00Added an answer on May 21, 2026 at 5:41 am

    If you have an algorithmic error, it’s extremely likely that every hash will be wrong. Hashes are unforgiving by nature.

    Since the majority of possible errors will be exposed quickly, you really won’t need that many tests. The main things to cover are the edge cases:

    • Length=0 (input is empty)
    • Length=1
    • Length=16
    • Input contains at least one byte with value 0
    • Repeated patterns of bytes in the input (would this be a meaningful edge case for MD5?)

    If those all pass, perhaps along with tests for one or two more representative inputs, you could be pretty confident in your algorithm. There aren’t that many edge cases (unless someone more familiar with the algorithm’s details can think of some more).

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

Sidebar

Related Questions

let us assume that I have a reusable business layer that further makes use
I need Vecmath, so I went to Oracle to get the latest version of
What is the best way to handle style that that is user-customized? Just as
I'm currently working on a WPF UI and I have a combobox on my
I have a usercontrol that acts as a container to hold more usercontrols within
I can't seem to find much information on the web about the different approaches
Possible Duplicate: How can I use Delphi to test if a Directory is writeable?
Update: Please note I am not asking what a salt is, what a rainbow
I've read quite a few posts that are very similar to the question I'm
I'm currently working on being able to import a DLL written in Fortran into

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.