Swiftpack.co - gwynne/swift-mini-rsa-crypt as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by gwynne.
gwynne/swift-mini-rsa-crypt 0.0.2
Embeds BoringSSL sufficiently to expose just the RSA encrypt/decrypt functions. This is a temporary package that will hopefully go away if and when SwiftCrypto's _CryptoExtras adds the same APIs.
⭐️ 0
🕓 2 weeks ago
iOS macOS watchOS tvOS linux windows android
.package(url: "https://github.com/gwynne/swift-mini-rsa-crypt.git", from: "0.0.2")

swift-mini-rsa-encryption

Embeds BoringSSL sufficiently to expose just the RSA encrypt/decrypt functions. This is a temporary package that will hopefully go away if and when SwiftCrypto's _CryptoExtras adds the same APIs.

This package is a distillation of https://github.com/gwynne/swift-crypto/tree/gwynne/rsa-encrypt-decrypt down to just the RSA encrypt/decrypt API, with almost all of the original swift-crypto code removed and the embedded BoringSSL renamed to avoid conflicts. Since it is impractical to use the forked swift-crypto repo when other packages in the overall dependency graph refer to the original upstream repository, this package is intended to enable usage of the new API with (almost) exactly the same interface (except for the module name) - at the unfortunate and painful cost of an additional copy of BoringSSL to build - until such time as swift-crypto accepts the relevant PR, rejects it (in which case this package will most likely be subsumed into some other solution), or provides an alternative solution.

IMPORTANT!!!

The primitive RSA encrypt/decrypt operations are not suitable for general use. These are obsolete, very easily misused operations (as with RSA cryptography in general), and the effort to make them avaiable through this package has been made solely for the sake of supporting pre-existing implementations in common use which cannot be avoided, replaced, or updated. DO NOT USE THIS PACKAGE UNLESS YOU HAVE A VERY GOOD REASON TO DO SO! "MySQL 8.0's wire protocol for authentication relies on the client performing an RSA encryption operation" is a good reason - "I know what RSA is and don't feel like learning this elliptic curve stuff" is not (in fact, it's a really bad reason).

Just to be perfectly clear...

There will never be any "stable" (1.0.0 or greater) releases of this package. Once it has served its purpose, it will be deleted, not archived. The author of this package wishes to emphasize in the strongest possible terms that this is a stopgap measure ONLY and is not guaranteed to work properly for any use case other than that it was built specifically for. Don't use it. Seriously, don't. You are responsible for any and all consequences that stem from making any use of this package.

GitHub

link
Stars: 0
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Updated the vendored BoringSSL
2 weeks ago

By the way, in case I didn't mention it earlier, it's REALLY REALLY REALLY unlikely that this package is what you want.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics