forked from RustCrypto/elliptic-curves
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bign curve (STB 34.101.45-2013)
- Loading branch information
Showing
25 changed files
with
17,063 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,114 @@ | ||
name: bign256 | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- ".github/workflows/bign256.yml" | ||
- "bign256/**" | ||
- "Cargo.*" | ||
push: | ||
branches: master | ||
|
||
defaults: | ||
run: | ||
working-directory: bign256 | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: "-Dwarnings" | ||
RUSTDOCFLAGS: "-Dwarnings" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- 1.65.0 # MSRV | ||
- stable | ||
target: | ||
- thumbv7em-none-eabi | ||
- wasm32-unknown-unknown | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
targets: ${{ matrix.target }} | ||
- run: cargo build --target ${{ matrix.target }} --release --no-default-features | ||
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc | ||
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features pkcs8 | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
# 32-bit Linux | ||
- target: i686-unknown-linux-gnu | ||
rust: 1.65.0 # MSRV | ||
deps: sudo apt update && sudo apt install gcc-multilib | ||
- target: i686-unknown-linux-gnu | ||
rust: stable | ||
deps: sudo apt update && sudo apt install gcc-multilib | ||
|
||
# 64-bit Linux | ||
- target: x86_64-unknown-linux-gnu | ||
rust: 1.65.0 # MSRV | ||
- target: x86_64-unknown-linux-gnu | ||
rust: stable | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
targets: ${{ matrix.target }} | ||
- run: ${{ matrix.deps }} | ||
- run: cargo check --target ${{ matrix.target }} --all-features | ||
- run: cargo test --release --target ${{ matrix.target }} --no-default-features | ||
- run: cargo test --release --target ${{ matrix.target }} | ||
- run: cargo test --release --target ${{ matrix.target }} --all-features | ||
|
||
cross: | ||
strategy: | ||
matrix: | ||
include: | ||
# ARM32 | ||
- target: armv7-unknown-linux-gnueabihf | ||
rust: 1.65.0 # MSRV (cross) | ||
- target: armv7-unknown-linux-gnueabihf | ||
rust: stable | ||
|
||
# ARM64 | ||
- target: aarch64-unknown-linux-gnu | ||
rust: 1.65.0 # MSRV (cross) | ||
- target: aarch64-unknown-linux-gnu | ||
rust: stable | ||
|
||
# PPC32 | ||
- target: powerpc-unknown-linux-gnu | ||
rust: 1.65.0 # MSRV (cross) | ||
- target: powerpc-unknown-linux-gnu | ||
rust: stable | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: ${{ matrix.deps }} | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
targets: ${{ matrix.target }} | ||
- uses: RustCrypto/actions/cross-install@master | ||
- run: cross test --release --target ${{ matrix.target }} --all-features | ||
|
||
doc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: RustCrypto/actions/cargo-cache@master | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- run: cargo doc --all-features |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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,6 +1,7 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"bign256", | ||
"bp256", | ||
"bp384", | ||
"k256", | ||
|
This file contains 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 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,2 @@ | ||
/target | ||
/Cargo.lock |
This file contains 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,6 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
This file contains 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,45 @@ | ||
[package] | ||
name = "bign256" | ||
version = "0.0.0" | ||
description = """ | ||
Pure Rust implementation of the Bign P-256 (a.k.a. bign-curve256v1) | ||
elliptic curve as defined in STB 34.101.45-2013, with | ||
general purpose curve arithmetic | ||
""" | ||
authors = ["RustCrypto Developers"] | ||
license = "Apache-2.0 OR MIT" | ||
documentation = "https://docs.rs/bign-curve256v1" | ||
repository = "https://github.com/RustCrypto/elliptic-curves/tree/master/bign256" | ||
readme = "README.md" | ||
categories = ["cryptography", "no-std"] | ||
keywords = ["crypto", "ecc", "stb", "bign-curve256v1", "bignp256"] | ||
edition = "2021" | ||
rust-version = "1.65" | ||
|
||
[dependencies] | ||
elliptic-curve = { version = "0.13.1", features = ["hazmat", "sec1", "arithmetic"] } | ||
primeorder = { version = "0.13", path = "../primeorder" } | ||
|
||
ecdsa-core = { version = "0.16", package = "ecdsa", optional = true, default-features = false, features = ["der"] } | ||
serdect = { version = "0.2", optional = true, default-features = false } | ||
belt-hash = { version = "0.1.0", optional = true } | ||
|
||
[dev-dependencies] | ||
hex-literal = "0.4" | ||
criterion = "0.4" | ||
|
||
|
||
[features] | ||
default = ["pkcs8", "std"] | ||
alloc = ["ecdsa-core?/alloc", "elliptic-curve/alloc"] | ||
std = ["alloc", "ecdsa-core?/std", "elliptic-curve/std"] | ||
|
||
pkcs8 = ["ecdsa-core/pkcs8", "elliptic-curve/pkcs8"] | ||
|
||
[[bench]] | ||
name = "field" | ||
harness = false | ||
|
||
[[bench]] | ||
name = "scalar" | ||
harness = false |
Oops, something went wrong.