Two simple questions

Posted on 2006-05-13
Last Modified: 2012-05-05
Please answer the questions or provide links to find the answers

11.      What is RFC 1321 and how does it help create a hash function in software?

17.      What does the following function perform?
double_hash = hex_md5(str_md5(data));

Question by:lukegriffiths110
    LVL 95

    Expert Comment

    by:Lee W, MVP
    Ever use google?  Just put in "RFC 1321" and search.  The first 10 hits at least are all about it.

    The second question only has two results, but the first looked like an answer for you.
    LVL 10

    Expert Comment

    LVL 1

    Assisted Solution

    RFCs are technical papers that describe/define something, usually related to the Internet. RFC 1321 in particular describes the MD5 message-digest algorithm, which is a hash function most often used to identify a valid password without actually storing it (it is a one-way hash, so the hashed text can't be recovered), or to verify the integrity of a file after being transfered (by generating hashes before and after the transfer and comparing them).

    Assuming the code you provided is JavaScript, it generates two successive hashes on some data. It isn't actually a function, but two function calls. str_md5() generates the hash of the data in the <data> variable, and returns it as a string (each byte of the hash is encoded as a character). Then, on the result, hex_md5() is called, and it generates another hash, stored as a sequence of the hex values of the hash bytes encoded as strings.
    LVL 51

    Expert Comment


    Author Comment

    This is homework and I know how to use Google (wikipedia etc) so defining RFC 1321 would not be a problem. I understand hashing but I need to know in detail how RFC 1321 helps to create a hash function in software. I could not answer the second question but do not expect ee to answer in full, but I do expect information to be provided that will help in answering.
    LVL 4

    Accepted Solution

    HAHA,, its nothing like doing homework for ya.. A MD5 has or another popular hash is SHA. Take example your homework, you are probably creating this file within microsoft word. As soon as you save this file go  here and download this tool and check the "HASH" of your file. This hash is an algorithm in itself, it than takes the DATA you just wrote and some other factors and spits out a HASH or special number. Keep this number written down. Now go and add a line to the paper you just created, just put your name or a word or letter and save it again. Reproduce the hash and you will see you have a different hash output. Every time you change a character the hash will change.. This insues integrity of a file, the can work hand and hand when you want to make sure when you transfer a file it doesnt become corrupt in the transfer and also works hand in hand with many other things, but a big one we use it in is VPN'S this along with encryption allows us to not only validate the integrity of the message or files being sent but also we know we can use this with encryption schemes like des, 3des, AES, cast, etc. etc.

    The other code you posted is java code you could write  to perform a double hash of a file.


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
    Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now