Apple has introduced a new open-source Swift Crypto package which makes the secure capabilities of Apple’s CryptoKit available to the wider Swift community — even if they’re deploying their software on platforms other than Apple’s own.

The new library bolsters the security-minded CryptoKit API Apple introduced at last year’s WWDC event.

CryptoKit allows developers to build more secure apps. It lets them carry out cryptographic operations including hashing, generating keys, and encryption. Offering tools right out of the box helps developers to build products which are secure and follow best practices.

This week’s update adds an officially supported cryptography library available on other non-Apple platforms, such as Linux. This is likely to be particularly useful for writing server-side software in Swift. The previously released CryptoKit framework is only available on Apple’s own platforms, meaning macOS, iPad OS, and iOS. Swift Crypto provides the same APIs to anybody using Swift — even if they’re not deploying their software on Apple’s platforms.

Making Swift apps more secure than ever

Swift has become increasingly popular in the server-side space, which covers everything from enterprise applications to web servers. It is used by both big companies like Amazon and also smaller developer shops.

“The launch of Apple’s new Swift Crypto open source project is fantastic news for server-side Swift development,” John Sundell, an independent Swift developer and creator of popular Swift website and podcast Swift by Sundell, told Cult of Mac. “It’ll let any Swift developer deploy common cryptography algorithms on Linux and other non-Apple platforms, using an officially supported Swift library. Since more and more developers are building web servers and backend systems using Swift, having easy access to security measures like cryptography is going to be a huge improvement within that aspect of Swift development.”

Adam Butler, another Swift developer and CTO of Ordoo, told Cult of Mac that the inclusion of this open-source tooling will help expand adoption of Swift. “It’s a very capable and well designed language that balances simplicity and power really well,” Butler said. “I hope to see us using Swift more for building backend services and on embedded hardware in the future. Having a rich [set of] ‘sharp tools’ out of the box for all use cases of Swift is a step towards reaching a vibrant ecosystem that gets adopted by a broader developer community.”

Source: Swift