|
-
Aug 13th, 2000, 06:31 PM
#1
I read the posts on the encryption thread, but I got so confused 
Can anyone explain to me the basics of encrypting?
Including keys, random seed and stuff like that?
-
Aug 13th, 2000, 07:52 PM
#2
Check http://www.planet-source-code.com for Encryption. I am sure you will find something there.
-
Aug 13th, 2000, 08:47 PM
#3
Frenzied Member
I thnk what they do is randomize a number, and subtract or add that to the ascii value of each letter of the string...that is very very basic, and I've never made one myself, but I think thats whats going on...
-
Aug 13th, 2000, 09:06 PM
#4
I use 2 loops, I loop through the key inside the main loop for the text, I xor the ascii value of the current char of the text with Rnd times the current char of the key...
its really simple 
-
Aug 13th, 2000, 10:22 PM
#5
Frenzied Member
Random number encryption works on the Idea that if you do this
Code:
Rnd(-1)
Randomize lngSeed
Do
Msgbox Rnd
Loop
you will always get the same random numbers for the same value of lngSeed. (it's the Rnd(-1) line that makes it the same, I'm not sure why.
random encryption is anything that takes that sequence of random numbers into its algorythm it's much harder to crack becase unless you know the seed you can't work out the sequence of numbers which makes it very hard to crack.
one of the secrets of cood encryption is not to encrypt on character at a time but to mix up blocks of code together (a simple way would be to add each number to its left hand neigbour, this makes it harder to decrypt because if you get one letter wrong other letters will also be wrong, you should in fact mix loads of different parts of the data together, but working out an algorythm is harder. The other thing to remember is to try to be original in your algorithm, If you are using an algorythm nobody else has thought of people trying to decrypt it are less likley to decrypt it. (Sometime in WWII the americans simply translated their messages into the language used by an obscure tribe of indians, the japaneese never cracked it because they were trying to find some sort of cypher)
Most top level encryption nowadays is done using hardware encryption, this is building a special encryption card specially built to perform one algorythm, so in one clock cycle it can do what would take a software encryption 2 or 3 thousand cycles, this means that even if the code is cracked it would take 2000 times as long to decrypt with a software solution than with the right hardware, this means that if an algorythm is made comlicated enough to take an hour with the hardware it would take months to decypher even if the code was cracked.
-
Aug 14th, 2000, 01:56 AM
#6
Here's a way to randomize numbers:
Code:
Function randomnumber(finished)
Randomize
randomnumber = Int((Val(finished) * Rnd) + 1)
End Function
The problem is, if you were to randomize the numbers, how would your program be able to find the same two keys? You could do something like:
Code:
'Needed: 2 labels and a timer and the randomnumber function above.
'Timer Interval set a 1
Private Sub Timer1_Timer()
MousePointer = 11
A = Label1.Caption
b = Label2.Caption
Do Until A = b
Label1.Caption = randomnumber(100): If Label1.Caption = Label2.Caption Then GoTo complete
Label2.Caption = randomnumber(100): If Label2.Caption = Label1.Caption Then GoTo complete
DoEvents
Loop
Exit Sub
complete:
Me.Caption = "MATCH = " & Label1.Caption & " = " & Label2.Caption & ""
MousePointer = 0: Timer1.Enabled = False: Exit Sub
End Sub
I just put together this code. What it does: Randomizes two sets of numbers really fast and once they hit the same number, its a match! So you bypass to another level! Or in your case, serial number. I dunno...kinda useless, but I'm just posting something that will come in handy to me one day and it might give you ideas so you don't use the same security number over and over again.
[Edited by Matthew Gates on 08-14-2000 at 03:01 AM]
-
Aug 14th, 2000, 02:04 AM
#7
Hyperactive Member
Thats all well and good but all this randomization falls into a heap when the Pentium III chip comes out.
Current Randomization routines work on an attempt to influence the clock cycles (number of cycles is the seed) in order to determine a specific value form a pre-determined algorithm (something like 22/7 which gives a semi-random number).
The Pentium III chip however uses an internal sensor to read the thermal noise being radiated off the surface of the chip and uses the value returned from this to determine a random number.
This means that seeds are now totally redundant as we have TRUE randomization rather than this pseudo-randomization (they set the seed value to number of seconds passed midnight preying on the fact you don't start your computer at the same second every day)... which throws it all out the door.
-
Aug 14th, 2000, 08:31 AM
#8
Frenzied Member
GenX
The PentiumIII is out, I have it.
Sam
I think -1 is just reserved for stuff like that. It makes things loop too. I think it just makes life easier.
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
|