Skip to content

Commit

Permalink
ecdsa: add IEEE P1363 reference (#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri authored Aug 18, 2024
1 parent ba562ac commit 132b046
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 3 additions & 1 deletion ecdsa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ pub type SignatureSize<C> = <FieldBytesSize<C> as Add>::Output;
/// Fixed-size byte array containing an ECDSA signature
pub type SignatureBytes<C> = Array<u8, SignatureSize<C>>;

/// ECDSA signature (fixed-size). Generic over elliptic curve types.
/// ECDSA signature (fixed-size, a.k.a. [IEEE P1363]). Generic over elliptic curve types.
///
/// Serialized as fixed-sized big endian scalar values with no added framing:
///
Expand All @@ -203,6 +203,8 @@ pub type SignatureBytes<C> = Array<u8, SignatureSize<C>>;
///
/// The serialization uses a hexadecimal encoding when used with
/// "human readable" text formats, and a binary encoding otherwise.
///
/// [IEEE P1363]: https://en.wikipedia.org/wiki/IEEE_P1363
#[derive(Clone, Eq, PartialEq)]
pub struct Signature<C: EcdsaCurve> {
r: ScalarPrimitive<C>,
Expand Down
5 changes: 2 additions & 3 deletions ecdsa/src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ use {crate::VerifyingKey, elliptic_curve::PublicKey, signature::KeypairRef};
use elliptic_curve::pkcs8::{EncodePrivateKey, SecretDocument};

/// ECDSA secret key used for signing. Generic over prime order elliptic curves
/// (e.g. NIST P-curves)
/// (e.g. NIST P-curves).
///
/// Requires an [`elliptic_curve::CurveArithmetic`] impl on the curve, and a
/// [`SignPrimitive`] impl on its associated `Scalar` type.
/// Requires an [`elliptic_curve::CurveArithmetic`] impl on the curve.
///
/// ## Usage
///
Expand Down
5 changes: 2 additions & 3 deletions ecdsa/src/verifying.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ use elliptic_curve::pkcs8::EncodePublicKey;
use serdect::serde::{de, ser, Deserialize, Serialize};

/// ECDSA public key used for verifying signatures. Generic over prime order
/// elliptic curves (e.g. NIST P-curves)
/// elliptic curves (e.g. NIST P-curves).
///
/// Requires an [`elliptic_curve::CurveArithmetic`] impl on the curve, and a
/// [`VerifyPrimitive`] impl on its associated `AffinePoint` type.
/// Requires an [`elliptic_curve::CurveArithmetic`] impl on the curve.
///
/// ## Usage
///
Expand Down

0 comments on commit 132b046

Please sign in to comment.