whyoleg / cryptography-kotlin

Kotlin Multiplatform cryptography / crypto library
https://whyoleg.github.io/cryptography-kotlin/
Apache License 2.0
344 stars 20 forks source link

PGP key pair generation #31

Closed aaziz993 closed 6 months ago

aaziz993 commented 6 months ago

Hello, Are there any plans to implement multiplatform PGPKeyPairGenerator.

whyoleg commented 6 months ago

Hey! There is no plans in the nearest future. On current moment the idea is to first provide core primitives on top of each more complex cryptography solutions like PGP could be implemented if needed.

aaziz993 commented 6 months ago

Does this mean that if I wish to implement it myself, the existing core primitives are insufficient, and it will require a significant amount of manual work? Can you advise anything in this case?

whyoleg commented 6 months ago

I'm not an expert in how PGP works, but AFAIK its implementation is rather big. So even if this library provides core primitives, there will be really needed significant amount of work to implement it in generic way. Additionally, this library doesn't provide any compression algorithms (and most likely will never provide, as it's out of scope) which are needed for PGP.

What would be easier I believe is to wrap BouncyCastle for JVM and gnupg library for Native.

Just in case, what is your use case?

aaziz993 commented 6 months ago

Thank you for support. My use case for now it is just sign my publications to Sonatype Maven Central and for this I can use BouncyCastle for JVM. But I also make additional core features library for KMP where among other things I would like to have PGPKeyPairGenerator for my further KMP projects. Anyway like you said I will try to wrap BouncyCastle for JVM and gnupg library for Native.