OSS Projects and Documentation
Tiny Encodings
This library provides reasonably fast constant-time implementations of:
- Base64 Standard and Base64 URL encoding and decoding
- Hex / Base16 encoding and decoding
Tiny CBOR
This minimal library decodes and encodes most useful CBOR structures into simple JavaScript structures.
- Maps with keys as
string
s ornumber
s withCBORType
values in JSMap
s - Arrays of
CBORType
values - integers as
number
s - float32 and float64 as
number
s - float16
NaN
,Infinity
,-Infinity
string
s- byte strings as
Uint8Array
- booleans
null
andundefined
- tags as
CBORTag(tag, value)
Limitations
- No support for indefinite-length arrays, maps, strings, or byte strings.
- Limited support for half-precision floating point numbers.
- JS integers outside the range of
[-9007199254740991, 9007199254740991]
, seeNumber.MAX_SAFE_INTEGER
. - Does not take input of or output to JS Objects – If you're looking to make CBOR parsing and encoding more ergonomic with known structures, see Tiny CBOR Schema below.
- Map keys must be text strings or numbers. Other types are not supported until something like the TC39 Composites proposal reaches baseline support.
- Does not interpret registered tags into other structures like JS Dates.
Tiny CBOR Schema
Will be set up soon.
Tiny COSE
Reads COSE keys and converts them into usable CryptoKey
references. Intended use is to register and verify WebAuthn authenticators in Tiny WebAuthn (see below).
Supported signing and verification algorithms include:
- RS256
- RS384
- RS512
- PS256
- PS384
- PS512
- ES256
- ES384
- EdDSA with Ed25519
Limitations
- ES512 is not implemented due to Deno lacking support for the P-521 curve.
- Does not support other keys for algorithms like HMAC, HKDF, AES-GCM, or ECDH keys.
- Does not support or verify COSE messages such as
COSE_Sign
orCOSE_Mac0
. - Does not support COSE headers, signing objects, MAC objects, encryption objects, or other COSE structures.
Tiny WebAuthn
A server-side WebAuthn library made to be as comprehensible in as little code as possible.
Supports:
- Registering and authenticating roaming authenticators
- Registering and authenticating device-bound authenticators
- Registering and authenticating device-bound passkeys
- Registering and authenticating synced passkeys
JaneTLS
A Cryptography utility implementation in Janet
I no longer use the Janet programming language, so I'm not actively developing this project anymore. If you're looking into what you can do, check out the unit tests. It provides hashing, symmetric cryptography, assymetric cryptography, and encoding utilities. The cryptography primitives are implemented using MBed TLS. Contrary to its name, JaneTLS does not provide a means to facilitate TLS connections.