npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

coze

v0.0.1

Published

Coze - A cryptographic JSON messaging specification designed for human readability.

Downloads

23

Readme

⚠️ COZE IS IN ALPHA. USE AT YOUR OWN RISK ⚠️

Coze

For Coze, please see the README in the Main Coze Project.

For your project use coze.min.js.

Developing Coze JS

How to Build

Install esbuild

If using Go, esbuild can be installed with the following.

go install github.com/evanw/esbuild/cmd/[email protected]

Alternatively, see esbuild's installation instructions

Create the Coze distribution file.

(See join.js for more instructions)

esbuild join.js --bundle --format=esm --minify --outfile=coze.min.js
cp coze.min.js verifier/coze.min.js

Simple Coze Verifier

The simple verifier is self-contained in /verifier.

To run the simple verifier locally, especially useful for local development, use the Go server.

cd verifier
go run server.go

And then go to https://localhost:8082/coze.html in your browser.

Testing

Coze uses BrowserTestJS for running unit tests in the browser. The test can run as a Github page.

For local development, use the Go server.

cd verifier/browsertest
go run server.go

Then go to https://localhost:8082.

Coze Javascript Gotchas

  • ⚠️ Javascript is not constant time. Until there's something available with constant time guarantees, like constant time WASM, this library will be vulnerable to timing attacks as this problem is inherent to Javascript.

  • Duplicate detection is outside the scope of Coze JS because Coze JS uses Javascript objects which always have unique fields. Also, no JSON parsing is done inside of Coze JS, which uses last-value-wins. - Objects in ES6 defined with duplicate fields uses last-value-wins.

    • See notes on test_Duplicate.
  • ES224 is not supported. Even though FIPS 186 defines curves P-224, the W3C recommendation omits it and thus is not implemented in Javascript. The Javascript version of Coze will probably only support ES256, ES384, and ES512.

  • The W3C Web Cryptography API recommendation also omits Ed25519, so an external package that implements the Ed25519 primitive is used. The upcoming update FIPS 186-5 section 7.8 specifies Ed25519 support. Hopefully this will motivate Javascript to include Ed25519. Also, Paul has implemented Ed25519ph.

  • TODO use Paul's curves library. Currently ESM builds are "broken", and we'll wait for it to be polished. (The imports are using Typescript @ imports and not resolving to ESM files.)

    Also, we'll preserve the current style somewhere so that we have a SubtleCrypto backend that can be used.

  • Javascript's SubtleCrypto.sign(algorithm, key, data) always hashes a message before signing while Go's ECDSA expects a digest to sign. This means that in Javascript messages must be passed for signing, while in Go only a digest is needed.


Attribution, Trademark Notice, and License

Coze and CozeJS are released under The 3-Clause BSD License.

"Cyphr.me" is a trademark of Cypherpunk, LLC. The Cyphr.me logo is all rights reserved Cypherpunk, LLC and may not be used without permission.