Results 1 to 6 of 6

Thread: [DHTML] Matrix Encryptor

  1. #1
    Join Date
    May 2007
    Location
    USA
    Posts
    373
    Thanks
    2
    Thanked 4 Times in 4 Posts

    Default [DHTML] Matrix Encryptor

    1) CODE TITLE: Encryptor

    2) AUTHOR NAME/NOTES: Trinithis

    3) DESCRIPTION: Pumps out heavily encrypted text using matrices.

    4) URL TO CODE: http://trinithis.awardspace.com/Encr...Encryptor.html

    Seeing two recent encryptor type submissions made me want to batch this one out.

    **Added: Unicode Buffer Value.**


    You can make your own key. The key has customizable dimensions, and if you don't want to manually fill in your matrix, you can always randomize it, which happens automatically on page startup. To make your own, just type in the desired matrix size and hit "New Matrix". This creates an empty matrix. Also, you can customize any randomized values too. Only enter numbers into the matrix.

    Once you have a likable key, just copy and save the value in "Matrix Key String". Next time you open the page, and you want to use your old key, clear the field and paste your copied value into it. Then hit the "Create Matrix From Text Field Button".

    Keep any square brackets ('[') (']'), colons (':'), and commas in your key string and in your encrypted text.

    The script automatically checks whether or not the matrix has bad values (such as letters) in it, and it checks to see if the matrix is singular or not when it performs certain actions. The user is prompted with appropriate dialogue.


    How it works: Basically, the code uses math to encrypt your text using a square matrix of dim NxN, and it decodes it using that matrix's inverse. The text is converted to unicode and tossed into Nx1 matrices, where N is the size of the key. Then it multiplies them together to get your encrypted text. The process is repeated until all the text is translated into 1 or more matrices. The decryption is similar, except the encrypted matrices are multiplied by the key's inverse. As long as your matrix is of adequate size and contains decently sized values, your encryption is virtually undecipherable without a key or sample text. (Such as something like an 8x8 matrix with vals from -100 to 100. Not to mention 20x20 matrices with vals from -100000 to 100000) Yay! Math is fun!
    Last edited by Trinithis; 06-16-2007 at 02:31 AM.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Pretty cool and you put a lot of work into it, plus some cool logic/math, but the result is the same as any other encryption... you supply the decoder with it.
    (Note the spelling error 'deciper'.)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    May 2007
    Location
    USA
    Posts
    373
    Thanks
    2
    Thanked 4 Times in 4 Posts

    Default

    You could always manually decode the encryption if you know how to work matrices and unicode (InverseOfMatrixKey*EachEncryptedMatrix yields unicode representation of the string.)

    Perhaps I should display the inverse matrix in table form and string form.

    BTW I couldn't see a "deciper" spelling error.
    [*Found it and fixed*]
    Last edited by Trinithis; 06-15-2007 at 05:45 AM.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well, sure, but at that point, it's of little use on a webpage. Plus, you'd still need to make the key available, automatically or not.

    Check the button at the bottom for the spelling.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    the result is the same as any other encryption... you supply the decoder with it.
    But not the key, which is also necessary to decrypt any given piece of text. This is true encryption, although probably not very strong.
    Well, sure, but at that point, it's of little use on a webpage.
    Who said it was meant to be used for a web page? It's just a generic encryptor.
    Plus, you'd still need to make the key available, automatically or not.
    Only to those who should read it, and that's how cryptography works.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Theoretically that may make sense. But if so, it doesn't fit in this forum. This is for submitting scripts for the web. How is that applicable?

    Or, I guess, this is intended to be a thing on a page to create encrypted text, then you can send secret messages to friends or something?

    this isn't meant for source code, I guess.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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