Print Page | Close Window

Encryption

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=6359
Printed Date: 30 March 2026 at 9:24am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Encryption
Posted By: Gullanian
Subject: Encryption
Date Posted: 12 October 2003 at 6:59am

Im pretty interested in encryption, but am useless at it.  I decided not to use MD5 because id probably get bonus points for my exam if they saw I wrote my own one.  Can anyone tell me if this one is ok, I know it probably has inefficiencys in it, and ive no idea how good it is.  (I wrote it when I was drunk)

Example of input:
letmein
Example of output:
280893626268753333301610053332834944666732261075333273912869 53333469


'Function to encrypt text
Public Function encrypt(ByVal strInput As String) As String
    Dim intInputLength As Integer   'Holds length of inputted string
    Dim strSelectedChar As String   'Holds the selected char
    Dim intLoop As Integer          ; 'Loop counter
    Dim intCharCode As Single       'Holds character code
    Dim intSelectedNum As Integer
    Dim intSelectedNum2 As Integer
    Dim strNewEncrypt As String
   
    'Initialise
    intInputLength = Len(strInput)
   
    'Loop through all characters
    Do Until intLoop = intInputLength
        'Encrypt
        intLoop = intLoop + 1
        strSelectedChar = Mid(strInput, intLoop, 1)
        intCharCode = Asc(strSelectedChar)
        intCharCode = intCharCode + 3.2 * (intCharCode / 2)
       
        If InStr(encrypt, intCharCode) <> 0 Then
             intCharCode = intCharCode + Len(intCharCode) * 2 + (Len(encrypt))
        End If
       
        encrypt = encrypt & intCharCode & Str(intCharCode / 3)
    Loop
    encrypt = Replace(encrypt, ".", "")
    encrypt = Replace(encrypt, " ", "")
    encrypt = encrypt & CStr(InStr(encrypt, "0") + Len(encrypt))
   
    'Reset loop
    intLoop = 0
   
    'Got through all the characters
    Do Until intLoop = Len(encrypt)
        intLoop = intLoop + 1
        intSelectedNum = Mid(encrypt, intLoop, 1)
        intSelectedNum2 = Mid(encrypt, intLoop, 2)
        strNewEncrypt = CStr((intSelectedNum - (Len(strNewEncrypt) * (intSelectedNum2)) * Len(intLoop)))
    Loop
End Function




Replies:
Posted By: Gullanian
Date Posted: 12 October 2003 at 11:34am
Does anyone know of any software which you can put stuff like this into and it works out possible solutions?


Posted By: Mart
Date Posted: 12 October 2003 at 1:30pm
If you want to be sure it isnt dodgy i would use a standard encryption thingy liek MD5...


Posted By: Mart
Date Posted: 12 October 2003 at 1:34pm

and you could make the output shorter i.e letmein (7 chars) becomes 280893626268753333301610053332834944666732261075333273912869 53333469(69 chars)! Think what it will be like with longer strings!

Mart.



Posted By: Gullanian
Date Posted: 12 October 2003 at 3:08pm
I would use md5, but I figure id get more marks if I wrote my own encryption method.


Posted By: Mart
Date Posted: 13 October 2003 at 11:01am
But wouldnt you get less marks if there was a security hole and the data wasnt safe?


Posted By: Gullanian
Date Posted: 13 October 2003 at 11:09am

Firstly they dont have time to check it, and secondly they probably arent clever enough.



Posted By: Bluefrog
Date Posted: 14 October 2003 at 10:11am

Originally posted by Gullanian Gullanian wrote:

I would use md5, but I figure id get more marks if I wrote my own encryption method.

Sorry to be a spoil sport here, but you are never better off designing your own encryption scheme. Home baked security is ok for putting off casual 'hackers' but won't stop someone who is more determined, and those are the people you should be worried about. I know guys that have some serious resources and skills for cracking into systems. Those are the people I design my security for.  [ I'm not too bad myself, but they are better than me. ]

MD5 is very good, especially if you use it properly with a salt string. Combined with SSL and SafeKey ( http://www.syworks.com/safekey/index_eng.html - http://www.syworks.com/safekey/index_eng.html ) you have a damn near impregnable combination.

Commercial encryption components are often better than MD5, but since MD5 is open, and has withstood a good amount of scrutiny, it can be trusted. Commercial solutions sometimes have holes.

I don't really like MD5 because it's a hash, and I like to know what's going on  .

Password crackers are abundant. John the Ripper, ALZip (for zip files), etc. But they won't help you. You'll have to build your own.

This is my 4 step program to hacking a system:

1) Network sniffing - steal the info close to the source
2) Trojans and keyloggers - hack the person, gain access, record their every move or take / do what I need
3) Social Engineering - ask them politely
4) Get hacking / cracking - too complex to explain

For passwords, network sniffing and keyloggers are the easiest.

At this point I think I'm just blathering. I'll shut up now.


 



-------------
http://renegademinds.com/" rel="nofollow - Renegade Minds - Guitar Software http://renegademinds.com/Default.aspx?tabid=65" rel="nofollow - Slow Down Music



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net