apple / swift-crypto

Open-source implementation of a substantial portion of the API of Apple CryptoKit suitable for use on Linux platforms.
https://apple.github.io/swift-crypto
Apache License 2.0
1.47k stars 166 forks source link

Fixup CryptoExtras RSA public key formats #151

Closed Lukasa closed 1 year ago

Lukasa commented 1 year ago

Motivation

CryptoExtras RSA public keys support being exported in DER and PEM form. These exports work great, but it turns out they are inconsistent between the Darwin and non-Darwin implementations. Darwin platforms would export the public keys in PKCS1 format, while non-Darwin was exporting them as SPKI. This isn't great!

Modifications

Result

Key export types are now consistent on all platforms.