|
-
Oct 9th, 2005, 03:15 PM
#1
Thread Starter
G&G Moderator
Encryption Algorithms
Howdy all,
I'm wondering if there are any tutorials anyone has come across regarding advanced text encryption. I want to see how uncrackable I can get a small text file.
Hopefully I can possibly transpose this onto pictures aswell.
Thanks in advance,
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Oct 9th, 2005, 03:22 PM
#2
Re: Encryption Algorithms
I like to use Capicom, which Microsoft released. It encrypts differently each time, based on the time. It decrypts perfectly! You can google it.
I haven't encrypted files, but I'm pretty sure it would be possible. I have only encrypt text strings.
-
Oct 9th, 2005, 03:28 PM
#3
Thread Starter
G&G Moderator
Re: Encryption Algorithms
I really only want to encrypt text strings (in turn, the text files). Can you provide any articles which have some algorithms or theory behind text encryption?
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Oct 9th, 2005, 03:43 PM
#4
Re: Encryption Algorithms
You mean other than Capicom? This is something that I have also used.
VB Code:
Dim ff As Integer
Public st As String
Private Sub Form_Load()
ff = FreeFile
Dim strBuff As String
ff = FreeFile
Open App.Path & "/site.txt" For Input As #ff
Do Until EOF(ff)
Line Input #ff, strBuff
Loop
Close #ff
Text1.Text = RC4ED(strBuff, "837ufhjjkddQR13%^&*&@#$&9ASFewFDAAW!%9367")
Call WriteFile
End Sub
Sub WriteFile()
ff = FreeFile
Open App.Path & "\site.txt" For Output As #ff
Print #ff, Text1.Text ' <-- Might need to use Write # to add quotes
Close #ff
End Sub
Function RC4ED(InString As String, password As String) As String
Dim S(0 To 255) As Integer
Dim K(0 To 255) As Integer
Dim I As Integer, j As Integer, tmp As Integer
Dim t As Integer
Dim outstring As String
For tmp = 0 To 255
S(tmp) = tmp
K(tmp) = Asc(Mid(password, 1 + (tmp Mod Len(password)), 1))
Next
For I = 0 To 255
j = (j + S(I) + K(I)) Mod 256
Swap S(I), S(j)
Next
I = 0
j = 0
outstring = ""
For tmp = 1 To Len(InString)
I = (I + 1) Mod 256
j = (j + S(I)) Mod 256
Swap S(I), S(j)
t = (S(I) + S(j)) Mod 256
outstring = outstring & Chr((mXor(S(t), Asc(Mid(InString, tmp, 1)))))
Next
RC4ED = outstring
End Function
Function mXor(I As Integer, j As Integer) As Integer
If I = j Then
mXor = j
Else
mXor = I Xor j
End If
End Function
Sub Swap(ByRef a As Integer, ByRef b As Integer)
Dim t As Integer
t = a
a = b
b = t
End Sub
Here's a link. Run the program twice. First time encrypts, second time decrypts.
http://vbforums.com/attachment.php?attachmentid=37573
-
Oct 9th, 2005, 04:00 PM
#5
Thread Starter
G&G Moderator
Re: Encryption Algorithms
Thanks for that DG, can start to fiddle with some things now 
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Oct 10th, 2005, 12:37 AM
#6
Frenzied Member
Re: Encryption Algorithms
I did not use it for a while, but you got encryption build into .Net
Check this out for a starter: RSA in VB.NET
-
Oct 10th, 2005, 02:46 AM
#7
Re: Encryption Algorithms
VS.net has a whole namespace full of encryption classes. Gives you full control of everything. You won't get any much more uncrackable than that.
-
Oct 10th, 2005, 08:38 AM
#8
Thread Starter
G&G Moderator
Re: Encryption Algorithms
I kinda want to see how far I can go with my own. I also hoped to make a voice recognition decryption. The person says the password, and the text is decrypted. I might actually look alot deeper than I originally was for this..
Ta though 
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Oct 10th, 2005, 09:35 AM
#9
Frenzied Member
Re: Encryption Algorithms
 Originally Posted by chemicalNova
I kinda want to see how far I can go with my own. I also hoped to make a voice recognition decryption. The person says the password, and the text is decrypted. I might actually look alot deeper than I originally was for this..
Ta though
chem
huh? whatever you are smoking, I want some too!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|