pub trait SecurityLevel: KeygenSecurityLevel {
    const EPSILON: usize;
    const ELL: usize;
    const ELL_PRIME: usize;
    const M: usize;

    // Required method
    fn q() -> Integer;
}
Expand description

Security level of the CGGMP21 protocol

You should not implement this trait manually. Use define_security_level macro instead.

Required Associated Constants§

source

const EPSILON: usize

$\varepsilon$ bits

source

const ELL: usize

$\ell$ parameter

source

const ELL_PRIME: usize

$\ell’$ parameter

source

const M: usize

$m$ parameter

Note: currently, security parameter $m$ is hardcoded to M = 128 due to compiler limitations. If you implement this trait directly, actual value of $m$ will be ignored. If you’re using define_security_level macro it will produce a compilation error if different value of $m$ is set. We’re going to fix that once generic_const_exprs feature is stable.

Required Methods§

source

fn q() -> Integer

$q$ parameter

Note that it’s not curve order, and it doesn’t need to be a prime, it’s another security parameter that determines security level.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl SecurityLevel for SecurityLevel128

source§

const EPSILON: usize = 230usize

source§

const ELL: usize = 256usize

source§

const ELL_PRIME: usize = 848usize

source§

const M: usize = 128usize