# Improving Crypto on All Platforms

**URL:** <https://forums.swift.org/t/improving-crypto-on-all-platforms/75330>\
**Category:** Development\
**Created:** [October 12, 2024, 7:14pm UTC](https://forums.swift.org/t/improving-crypto-on-all-platforms/75330 "2024-10-12T19:14:58Z")\
**Posts on this page:** 1\
**Showing post:** 39

<div class="post-metadata">

**Author:** ![FranzBusch](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/franzbusch/32/19447_2.png) [@FranzBusch](https://forums.swift.org/u/FranzBusch)\
**Post date:** [October 28, 2024, 10:02am UTC](https://forums.swift.org/t/improving-crypto-on-all-platforms/75330/39 "2024-10-28T10:02:49Z")

</div>

I want to bring up one more solution to the naming problem here. Arguably `Crypto` is the right name for the module and I would like to see this being used forward. It would make the migration story easier. I also agree that it is important to retain the possibility to avoid the `BoringSSL` dependency on Apple platforms. It brings in a lot of binary size and we expect that a lot of our server libraries are used in client side applications as well.

The solution to this that I have in mind is using the currently in review [package traits](https://forums.swift.org/t/se-0450-package-traits/75598). This would allow us to make the BoringSSL dependency optional on a trait like this

```swift
targets: [
    .target(
        name: "Crypto",
        dependencies: [
            .target(
                name: "CCryptoBoringSSL",
                condition: .when(traits: ["BoringSSL"])
            ),
        ]
    )
]

```

once the `BoringSSL` trait is enabled by a consumer the additional APIs currently in `CryptoExtras` would become available from the `Crytpo` module.

On a slightly related note, we could also add a new trait `UnsafeCrypto` to the package which could gate some of the algorithms that we are nowadays considered problematic but are still used by legacy systems.

---

_[View the full topic](https://forums.swift.org/t/improving-crypto-on-all-platforms/75330)._
