Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Encryption
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Encryption

 Post Reply Post Reply
Author
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Topic: Encryption
    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

Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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...
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 13 October 2003 at 11:01am
But wouldnt you get less marks if there was a security hole and the data wasnt safe?
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 13 October 2003 at 11:09am

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

Back to Top
Bluefrog View Drop Down
Senior Member
Senior Member


Joined: 23 October 2002
Location: Korea, South
Status: Offline
Points: 1701
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bluefrog Quote  Post ReplyReply Direct Link To This Post 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) 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.


 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.