Skip to content
/ elliptic Public

Cross-platform elliptic curve arithmetic

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.md
MIT
LICENSE-MIT.md
Notifications You must be signed in to change notification settings

NuID/elliptic

Repository files navigation

nuid.elliptic

Cross-platform elliptic curve arithmetic.

Git issues and other communications are warmly welcomed. [email protected]

Requirements

jvm, node + npm, clj, shadow-cljs

Clojure and ClojureScript

tools.deps:

{nuid/elliptic {:git/url "https://github.com/nuid/elliptic" :sha "..."}}

usage:

$ clj # or shadow-cljs node-repl
=> (require '[nuid.elliptic.curve.point :as point])
=> (require '[nuid.elliptic.curve :as curve])
=> (require '[nuid.transit :as transit])
=> (require '[nuid.bn :as bn])
=> (def c (curve/from ::curve/secp256k1))
=> (def g (curve/base c))
=> (def n (curve/order c))
=> (def k (bn/from "123333333333333333333333333333333333333333321"))
=> (def p (point/mul g k))
=> (def q (point/add g p))

Notes

nuid.elliptic primarily exists to abstract over platform-specific differences and provide a common interface to the provided functionality across host platforms. nuid.elliptic delegates directly to host implementions (e.g. bouncycastle on the jvm, and elliptic, etc., in node and the browser).

Licensing

Apache v2.0 or MIT

⚠️ Disclaimer

This library is property tested to help verify implementation, but has not yet been audited by an independent third party.

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •