Yubico / yubikit-android

Yubico Mobile Android SDK - YubiKit
Apache License 2.0
103 stars 38 forks source link

Decrypt with PIV #34

Closed immesys closed 3 years ago

immesys commented 3 years ago

The comment on line 76 of piv/src/main/java/com/yubico/yubikit/piv/PivApplication.java indicates that the PIV application implemented there should support RSA/ECC decrypt/ecdh, but I can't see a decrypt implementation there. Where is that located?

Thanks

dainnilsson commented 3 years ago

I believe that comment refers to the underlying PIV specification rather than the class itself. Unfortunately this feature isn't currently implemented in this SDK, but it is on our roadmap to be included in a future release. I don't have a date at the moment, but will update this issue when there is more information to share.

In the meantime, if you can provide more details around the specifics of your use case we can make sure to use that input in the design of this feature.

dainnilsson commented 3 years ago

The just-released 2.0.0-beta01 supports this now, in the PivSession class. There's a decrypt method for RSA, and a calculateSecret method to do ECHD.