CryptoKitCLI

Take Apple CryptoKit to the command line and perform cryptographic operations securely and efficiently.

Twitter Swift License Swift Package Manager Swift Action Coverage Documentation

🌟 Features

✅ Create or validate UUID (universally unique value).

✅ Perform cryptographically secure hashing (SHA-2 hash with 512, 384 or 256-bit digest).

✅ Create or validate HMAC (hash message authentication).

✅ Crypt and decrypt using AES-GCM cipher.

✅ Crypt and decrypt using ChaCha20-Poly1305 cipher.

✅ Symmetric key auto-hash to SHA-256 if needed.

🚧 X25519 key agreement and ed25519 signatures.

🚧 NIST P-521 signatures and key agreement.

🚧 NIST P-384 signatures and key agreement.

🚧 NIST P-256 signatures and key agreement.

🐒 Usage

Simply run:

$ cryptokit [subcommand]

Subcommands

UUID

$ cryptokit uuid

SHA-2 Hashing

$ cryptokit hash

HMAC

$ cryptokit hmac

AES-GCM

$ cryptokit aes

ChaCha20-Poly1305

$ cryptokit poly

🛠 Compatibility

⚙️ Installation

There’re more than one way to install CryptoKitCLI.

Using Homebrew:

$ brew install alexruperez/CryptoKitCLI/formula

Using Mint:

$ mint install alexruperez/CryptoKitCLI

Compiling from source:

Make sure Xcode 11.4+ is installed first.

$ git clone https://github.com/alexruperez/CryptoKitCLI.git
$ cd CryptoKitCLI
$ make install

With that installed and in the /usr/local/bin folder, now it’s ready to serve.

Using Swift Package Manager:

Use as CLI

$ git clone https://github.com/alexruperez/CryptoKitCLI.git
$ cd CryptoKitCLI
$ swift run

Use as dependency

Add the following to your Package.swift file’s dependencies:

.package(url: "https://github.com/alexruperez/CryptoKitCLI.git", from: "0.1.0")

And then import wherever needed: import CryptoKitCLI

For more information, see the Swift Package Manager documentation.

🍻 Etc.

👨‍💻 Author

Alex Rupérez – @alexruperez

👮‍♂️ License

CryptoKitCLI is available under the MIT license. See the LICENSE file for more info.