Struct milenage::Milenage[][src]

pub struct Milenage {
    pub ak: Option<[u8; 6]>,
    pub ck: Option<[u8; 16]>,
    pub ik: Option<[u8; 16]>,
    pub k: [u8; 16],
    pub maca: Option<[u8; 8]>,
    pub macs: Option<[u8; 8]>,
    pub op: Option<[u8; 16]>,
    pub opc: [u8; 16],
    pub res: Option<[u8; 8]>,
    pub res_star: Option<[u8; 16]>,
}

Milenage instance

Fields

ak: Option<[u8; 6]>

AK is a 48-bit anonymity key that is the output of either of the functions f5.

ck: Option<[u8; 16]>

CK is a 128-bit confidentiality key that is the output of the function f3.

ik: Option<[u8; 16]>

IK is a 128-bit integrity key that is the output of the function f4.

k: [u8; 16]

K is a 128-bit subscriber key that is an input to the functions f1, f1*, f2, f3, f4, f5 and f5*.

maca: Option<[u8; 8]>

MACA is a 64-bit network authentication code that is the output of the function f1.

macs: Option<[u8; 8]>

MACS is a 64-bit resynchronisation authentication code that is the output of the function f1*.

op: Option<[u8; 16]>

OP is a 128-bit Operator Variant Algorithm Configuration Field that is a component of the functions f1, f1*, f2, f3, f4, f5 and f5*.

opc: [u8; 16]

OPc is a 128-bit value derived from OP and K and used within the computation of the functions.

res: Option<[u8; 8]>

RES is a 64-bit signed response that is the output of the function f2.

res_star: Option<[u8; 16]>

RES* is a 128-bit response that is used in 5G.

Implementations

impl Milenage[src]

pub fn new_with_op(k: [u8; 16], op: [u8; 16]) -> Milenage[src]

Returns a new initialized Milenage from K and OP

pub fn new_with_opc(k: [u8; 16], opc: [u8; 16]) -> Milenage[src]

Returns a new initialized Milenage from K and OPc

pub fn f1(&mut self, rand: &[u8; 16], sqn: &[u8; 6], amf: &[u8; 2]) -> [u8; 8][src]

F1 is the network authentication function. F1 computes network authentication code MAC-A from key K, random challenge RAND, sequence number SQN and authentication management field AMF.

pub fn f1star(
    &mut self,
    rand: &[u8; 16],
    sqn: &[u8; 6],
    amf: &[u8; 2]
) -> [u8; 8]
[src]

F1Star is the re-synchronisation message authentication function. F1Star computes resynch authentication code MAC-S from key K, random challenge RAND, sequence number SQN and authentication management field AMF.

pub fn f2345(
    &mut self,
    rand: &[u8; 16]
) -> ([u8; 8], [u8; 16], [u8; 16], [u8; 6])
[src]

F2345 takes key K and random challenge RAND, and returns response RES, confidentiality key CK, integrity key IK and anonymity key AK.

pub fn f5star(&mut self, rand: &[u8; 16]) -> [u8; 6][src]

F5Star is the anonymity key derivation function for the re-synchronisation message. F5Star takes key K and random challenge RAND, and returns resynch anonymity key AK.

pub fn compute_res_star(
    &mut self,
    mcc: &str,
    mnc: &str,
    rand: &[u8; 16],
    res: &[u8; 8]
) -> Result<[u8; 16], String>
[src]

Computes RESStar from serving network name, RAND and RES as described in A.4 RES* and XRES* derivation function, TS 33.501.

Trait Implementations

impl Debug for Milenage[src]

impl Default for Milenage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.