Skip to content
CTS Blog
Menu
  • About
  • RSS Feed
Menu

What’s new in CryptoKit

Posted on September 8, 2020

People expect apps to be secure and their data to be protected. You may need to perform cryptographic operations to implement features such as authentication, message encryption, or to meet regulatory requirements. CryptoKit is a Swift framework that makes it easier and safer to perform common cryptographic operations, whether you simply need to compute a hash or are implementing a more advanced authentication protocol. This year, CryptoKit adds new APIs for HMAC-based Extract-and-Expand Key Derivation Functions (HKDF), support for PEM and DER formats, and with Swift Crypto your code can now run everywhere Swift runs.

HKDF

Key derivation functions allow you to derive one or more secrets of the size of your choice from a master key or passcode. Starting in iOS 14, you can now use standalone APIs for HKDF. Integrate the easy to use one-shot variant for quick tasks such as deriving multiple keys from a master secret, or the two-step extract and expand API with fine-grained control over the key derivation process. In prior versions of iOS, HKDF was supported only when deriving a symmetric key from an elliptic curve key agreement protocol.

HKDF

PEM and DER formats for encoding elliptic curve keys

PEM and DER formats are now supported directly in CryptoKit. You can now directly pass a PEM string or DER-encoded data to initialize CryptoKit public and private keys, without using another library to perform the conversion.

Portability

With Swift Crypto you can create cross-platform solutions using the CryptoKit APIs on all platforms that Swift supports, including Linux and servers. Portability is important when you need to run the same code on your client and server, such as supporting two-factor authentication using a One-Time Password.

Resources

Introducing Swift Crypto

Watch “Cryptography in Swift” from dotSwift 2020

Powered by WPeMatico

Categories

Recent Posts

  • ‘I’m Gonna Become a Late-in-Life Gamer!’ — Carly Rae Jepsen Reacts After GTA 6 Ignites ‘Run Away With Me’ Revival
  • Cancel Microsoft 365 and get the same apps for life for a one-time payment of $100
  • Skip the junk: These are Amazon’s best Cyber Monday tech deals
  • Todd Howard Promises The Elder Scrolls 6: Sentinel Progress Is Moving ‘at a Really Good Clip,’ Says Bethesda Is Where It ‘Planned to Be’
  • GTA 6: The Album Is on Sale for as Low as $4.99 for Black Friday

Recent Comments

    Archives

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    ©2026 CTS Blog | Design: Newspaperly WordPress Theme