ricmoo / GMEllipticCurveCrypto

Elliptic Curve Cryptography library for iOS (ECDSA and ECDH)
BSD 2-Clause "Simplified" License
122 stars 46 forks source link

Generate Derived Key from Shared Secret (ECDH-ES) #18

Open roshit-omanakuttan opened 7 years ago

roshit-omanakuttan commented 7 years ago

Hi, Great library and I have been able to seamlessly generate the Keys. How would I now be able to generate a Derived Key as mentioned here: https://tools.ietf.org/html/rfc7518#section-4.6

Thanks

ElyasNaranjeeSani commented 7 years ago

Hi, I do need this part too. Do you have any plan to add KDF too? @ricmoo BTW, @roshit-omanakuttan : do you have any alternative for this?

roshit-omanakuttan commented 7 years ago

@EliasNaranjeeSani, I Unfortunately had to pause that project and hence this remained pending. However, now I am back on this and am yet to get a solution. Any luck at your end?

ElyasNaranjeeSani commented 7 years ago

@roshit-omanakuttan : I just forced to develop this part my self. Used the specifications of KDF and implemented it in Obj-C.

roshit-omanakuttan commented 7 years ago

@EliasNaranjeeSani, Is there a chance you would make the implementation public. If yes, please do share and I would love to use it.

ElyasNaranjeeSani commented 7 years ago

@roshit-omanakuttan : I would love to but unfortunately its not possible due to company policies.

roshit-omanakuttan commented 7 years ago

@EliasNaranjeeSani fair enough @ricmoo please help me. :)

ricmoo commented 7 years ago

I have no specific plans to implement this, which KDF do you need? You should be able to use the output of the ECDH shared key with any other library though...

THCode commented 6 years ago

你好,我的公钥是:02bf055764de0320c8221920d856d3d9b93dfc1dcbc759a560fd42553aa025ba5c 请问是通过base64加密后,设置为publickey吗,我通过base64后没有通过检测,我用的 256rl。

2018-08-30 13:53:04.371747+0800 ECDSATest[74077:7476297] These are not the droids you are looking for. 2018-08-30 13:53:04.372137+0800 ECDSATest[74077:7476297] ***** = 96 2018-08-30 13:53:04.372296+0800 ECDSATest[74077:7476297] Decompressed: (null) 2018-08-30 13:53:04.372535+0800 ECDSATest[74077:7476297] Compressed: (null)