prop2 instruction request "mod of sqr"
mctrivia
Posts: 3,772
chip would it be possible to get an instruction that did the following equation?
it would be helpful for encryption. if M is the product of 2 primes then using the LSB of each iteration will give you a cryptographically strong random number generator.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board coming soon. $21.99 has backlight driver and touch sensitive decoder.
it would be helpful for encryption. if M is the product of 2 primes then using the LSB of each iteration will give you a cryptographically strong random number generator.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board coming soon. $21.99 has backlight driver and touch sensitive decoder.
Comments
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board coming soon. $21.99 has backlight driver and touch sensitive decoder.
What makes this encryption system so nice is:
1) can generate 1 bit at a time for streaming data
2) can be used as public/private key encryption
3) is secure as long as attaker does not know the primes used
4) can resume part way through a set of random values.
4 is important. if you are streaming encrypted data and some how the counters of the 2 devices get out of sync all data will become meaningless. a hash check can detect the error and the 2 devices can re sync by sending what step number they are on. sending the value of xn would be unsafe since it gives insight into the value of M used but sending the value of n does not give insight into the value of M. the value of xn can be computed by using the following but only if you know both primes.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board coming soon. $21.99 has backlight driver and touch sensitive decoder.
Can You post LINK to this thread in my thread
Ideas for Chip
Ps that we have that good ideas in one place
Regards
Christoffer
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
Okay, it looks like you need to square a number in a register, divide it by a some other value, and return a modulus to that register. So, you need some setup to define the mod divisor. The squaring is straightforward, though the division is going to take either a lot of hardware or some time. This could be done, but it would be a lot of transistors. The divide would only be viable if it happened over multiple clocks. And this divider probably needs to divide 64 bits into 32 bits, right? The idea sounds really neat.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
time/transistors. obviously faster would be nice but i will take as many cycles as i need to wait.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
Post Edited (mctrivia) : 12/2/2009 9:44:56 AM GMT
-Phil
Mul x,x
Mod x,m
Mov y,x
Ror y,#1
Rolc r,#1
Instead of
Ssb x,m
Rolc r,#1
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
I'd vote for a MAC instruction (preferably with a bigger accumulator, but I could live with 32 bit).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
-Phil