Elliptic Curve PublicKey在不同平台之间共享

时间:2017-09-29 13:11:07

标签: .net swift encryption asp.net-web-api elliptic-curve

我正在尝试使用Elliptic Curve在android(客户端),ios(客户端)和.net(webapi)平台之间进行通信。

当我尝试使用SpongyCastle在Android平台上生成公钥时,我的web api可以使用此公钥。该密钥的字节长度为64。

但是当我尝试使用SwCrypt在ios上生成公钥时,我的网络API无法使用此密钥。它抛出IOException - "DER length more than 4 bytes: 119"。该密钥的字节长度为65。

如何在ios平台上生成Elliptic Curve密钥对,以便与.net web api进行通信?感谢。

0 个答案:

没有答案