I bought the MBS Plugin for Diffie Hellman Key Generation.
But from the example it only generates keys with elliptic curve configuration:
// Our chosen curve must be used by both sides in the exchange
dim EC_Curve_ID as integer = 415 // NID_X9_62_prime256v1
dim ec_dhe as new ECDHEMBS(EC_Curve_ID)
dim publicKey as string = ec_dhe.PublicKey
I would need the DH configuration instead, the classic Deffie-Hellman one.
I can’t find it on the site: Monkeybread Xojo plugin - Example: /Encryption/Diffie Hellman Key Generation
No explanation on how to get this.
Can someone help me?
thanks
You may want to elaborate what you need.
I found out that the Plugin does not offer key generation in Classic DH, but only in ecliptic curves.
So the answer is that with MBS it is not possible to do it in Classic DH but only in ecliptic curves.
I tried the MBS plugin with ecliptic keys and it works fast. With 3 lines of code I generated a key. I recommend it.
I was in the same situation so I raised a feature request for this over 3 years ago here: https://tracker.xojo.com/xojoinc/xojo/-/issues/66024
sadly it doesn’t appear to have gained much attention, which is unfortunate as the crypto library Xojo uses should already support this, just needs a function to expose it.
As a workaround, I’m currently using the BigInteger class of the fpPlugin to perform the maths manually. I haven’t coded for iOS but the latest version of the plugin says it supports that platform so might be worth a try: Bitbucket
1 Like
Hi @Lawrence_Johnson ,
Your solution is interesting but not suitable for Xojo iOS. iOS blocks the use of BigInteger. When instantiating a class that contains BigIntegers the application shuts down.
I have done some tests.
I think the only solution is @Christian_Schmitz’s, the plugin MBS.
Thanks
Nothing even with MBS Pluging does not solve on Xojo iOS. Deffie-Hellman is not possible to use on iOS with Xojo. I tried with 3 different plugins, manually creating the calculation with BigInteger but nothing.
I would say there is no solution.