[][src]Trait bundled_crypto::algo::hash::asymmetric::Algo

pub trait Algo: Algo where
    Self::Key: KeyPair
{ type SigningError; type VerifyError; fn sign_public(
        msg: &[u8],
        key: &<Self::Key as KeyPair>::Public
    ) -> Result<Vec<u8>, Self::SigningError>;
fn verify_public(
        msg: &[u8],
        signature: &[u8],
        key: &<Self::Key as KeyPair>::Public
    ) -> Result<bool, Self::VerifyError>;
fn sign_private(
        msg: &[u8],
        key: Option<&<Self::Key as KeyPair>::Private>
    ) -> Result<Vec<u8>, Self::SigningError>;
fn verify_private(
        msg: &[u8],
        signature: &[u8],
        key: Option<&<Self::Key as KeyPair>::Private>
    ) -> Result<bool, Self::VerifyError>; }

Associated Types

Loading content...

Required methods

fn sign_public(
    msg: &[u8],
    key: &<Self::Key as KeyPair>::Public
) -> Result<Vec<u8>, Self::SigningError>

fn verify_public(
    msg: &[u8],
    signature: &[u8],
    key: &<Self::Key as KeyPair>::Public
) -> Result<bool, Self::VerifyError>

fn sign_private(
    msg: &[u8],
    key: Option<&<Self::Key as KeyPair>::Private>
) -> Result<Vec<u8>, Self::SigningError>

fn verify_private(
    msg: &[u8],
    signature: &[u8],
    key: Option<&<Self::Key as KeyPair>::Private>
) -> Result<bool, Self::VerifyError>

Loading content...

Implementors

impl Algo for bundled_crypto::algo::hash::ecc::ed25519::Algo[src]

type SigningError = AlgoError

type VerifyError = AlgoError

fn sign_public(
    _msg: &[u8],
    _key: &<Self::Key as KeyPair>::Public
) -> Result<Vec<u8>, Self::SigningError>
[src]

unimplemented

fn verify_private(
    _msg: &[u8],
    _signature: &[u8],
    _key: Option<&<Self::Key as KeyPair>::Private>
) -> Result<bool, Self::VerifyError>
[src]

unimplemented

impl Algo for bundled_crypto::algo::hash::rsa::pss_sha384_mgf1_65537::Algo[src]

type SigningError = AlgoError

type VerifyError = AlgoError

fn sign_public(
    _msg: &[u8],
    _key: &<Self::Key as KeyPair>::Public
) -> Result<Vec<u8>, Self::SigningError>
[src]

unimplemented

fn verify_public(
    msg: &[u8],
    signature: &[u8],
    key: &<Self::Key as KeyPair>::Public
) -> Result<bool, Self::VerifyError>
[src]

TODO Ensure constant time.

fn verify_private(
    _msg: &[u8],
    _signature: &[u8],
    _key: Option<&<Self::Key as KeyPair>::Private>
) -> Result<bool, Self::VerifyError>
[src]

unimplemented

Loading content...