Page 1 of 3
an observation
Posted: Fri Jul 18, 2008 7:05 am
by alokdube
z1=a^x mod p
z2=a^y mod p
s1=(a^x mod p)^y mod p = a^xy mod p
say we know x1 for which z1 is true
z3=a^u mod p
s2=(a^u mod p)^x mod p = a^xu mod p
a=7 p =11
;
z1=a^x mod p
z1=3
possible values of x
4,14,24,34,44,54,64,74,84,94
;
z2=a^y mod p
z2=5
possible values of y
2,12,22,32,42,52,62,72,82,92,
;
z=a^xy mod p=7^8 mod 11 = 9
z=a^xy mod p=7^28 mod 11 = 9
z=a^xy mod p =7^48 mod 11 = 9
z=a^xy mod p=7^168 mod 11 = 9
Generically
if z1=a^x1 mod p =a^x2 mod p
and
z2=a^y1 mod p =a^y2 mod p
then
z=a^(x1y1) mod p = a^(x1y2) mod p =a^(x2y1) mod p = a^(x2y2) mod p and so on.
Posted: Tue Jul 22, 2008 11:50 pm
by idle
Thanks for sharing, I'm a bit slow in the head so can you explain what's this useful for?
Posted: Wed Jul 23, 2008 1:38 am
by pdwyer
Kind of reminds me of Diffie-Hellman key exchange
Posted: Wed Jul 23, 2008 3:09 pm
by Rook Zimbabwe
This would be a tip? or a trick?
As it is, I see nothing useful yet...
z1=a^x % p
z2=a^y % p
s1=(a^x % p)^y % p = a^xy % p
Looks almost recursive?

for infinite values of
a I mean
Posted: Wed Jul 23, 2008 7:41 pm
by idle
Well all it evoked from me was a figure or eight sort of motion with my finger near my head thinking it's a bit loopy and I thought strange I don't really see what the attraction is.
Code: Select all
Global lzx.f=0;
Global lzy.f=20;
Global lzz.f =22;
If InitSprite() = 0
End
EndIf
If OpenWindow(0, 0, 0, 640, 480, "It's a bit loopy and I thought strange I don't really see what the attraction is", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_ScreenCentered)
If OpenWindowedScreen(WindowID(0), 0, 0, 640, 480, 1, 0, 0)
For a = 0 To 10
CreateSprite(a, 20, 20 )
If StartDrawing(SpriteOutput(a))
Circle(10, 10, 2 ,RGB(Random(255),Random(255),Random(255)))
StopDrawing() ; This is required when drawing operations are done. Never forget it!
EndIf
Next
EndIf
Repeat
Repeat
Event = WindowEvent()
If Event = #PB_Event_CloseWindow
End
EndIf
Until Event = 0
FlipBuffers()
ClearScreen(RGB(0, 0, 0))
StartSpecialFX()
If a > 10
a=0
EndIf
lzx + (0.015*(-10*lzx+10*lzy));
lzy + (0.015*(28*lzx-lzy-lzx*lzz));
lzz + (0.015*(-8*lzz/3+lzx*lzy));
x = (lzx*10) + 320;
y = (lzz*10) - 20;
DisplayTranslucentSprite(a, x, y,lzz*3)
StopSpecialFX()
a+1
Delay(1)
ForEver
EndIf
edited: sedate version
Posted: Wed Jul 23, 2008 8:21 pm
by Derek
@idle, that's very hypnotic. Almost sent me to sleep.

Posted: Wed Jul 23, 2008 8:34 pm
by idle
Derek wrote:@idle, that's very hypnotic. Almost sent me to sleep.

try that one lol probably wake you up now!
Posted: Wed Jul 23, 2008 8:48 pm
by Derek
Just got to stick on a Prodigy CD and we have the makings of a rave!

Posted: Wed Jul 23, 2008 9:04 pm
by idle
Derek wrote:Just got to stick on a Prodigy CD and we have the makings of a rave!

twisted fire starter

Posted: Sat Jul 26, 2008 3:38 am
by y3an
o.o
When i run without compiler, avast say me "PureBasic_Compilation4.exe" is infected by the virus
Win32:KdCrypt [Cryp]
I never had this with another code on Pb..
I have made an analys of my Hd at reboot, no Win32:KdCrypt [Cryp], i restart this without compiler : Win32:KdCrypt [Cryp] again o.o
I have tested some other codes, no Win32:KdCrypt [Cryp] o.o
It leads me to wonder this code looks pretty near of this virus when .exe created..
Someone have the same thing with avast ? It's weard !
Just got to stick on a Prodigy CD and we have the makings of a rave! Laughing Laughing
For me it should be more look like a strange cyber-punk thriller focused on an miding spontaneous virus

( 'seen PI yeasterday

)
Posted: Sat Jul 26, 2008 4:05 am
by idle
maybe the said virus uses a lorenez attractor.
Posted: Sat Jul 26, 2008 9:01 am
by Derek
There have been a few reports of PB code being mistaken for a virus, do a search for 'Virus Warning' and see what comes up.
Posted: Sat Jul 26, 2008 9:30 am
by y3an
'right, thanks. Idea not came to me search it here =p
Posted: Sat Jul 26, 2008 8:26 pm
by Rook Zimbabwe
No Spaz out from Avast when running in compiler... Looks psychadelic!!! I am back in the 60's man... wheres my Lava Lite and my Blacklight poster of Hendrix man?

Posted: Sun Jul 27, 2008 9:59 am
by idle
pdwyer wrote:Kind of reminds me of Diffie-Hellman key exchange
Yes it would appear to be, it'd be nice to see a working example with an explanation.
I've got a vb implementation lurking in my archives somewhere, so maybe I'll dig it out and try to convert it.