-
Oct 15th, 2000, 02:15 PM
#1
Thread Starter
Hyperactive Member
I made a program that does encryption. How it works is it takes the letter to be encrypted and adds its to ASCII value to the ASCII value of the one of the letters of the password. It repeats the process on every letter to be encrypted.
For example:
To encrypt "happy"
With password: "day"
Output =
(ASCII of h + ASCII of d) +
(ASCII of a + ASCII of a) +
(ASCII of p + ASCII of y) +
(ASCII of p + ASCII of d) +
(ASCII of y + ASCII of a)
it then converts the values in ()'s to a new character.
I want to know 4 things:
is vb going to do this very slowly?
is this powerful enough for standard "home use"? - e.g. encrypting a saved AIM conversation
how powerful would you consider this?
is this really encryption or more a cypher ora mix or what?
Thanks!!
-
Oct 15th, 2000, 09:39 PM
#2
Member
hmmmmm
Can your app change the encrypted file back again?
-
Oct 15th, 2000, 10:06 PM
#3
transcendental analytic
Go look on my homepage to do keyencryption, the fastest possible way
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 15th, 2000, 11:54 PM
#4
Kedaman i tried your Encryption with key function from your website but how do you decrypt with the key?
-
Oct 16th, 2000, 03:23 AM
#5
transcendental analytic
Hint: Use the same key
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 16th, 2000, 04:29 AM
#6
Lively Member
If you use the XOR function it will be much stronger encryption. You can use the XOR function on the two ascii values, instead of adding them. (ie. asc(characterfromkey) XOR asc(charfromstring)) this function will then return a value less than 255 and greater than 0, so you need not check if it will be a valid ascii char, just get the chr() of it.. see some sample code:
Code:
Public Function EncryptData(MyKey as String, MyText as String)
Dim ValueOut as String
Dim i as Integer
Dim KeyPos as Integer
ValueOut = ""
KeyPos = 0
For i = 1 to Len(MyText)
KeyPos = KeyPos + 1 'increment position in key by 1
If KeyPos > Len(MyKey) Then KeyPos = 1 ' check if it is greater than the length of the key, if so, reset to one (this cycles the key)
ValueOut = ValueOut & Chr(Asc(Mid(MyText,i,1)) XOR Asc(Mid(MyKey,KeyPos,1))) ' Add the character created by the XOR to ValueOut
Next i
EncryptData = ValueOut 'return ValueOut
End Function
You can then call this function by using EncryptData("SomePassword","SomeText")
The good bit is, you can encrypt something with it, then to decrypt it, simply call the same function, with the same key but supply the encrypted text as the MyText parameter. ie. EncryptData("SomePass","SomePreviouslyEncryptedData")
Thats all for now.
Want anymore info/help, email me (Joe@ihaveastupidlylongdomainname.com)
Daniel Rose
VB 5.0 Enterprise.
irc:irc2.dynam.ac
If TheCodeInTheSig() Is Not Lame() Then IDontKnowWhatIs()
-
Oct 17th, 2000, 06:04 PM
#7
Thread Starter
Hyperactive Member
i see how to use xor but what exactly does xor do?
-
Oct 18th, 2000, 02:49 AM
#8
transcendental analytic
Xor the same as
not(A or B) or (A and B)
That means if A and B ar equal, the result is false, otherways true. shematically
0 Xor 0 = 0
1 Xor 0 = 1
0 Xor 1 = 1
1 Xor 1 = 0
For nonboolean variables, like 6 or 397539.237 you compare bitwise, therefore each bit cannot infect other bits. That also means you can Xor with the same value again and get back to the original value, without giving other options, even for nonboolean variables.
So you can Xor the ascii values, Go look at my homepage again, use Strconv and convert the the string into a byte array and then work each byte separately, Xor will operate each bit separately anyway.
Encrypting by Xor is effective only if you use an effective key, that means it's long enough to be secure, and nongeneric that means no long series of 0es and 1, or even same byte types. You can for instance use Random seed to make a string nongeneric. The KKRSE encryption (on my homepage) is an example of that.
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 18th, 2000, 03:05 AM
#9
Lively Member
Xor encryption is more effective than simply adding or multiplying ascii values regardless of keylength. As for random seeds, you cannot use a random seed in anything you wish to decrypt, unless you store the random seed somewhere (as it is random, you dont know what it is) which defeats the purpose to an extent. It is much simpler to mess around with a key provided, for example, repeat it many times over, then xor each character with its neighbour etc. etc.
Daniel Rose
VB 5.0 Enterprise.
irc:irc2.dynam.ac
If TheCodeInTheSig() Is Not Lame() Then IDontKnowWhatIs()
-
Oct 18th, 2000, 03:33 AM
#10
transcendental analytic
Not random - pseudorandom
A random seed is like a part of the key, the same seed gives the same series of numbers, If You have the key private, anyone else can still pass generic data trough the encryption and find out the key, as for random numbers you won't be able to get the key without knowing the random seed, a much harder aproach to crack.
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 18th, 2000, 04:10 PM
#11
Member
Legal issues
Hey HAVocINCARNATE29,
If this program you made is for your own use, fine. But if you want to sell it, well ummm, you should check legal issues. I'm no expert on this, but I've heard that there may be goverment standerds that encyption software has to follow. Again, I'm not for sure.
Any other feed back on this?
-
Oct 19th, 2000, 03:03 AM
#12
Lively Member
if you use a random value to encrypt something anywhere in your method, you will not be able to decrypt it, therefore to decrypt it you must have the random value stored somewhere, thus making the random number feature useless
Daniel Rose
VB 5.0 Enterprise.
irc:irc2.dynam.ac
If TheCodeInTheSig() Is Not Lame() Then IDontKnowWhatIs()
-
Oct 19th, 2000, 03:36 AM
#13
-
Oct 19th, 2000, 03:53 AM
#14
Lively Member
mmm yes pgp did used to be good didnt it? :P
Daniel Rose
VB 5.0 Enterprise.
irc:irc2.dynam.ac
If TheCodeInTheSig() Is Not Lame() Then IDontKnowWhatIs()
-
Oct 19th, 2000, 04:05 AM
#15
-
Oct 19th, 2000, 04:56 AM
#16
transcendental analytic
CHAPS, did you read what i wrote? Read it again please
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 19th, 2000, 05:56 AM
#17
Lively Member
i read it, its just not good imo to store any part of the key.
Daniel Rose
VB 5.0 Enterprise.
irc:irc2.dynam.ac
If TheCodeInTheSig() Is Not Lame() Then IDontKnowWhatIs()
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
|