SecurityIssue

Enum SecurityIssue 

Source
pub enum SecurityIssue {
    Critical {
        description: &'static str,
        impact: &'static str,
        remediation: &'static str,
    },
    High {
        description: &'static str,
        impact: &'static str,
        remediation: &'static str,
    },
    Medium {
        description: &'static str,
        impact: &'static str,
        remediation: &'static str,
    },
    Low {
        description: &'static str,
        impact: &'static str,
        remediation: &'static str,
    },
}
Expand description

Security issue found during audit.

Variants§

§

Critical

Critical security vulnerability

Fields

§description: &'static str

Description of the vulnerability

§impact: &'static str

Impact assessment of the vulnerability

§remediation: &'static str

Recommended remediation steps

§

High

High severity issue

Fields

§description: &'static str

Description of the issue

§impact: &'static str

Impact assessment of the issue

§remediation: &'static str

Recommended remediation steps

§

Medium

Medium severity issue

Fields

§description: &'static str

Description of the issue

§impact: &'static str

Impact assessment of the issue

§remediation: &'static str

Recommended remediation steps

§

Low

Low severity issue

Fields

§description: &'static str

Description of the issue

§impact: &'static str

Impact assessment of the issue

§remediation: &'static str

Recommended remediation steps

Implementations§

Source§

impl SecurityIssue

Source

pub fn severity(&self) -> &'static str

Returns the severity level of this security issue as a string.

The severity levels are ordered from most to least critical:

  • CRITICAL: Immediate security risk requiring urgent attention
  • HIGH: Significant security risk that should be addressed soon
  • MEDIUM: Moderate security concern to be addressed in due course
  • LOW: Minor security issue with limited impact
§Returns

A static string slice containing the severity level

§Examples
use clock_curve_math::ct::audit::SecurityIssue;

let issue = SecurityIssue::Critical {
    description: "Timing vulnerability detected",
    impact: "Keys may be recoverable",
    remediation: "Implement constant-time operations"
};

assert_eq!(issue.severity(), "CRITICAL");
Source

pub fn description(&self) -> &str

Returns the description of this security issue.

The description provides details about what security problem was detected, including the specific vulnerability or issue found.

§Returns

A string slice containing the issue description

§Examples
use clock_curve_math::ct::audit::SecurityIssue;

let issue = SecurityIssue::High {
    description: "Data-dependent operations detected",
    impact: "Side-channel information leakage possible",
    remediation: "Use constant-time primitives"
};

assert_eq!(issue.description(), "Data-dependent operations detected");

Trait Implementations§

Source§

impl Clone for SecurityIssue

Source§

fn clone(&self) -> SecurityIssue

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SecurityIssue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.