dint-dev / cryptography

Cryptography for Flutter developers: encryption, digital signatures, key agreement, etc.
https://pub.dev/packages/cryptography
Apache License 2.0
161 stars 82 forks source link

Calculate shared-secret using X25519 and RSA keys #179

Closed xErik closed 6 months ago

xErik commented 6 months ago

I have three RSA PEMs:

I'd like to use these to calculate a Shared Key.

Is it possible to create a SimplePublicKey from RSA PEMs with this libary?

final List<int> publicKeyDataSelf = ...

SimplePublicKey publickKeySelf =
  SimplePublicKey(publicKeyDataSelf, type: KeyPairType.rsa);