-
Notifications
You must be signed in to change notification settings - Fork 1
sdk%misc: prepare dash-pkc for initial release
#48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <!-- [start:omit] --> | ||
|
|
||
| > [!NOTE] | ||
| > This is a spliced page meant for publication on Zensical. See [`pkgs/pkc`](../../pkgs/pkc/) for available | ||
| > documentation. | ||
|
|
||
| <!-- [end:omit] --> | ||
|
|
||
| <!-- [include:pkgs/pkc/README.md] --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <!-- [start:omit] --> | ||
|
|
||
| > [!NOTE] | ||
| > This is a spliced page meant for publication on Zensical. See [`pkgs/pkc`](../../pkgs/pkc/) for available | ||
| > documentation. | ||
|
|
||
| <!-- [end:omit] --> | ||
|
|
||
| <!-- [include:pkgs/pkc/CHANGELOG.md] --> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| The MIT License (MIT) | ||
|
|
||
| Copyright (c) 2026-present, The Dash Core developers | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,70 @@ | ||
| [](https://github.com/dashpay/base-sdk/actions/workflows/pkg_pkc.yml) | ||
| [](https://app.codecov.io/github/dashpay/base-sdk/tree/develop/pkgs%2Fpkc) | ||
|
|
||
| > [!WARNING] | ||
| > | ||
| > It is heavily advised **against** using this library for new consensus implementations and to use established | ||
| > spec-conformant libraries like [supranational/blst](https://github.com/supranational/blst) as this library codifies | ||
| > primitives predating the final IETF spec and includes a non-standard (now legacy) scheme. | ||
| > | ||
| > **This library has not undergone a formal security review.** | ||
|
|
||
| # dash-pkc | ||
|
|
||
| This crate supplies the curve primitives for signing, verifying and encrypting used by the Dash Base SDK for | ||
| consensus-stable types, including | ||
|
|
||
| * Distinct byte bag and operative types to allow parsing _without_ pulling in crypto dependencies with native | ||
| zeroization and constant-time comparison. | ||
| * A bug-compatible implementation of the sunset BLS12-381 scheme used by the reference implementation (also known as | ||
| "legacy" or Chia scheme) and the current active (i.e. "basic") scheme. | ||
| * Shared DH secret derivation and encryption using BLS12-381's integrated encryption scheme. | ||
| * A consensus-compatible wrapper around secp256k1 with support for DER (en/de)coding, recoverable signatures and | ||
| Bitcoin-derived compression semantics. | ||
| * Scalar and point tweaks for BLS12-381 and secp256k1 | ||
|
|
||
| ## Usage | ||
|
|
||
| To import `dash-pkc` to your project, add the following to the `[dependencies]` section in `Cargo.toml` | ||
|
|
||
| ```toml | ||
| dash-pkc = "0.1.0-beta" | ||
| ``` | ||
|
|
||
| To use an unpublished revision of this crate, identify the commit hash to pin against and use the following replacing | ||
| the value of `rev`. | ||
|
|
||
| ```toml | ||
| dash-pkc = { git = "https://github.com/dashpay/base-sdk", rev = "a1b2c3d4e5f67890abcdef1234567890abcdef" } | ||
| ``` | ||
|
|
||
| To build this crate on a clone of the repository, at the repository root, run the following | ||
|
|
||
| ```bash | ||
| cargo build --package dash-pkc --all-features | ||
| ``` | ||
|
|
||
| ## Features | ||
|
|
||
| This crate is `#![no_std]` + `alloc` by default. | ||
|
|
||
| | Feature | Default | Description | | ||
| | ------- | ------- | ----------- | | ||
| | `bls` | | Enables support for BLS12-381 operations backed by [`blst`](https://docs.rs/blst). Byte types are available without enabling this feature. | | ||
| | `codec` | :white_check_mark: | Enables support for encoding and decoding types using [`bitcoin-consensus-encoding`](https://docs.rs/bitcoin-consensus-encoding) | | ||
| | `ecdsa` | | Enables secp256k1 operations backed by [`rust-secp256k1`](https://docs.rs/secp256k1). Byte types are available without enabling this feature. | | ||
| | `eddsa` | | Enables ed25519 operations backed by [`ed25519-dalek`](https://docs.rs/ed25519-dalek). Byte types are available without enabling this feature. | | ||
| | `full` | | Enables all features and `std` support. | | ||
| | `serde` | | Enables support for encoding and decoding `codec`-backed types using [`serde`](https://github.com/serde-rs/serde). _Implies `codec`._ | | ||
|
|
||
| ## Documentation | ||
|
|
||
| <!-- pyml disable-next-line no-bare-urls --> | ||
| Documentation for the most recent release of `dash-pkc` is available at https://dashpay.github.io/base-sdk/pkc and | ||
| changes between versions are recorded in the [changelog](https://dashpay.github.io/base-sdk/pkc/changelog). | ||
|
|
||
| ## License | ||
|
|
||
| <!-- pyml disable-next-line no-bare-urls --> | ||
| `dash-pkc` is released under the terms of the MIT license. Copyright © 2026-present, The Dash Core developers. | ||
| To read a copy of the license terms, visit https://opensource.org/license/MIT. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.