Portable, secure by default cryptography.
Important: This library is not a substitution for well seasoned TLS implementations and only exists as a supplementary means of offering cryptographic primitives. Make sure you understand the limitations of each function before you use them.
Project state: Unstable, we're still working on the API and used algorithms.
Language | Version | Remarks |
---|---|---|
C | c99 |
Requires mbedTLS >= 2.1.0 or OpenSSL >= 1.0.0 |
Go | >= 1.10 |
|
Javascript | node.js >= 11 |
Browsers with WebCrypto support |
Python | >= 3.4 |
|
Ruby | >= 2.5 |
Algorithm | Usage |
---|---|
HMAC-SHA256 | Message authentication |
AES | Block encryption |
AES-GCM | Message and iv encryption (authenticated) |
AES-GCM+AES-CTR | Stream encryption |
X25519+PBKDF2 | Key exchange (KEX) |
Confidentiality will be released using semantic versioning. Releases on the a new major release may introduce algorithm changes that are not compatible with releases on previous major releases. New major versions may be compatible with older releases, unless there are security concerns for supporting older algorithms.
The 0
major release has no promise of backward compatibility and are used to
field test algorithm changes.
Using HMAC-SHA256.
sign(message, key) -> signed message
verify(signed message, key) -> [error]
Using Elliptive Curve Diffie-Helman (ECDH) key exchange.
exchange(readable & writable stream) -> key
Using AES-128-GCM.
encrypt(message, key) -> encrypted message
decrypt(encypted message, key) -> message
Using AES-128-GCM for IV hand over and AES-128-CTR for stream encryption.
encrypter(writable stream, key) -> writable stream
decrypter(readable stream, key) -> readable stream
Performs a key exchange and switches to encrypted/decrypted streams for writing/reading to/from the stream.
secure(readable & writable stream) -> readable & writable stream