Skip to content

draft: add bp512 crate #1186

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

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/bp512.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: bp512

on:
pull_request:
paths:
- ".github/workflows/bp512.yml"
- "bp512/**"
- "Cargo.*"
push:
branches: master

defaults:
run:
working-directory: bp512

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.85.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v4
- 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 arithmetic
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features ecdsa
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features pem
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features pkcs8
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features serde
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features sha384
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features ecdsa,pem,pkcs8,serde,sha384

test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.85.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo check --all-features
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --all-features

doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo doc --all-features
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"bign256",
"bp256",
"bp384",
"bp512",
"k256",
"p192",
"p224",
Expand Down
106 changes: 106 additions & 0 deletions bp512/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# 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).

## 0.7.0 (UNRELEASED)
### Changed
- `sqrt` implementation to Atkin algorithm ([#918])

### Added
- `elliptic_curve::ops::Invert` implementation ([#971])

## Changed
- Update to `ecdsa` v0.17 ([#1011])
- Update to `rand_core` v0.9 ([#1125])
- Update to `hybrid-array` v0.3 ([#1125])
- Edition changed to 2024 and MSRV bumped to 1.85 ([#1125])
- Relax MSRV policy and allow MSRV bumps in patch releases

[#918]: https://github.com/RustCrypto/elliptic-curves/pull/918
[#971]: https://github.com/RustCrypto/elliptic-curves/pull/971
[#1011]: https://github.com/RustCrypto/elliptic-curves/pull/1011
[#1125]: https://github.com/RustCrypto/elliptic-curves/pull/1125

## 0.6.1 (2023-04-16)
### Added
- WIP `arithmetic` implementation ([#869], [#872], [#873], [#875], [#877])

[#869]: https://github.com/RustCrypto/elliptic-curves/pull/869
[#872]: https://github.com/RustCrypto/elliptic-curves/pull/872
[#873]: https://github.com/RustCrypto/elliptic-curves/pull/873
[#875]: https://github.com/RustCrypto/elliptic-curves/pull/875
[#877]: https://github.com/RustCrypto/elliptic-curves/pull/877

## 0.6.0 (2023-03-02)
### Added
- `FieldBytesEncoding` trait impls ([#732])

### Changed
- Bump `elliptic-curve` dependency to v0.13 ([#770])
- Bump `ecdsa` to v0.16 ([#770])

[#732]: https://github.com/RustCrypto/elliptic-curves/pull/732
[#770]: https://github.com/RustCrypto/elliptic-curves/pull/770

## 0.5.0 (2023-01-15)
### Added
- `alloc` feature ([#670])

### Changed
- Use weak feature activation; MSRV 1.60 ([#701])
- Bump `ecdsa` dependency to v0.15 ([#713])

[#670]: https://github.com/RustCrypto/elliptic-curves/pull/670
[#701]: https://github.com/RustCrypto/elliptic-curves/pull/701
[#713]: https://github.com/RustCrypto/elliptic-curves/pull/713

## 0.4.0 (2022-05-09)
### Changed
- Have `pkcs8` feature activate `ecdsa/pkcs8` ([#538])
- Bump `elliptic-curve` to v0.12 ([#544])
- Bump `ecdsa` to v0.14 ([#544])

[#538]: https://github.com/RustCrypto/elliptic-curves/pull/538
[#544]: https://github.com/RustCrypto/elliptic-curves/pull/544

## 0.3.0 (2021-12-14)
### Added
- `serde` feature ([#463])

### Changed
- Rust 2021 edition upgrade; MSRV 1.56+ ([#453])
- Bump `elliptic-curve` crate dependency to v0.11 ([#466])
- Bump `ecdsa` crate dependency to v0.13 ([#467])

[#453]: https://github.com/RustCrypto/elliptic-curves/pull/453
[#463]: https://github.com/RustCrypto/elliptic-curves/pull/463
[#466]: https://github.com/RustCrypto/elliptic-curves/pull/466
[#467]: https://github.com/RustCrypto/elliptic-curves/pull/467

## 0.2.0 (2021-06-08)
### Changed
- Bump `elliptic-curve` to v0.10; MSRV 1.51+ ([#349])
- Bump `ecdsa` to v0.12 ([#349])

[#349]: https://github.com/RustCrypto/elliptic-curves/pull/349

## 0.1.0 (2021-04-29)
### Added
- `Order` constant ([#328])

### Changed
- Bump `ecdsa` crate dependency to v0.11 ([#330])

[#328]: https://github.com/RustCrypto/elliptic-curves/pull/328
[#330]: https://github.com/RustCrypto/elliptic-curves/pull/330

## 0.0.2 (2021-03-22)
### Changed
- Bump `base64ct`, `ecdsa`, `elliptic-curve`, and `pkcs8`; MSRV 1.47+ ([#318])

[#318]: https://github.com/RustCrypto/elliptic-curves/pull/318

## 0.0.1 (2021-02-11) [YANKED]
- Initial release
38 changes: 38 additions & 0 deletions bp512/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[package]
name = "bp512"
version = "0.7.0-pre"
description = "Brainpool P-512 (brainpoolP512r1 and brainpoolP512t1) elliptic curves"
authors = ["RustCrypto Developers"]
license = "Apache-2.0 OR MIT"
documentation = "https://docs.rs/bp512"
homepage = "https://github.com/RustCrypto/elliptic-curves/tree/master/bp512"
repository = "https://github.com/RustCrypto/elliptic-curves"
readme = "README.md"
categories = ["cryptography", "no-std"]
keywords = ["brainpool", "crypto", "ecc"]
edition = "2024"
rust-version = "1.85"

[dependencies]
elliptic-curve = { version = "0.14.0-rc.0", default-features = false, features = ["sec1"] }

# optional dependencies
ecdsa = { version = "=0.17.0-pre.9", optional = true, default-features = false, features = ["der"] }
primefield = { version = "=0.14.0-pre.0", optional = true, path = "../primefield" }
primeorder = { version = "=0.14.0-pre.2", optional = true, path = "../primeorder" }
sha2 = { version = "=0.11.0-pre.5", optional = true, default-features = false }

[features]
default = ["pkcs8", "std"]
alloc = ["ecdsa?/alloc", "elliptic-curve/alloc", "primeorder?/alloc"]
std = ["alloc", "ecdsa?/std", "elliptic-curve/std"]

pem = ["elliptic-curve/pem", "pkcs8"]
pkcs8 = ["ecdsa/pkcs8", "elliptic-curve/pkcs8"]
serde = ["ecdsa/serde", "elliptic-curve/serde"]
sha512 = ["ecdsa/digest", "ecdsa/hazmat", "sha2"]
arithmetic = ["dep:primefield", "dep:primeorder"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
Loading
Loading