Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Jan 29, 2020 9:05 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: ToringoCrypto GetRandomKeys always generates the same keys
PostPosted: Wed Jun 15, 2011 1:24 am 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
Under Windows XP 32 bit, the GetRandomKeys function of ToringoCrypto.RSA works as expected and a new keypair is generated each time it's called. However, under Windows 7 64 bit and Windows Vista 32 bit (these are the only other OS's I have to test on) the exact same key pair is generated every time!

Is ToringoCrypto broken under Win7?

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: ToringoCrypto GetRandomKeys always generates the same ke
PostPosted: Wed Jun 15, 2011 2:41 am 
Offline

Joined: Wed Aug 05, 2009 6:32 am
Posts: 174
Location: Arkansas - USA
It seems to be working for me on RB 2011R1.1/Windows 7 - 64 bit. I put two textareas on a window for the output:

1st Time
String1: 7DF659D45D35A34D1C8FF762DBCA305EC81045F24318B5D98ABFEF41B2BCBFC040E4A5FFBD212635284EBCB194257F6CF38E17DB299F269716DC31851F66C3A236C3F05315520E7C13097F201221AC6B08568C3798A02F0E502103E5AD3F599719FDECFC6DAA29D3244304882CD7816D551FD90BE13693CBB11E3B89914362A5

String 2:
38D18542FF1EE3C46E941990F88884464496A1798B1DB536F934F71392A0F2F0A5B3F351C9E065760C4397CDA7760FDFFB21E8973039ED1FA27DFE909C5F6B22F9B7AF07F200F441E689BAE4A9483F8E53D4DD6D5A63CFC8DCB98DAA0383D629D4DF33DE59109598A734573D7247FD138DB8E30503319289177D48E7C6F8B8B7

2nd Time
String1:
14F58C6280A6C9FF02F50F63E9E09A20F777116DD2FACBD5612DEDC96C7BAB84591D9C458941C158967D6D5CE62554C56A6A798647122B1A3F5CE3912D3832DBCFFEAFF38F6CB84E35F9D8BAE774D63E5D95FFDFABA82621B3671A1B40CCEF7ED8F1E6D8F5A26484EC90B507D6370ED59C8C5D4FF2AF487F410CD82456C62A51

String2:
0012D463A354ABDB778A418D0F1CF273A2436E2F5E1D72FAC8C4F4F4C4192AD09876473790D29E9BD9C3A7654B46E3B57E3D20F1CBCE76E754DEEED7A7E7A8C6B6A44C54B2EEEDA8E155153D5EFF97659FDAFCC8C6B6A87370FA01ADFF50BDABD1D01828930C80AF7175140FA1C2DB97FAA0B71710E1F6F024BCE403F1923673

_________________
Windows 7 (RB Pro 2012R2.1) / Ubuntu 12.10 (RB Pro 2012R2)


Top
 Profile  
Reply with quote  
 Post subject: Re: ToringoCrypto GetRandomKeys always generates the same ke
PostPosted: Wed Jun 15, 2011 1:15 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
Weird.

May I ask how you're calling the GetRandomKeys function? I basically copied and pasted the invocation from the example.

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: ToringoCrypto GetRandomKeys always generates the same ke
PostPosted: Wed Jun 15, 2011 1:33 pm 
Offline

Joined: Mon May 31, 2010 5:35 am
Posts: 2412
Location: Netherlands
charonn0 wrote:
Weird.

May I ask how you're calling the GetRandomKeys function? I basically copied and pasted the invocation from the example.


did you try to clear the plugins cache?

_________________
SWORT™
- Windows Vista, Windows XP, Windows 7, Linux Mint 11 and Mac OSX Lion
- REAL Studio Enterprise(latest) and WEB Edition(latest)
- Plugins (MBS Complete, ToringoLib, Einhugur, VanHoek + Some open source plugins)
For Dutch User Groups ask me to enter!


Top
 Profile  
Reply with quote  
 Post subject: Re: ToringoCrypto GetRandomKeys always generates the same ke
PostPosted: Wed Jun 15, 2011 4:04 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
No. I don't think that is the issue, though, because if I copy the EXE file from Win7 to and XP machine everything works.

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: ToringoCrypto GetRandomKeys always generates the same ke
PostPosted: Wed Jun 15, 2011 6:33 pm 
Offline

Joined: Wed Aug 05, 2009 6:32 am
Posts: 174
Location: Arkansas - USA
Don't mind at all:

dim x as Integer
dim w1 as String
dim w2 as String
x = ToringoRSA.GetRandomKeys(w1, w2, 1024)
TextArea1.Text = w1
TextArea2.Text = w2

_________________
Windows 7 (RB Pro 2012R2.1) / Ubuntu 12.10 (RB Pro 2012R2)


Top
 Profile  
Reply with quote  
 Post subject: Re: ToringoCrypto GetRandomKeys always generates the same ke
PostPosted: Thu Jun 16, 2011 3:49 am 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
OK, I've figured a few things out:

On Windows XP, everything works as expected.

On Windows Vista and Windows 7, everything works if the GetRandonKeys function is called from the main thread.
On Windows Vista and Windows 7, the exact key pair is generated each time if the GetRandomKeys function is called from within a different thread.


jharris, would you be willing to test these observations?

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: ToringoCrypto GetRandomKeys always generates the same ke
PostPosted: Thu Jun 16, 2011 5:25 am 
Offline

Joined: Wed Aug 05, 2009 6:32 am
Posts: 174
Location: Arkansas - USA
Looks like you are correct. I get the same results every time when calling from a thread.

_________________
Windows 7 (RB Pro 2012R2.1) / Ubuntu 12.10 (RB Pro 2012R2)


Top
 Profile  
Reply with quote  
 Post subject: Re: ToringoCrypto GetRandomKeys always generates the same ke
PostPosted: Thu Jun 16, 2011 7:39 am 
Offline

Joined: Mon May 31, 2010 5:35 am
Posts: 2412
Location: Netherlands
i'll check to see if i get the same result as i have those plugins too,,,

_________________
SWORT™
- Windows Vista, Windows XP, Windows 7, Linux Mint 11 and Mac OSX Lion
- REAL Studio Enterprise(latest) and WEB Edition(latest)
- Plugins (MBS Complete, ToringoLib, Einhugur, VanHoek + Some open source plugins)
For Dutch User Groups ask me to enter!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group