Skip to content

Commit

Permalink
Private buffer mod
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Nov 30, 2023
1 parent d76698d commit f56c92b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
6 changes: 3 additions & 3 deletions aws-lc-rs/src/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub struct Ed25519SeedBufferType {
}
/// Elliptic curve private key data encoded as a big-endian fixed-length integer.
#[allow(clippy::module_name_repetitions)]
pub type Ed25519SeedBuffer<'a> = Buffer<'a, Ed25519SeedBufferType>;
pub type Ed25519SeedBin<'a> = Buffer<'a, Ed25519SeedBufferType>;

impl Seed<'_> {
/// Exposes the seed encoded as a big-endian fixed-length integer.
Expand All @@ -118,9 +118,9 @@ impl Seed<'_> {
///
/// # Errors
/// `error::Unspecified` if serialization failed.
pub fn to_buffer(&self) -> Result<Ed25519SeedBuffer, Unspecified> {
pub fn to_buffer(&self) -> Result<Ed25519SeedBin, Unspecified> {
let buffer = Vec::from(&self.0.private_key[..ED25519_PRIVATE_KEY_SEED_LEN]);
Ok(Ed25519SeedBuffer::new(buffer))
Ok(Ed25519SeedBin::new(buffer))
}
}

Expand Down
2 changes: 1 addition & 1 deletion aws-lc-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ extern crate core;

pub mod aead;
pub mod agreement;
pub mod buffer;
mod buffer;
pub mod constant_time;
pub mod digest;
pub mod error;
Expand Down
6 changes: 0 additions & 6 deletions aws-lc-rs/src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,6 @@ pub use crate::ed25519::{
Ed25519KeyPair, EdDSAParameters, Seed as Ed25519Seed, ED25519_PUBLIC_KEY_LEN,
};

/// A module containing types that indicate the encoding of a `buffer::Buffer`
pub mod encoding {
pub use crate::ec::key_pair::{EcPrivateKeyBin, EcPrivateKeyRfc5915Der};
pub use crate::ec::EcPublicKeyX509Der;
}

/// The longest signature is an ASN.1 P-384 signature where *r* and *s* are of
/// maximum length with the leading high bit set on each. Then each component
/// will have a tag, a one-byte length, and a one-byte “I'm not negative”
Expand Down

0 comments on commit f56c92b

Please sign in to comment.