A collection of Bitcoin crates implementing the foundations of the Bitcoin protocol.
These are alternatives to the bitcoin
crate or experiments with vision to be
integrated into the bitcoin
crate.
Crates implementing the foundations of Bitcoin protocol
I wonder if it'd be useful to have a feature unsafe-optimizations
that turns on unsafe
code with the only intention to optimize. Currently the candidate is using [MaybeUninit<u8>; 65]
inside SerializedPublicKey
. Relies on correct impl in secp256k1
ofc but that one already calls memset on the whole array ๐
Definition | Operation | Fails if | Trait | Return type |
---|---|---|---|---|
neg: Scalar -> Scalar | x -> (0 - x) mod n | - | Neg |
Self |
checked_add: Scalar, Scalar -> Scalar | x, y -> (x + z) | x + z > n | n/a | Result<Self, OverflowError> |
checked_sub: Scalar, Scalar -> Scalar | x, y -> (x + (0 - y) mod n) | y > x | n/a | Result<Self, OverflowError> |
checked_mul: Scalar, Scalar -> Scalar | x, y -> add(x, x) y times | x * y > n | n/a | Result<Self, OverflowError> |
neg: Scalar -> Scalar | P -> โ + P | - | Neg |
Self |
checked_add: Point, Point -> Point | P, Q -> P + Q | Q = -P | n/a | Result<Self, PointAtInfinity> |
checked_sub: Point, Point -> Point | P, Q -> P + โ + Q | Q = P | n/a | Result<Self, PointAtInfinity> |
checked_add_exp: Point, Scalar -> Point | P, y -> P + yG | yG = -P | n/a | Result<Self, PointAtInfinity> |
checked_sub_exp: Point, Scalar -> Point | P, y -> P + โ + yG | yG = P | n/a | Result<Self, PointAtInfinity> |
mul: Point, Scalar -> Point | P, y -> yP | -1 | Mul<Self> |
Self |
where
x
, y
, z
are scalars with the value up to n
,n
is a order of the secp256k1 generator point G
,P
, Q
, R
are points on the elliptic curve secp256k1 generated from G
via xG
, yG
and zG
multiplication.โ
is a point on elliptic curve at infinity, corresponding to G * 0
allows overflow over G order โฉ
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.