Author 
Message 
Sergey science forum beginner
Joined: 19 Jul 2006
Posts: 2

Posted: Wed Jul 19, 2006 7:10 pm Post subject:
Quadratic equavasion



I'm saving mutex into window registry for one of my programs, and I am
encrypting it using a simple quadratic equation. Such as y = x^2+20x, where
x is a value of a character (41 through 90), and y is a number I get which I
will store. Now, I was in college just about 4 or 3 years ago, or something
like that, work and all is turning me into moron. How do I solve for x? So
that I can decrypt this back into the character.
y=x^2+20x
x=? 

Back to top 


tadchem science forum Guru
Joined: 03 May 2005
Posts: 1348

Posted: Wed Jul 19, 2006 10:07 pm Post subject:
Re: Quadratic equavasion



Sergey wrote:
Quote:  I'm saving mutex into window registry for one of my programs, and I am
encrypting it using a simple quadratic equation. Such as y = x^2+20x, where
x is a value of a character (41 through 90), and y is a number I get which I
will store. Now, I was in college just about 4 or 3 years ago, or something
like that, work and all is turning me into moron. How do I solve for x? So
that I can decrypt this back into the character.
y=x^2+20x
x=?

The quadratic formula:
If
0 = a*x^2 + b*x + c
then
x = [  b +/ SQRT( b^2  4 * a * c)] / (2 * a)
(you get 2 answers for the price of one:
x = [  b + SQRT( b^2  4 * a * c)] / (2 * a)
and
x = [  b  SQRT( b^2  4 * a * c)] / (2 * a)
In your case, a = 1, b = 20, c =  y
HTH
Tom Davidson
Richmond, VA 

Back to top 


Google


Back to top 



The time now is Thu Jun 29, 2017 9:08 am  All times are GMT

