Skip to main content

Crate bp256

Crate bp256 

Source
Expand description

§RustCrypto: Brainpool P-256 elliptic curves

crate Docs Build Status Apache2/MIT licensed Rust Version Project Chat

Brainpool P-256 (brainpoolP256r1 and brainpoolP256t1) elliptic curve types implemented in terms of traits from the elliptic-curve crate.

Documentation

§License

All crates licensed under either of

at your option.

§Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

§Backends

This crate has support for two different field arithmetic backends which can be selected using cfg(bp256_backend), e.g. to select the bigint backend:

$ RUSTFLAGS='--cfg bp256_backend="bigint"' cargo test

Or it can be set through .cargo/config:

[build]
rustflags = ['--cfg', 'bp256_backend="bigint"']

The available backends are:

  • bigint: experimental backend provided by crypto-bigint. May offer better performance in some cases along with smaller code size, but might also have bugs.
  • fiat (default): formally verified implementation synthesized by fiat-crypto which should be correct for all inputs (though there’s a possibility of bugs in the code which glues to it)

Re-exports§

pub use crate::r1::BrainpoolP256r1;
pub use crate::t1::BrainpoolP256t1;
pub use elliptic_curve;
pub use elliptic_curve::pkcs8;pkcs8

Modules§

r1
brainpoolP256r1 elliptic curve: verifiably pseudo-random variant
t1
brainpoolP256t1 elliptic curve: twisted variant

Structs§

Scalararithmetic
Element in the brainpoolP256 scalar field modulo n

Type Aliases§

FieldBytes
Byte representation of a base/scalar field element of a given curve.
U256
256-bit unsigned big integer.