Results 1 to 11 of 11

Thread: MD5 Encryption

  1. #1

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065

    MD5 Encryption

    How do u MD 5 Encrypt a string of text with VB?
    Wayne

  2. #2
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803
    xor the output from MD5 with the string....

  3. #3
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    use the attached file. and btw, MD5 is not an encryption routine, it is a hash, which means that there is no way to go back.
    Attached Files Attached Files
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  4. #4
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803
    Originally posted by BuggyProgrammer
    use the attached file. and btw, MD5 is not an encryption routine, it is a hash, which means that there is no way to go back.
    Unless you Xor it.... then you can go back to your original string....
    I made an encryption algorithm with MD5 and SHA, so i know what i'm talking about... and probably wpearsall intends to do the same thing...

    example:

    Encoding:
    HASH - XOR - your_string = unreadable_string

    Decoding:
    unreadable_string - XOR - HASH = your_string

  5. #5
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Originally posted by CVMichael
    Unless you Xor it.... then you can go back to your original string....
    I made an encryption algorithm with MD5 and SHA, so i know what i'm talking about... and probably wpearsall intends to do the same thing...

    example:

    Encoding:
    HASH - XOR - your_string = unreadable_string

    Decoding:
    unreadable_string - XOR - HASH = your_string
    What is the difference between this and string xor 10, etc? Its still crap encryption, that coul be broken without much effort(frequency counts).

    Z.

  6. #6
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    how can you reverse it? if you have a 650 meg file how are you going to turn a 26 char to 650 megs?
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  7. #7
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    o nevermind.......... but that would almost take the whole point away from hashing it...
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  8. #8

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    Originally posted by CVMichael
    and probably wpearsall intends to do the same thing...
    Nope,

    Just check 1 MD5 Password with Another, See if they match, and if they do, let the user login


    BTW. (Sorry if i sound dumb, its 10 past 3 AM here (gonna head sleep jst now)

    But,

    How do i call the MD5 HASHer?
    Wayne

  9. #9
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    init_md5_hash i think.
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  10. #10
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803
    Originally posted by Zaei
    What is the difference between this and string xor 10, etc? Its still crap encryption, that coul be broken without much effort(frequency counts).

    Z.
    Zaei... use your head please...

    With this type of encryption, you can encrypt a ~ 10GByte file without having ANY patterns, it's like having a password as long as the file !!!

    MD5 is a 128 bit hashing algorithm, that means 16 bytes of data

    The simple algorithm (easyer to break, but still almost imposible):
    let's say the password is "my_password", use the password to get the MD5 hash of the password, then XOR each byte from the hash with each byte of the string that you want to encrypt.
    When you pass the 16'th byte, go back to 0, and repeat the same proccess with the next 16 bytes from the hash.


    The hard algorithm, that is IMPOSSIBLE to break:
    First, think of this: why does the password have to be the same for eash 16 byte hash ?
    So...
    for the first 16 byte make a hash for this password "my_password_1" -> 7fbb6e72bd1d0dc9be340cfe4a7b2391
    for the next 16 bytes make a hash for this password "my_password_2" -> 8f1053fa67a3cfdeb64095c776597db4
    for the next 16 bytes make a hash for this password "my_password_3" -> 8796013e6d637d5b65f1b684f36a74d5
    for the next 16 bytes make a hash for this password "my_password_4" -> 9eb3067b216ed7dec722e599e167d8c9

    Get the idea ? for each time you make a password, you will get a complictly diferent 16 byte hash

    Like this, you will really have a password that is as long as the file
    Then all you have to do is XOR the hash you get from MD5 with the file....

    And this encryption is called "Symmetric-Key Encryption", and the "key" is actually the MD5 ouput, the HASH !!
    http://developer.netscape.com/docs/m...n/contents.htm

    And if you want to play around with some hashing algorithms, then go to:
    http://pajhome.org.uk/crypt/md5/
    YAHOO is using this algorithm to hash the password when users log in, just go the log-in page for yahoo, and view the code in the html page, and you'll see the javascript for MD5
    Last edited by CVMichael; Oct 16th, 2002 at 10:29 PM.

  11. #11
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Gotcha. Huge key =).

    Z.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width