pub fn start(&self, chain: certs::Chain) -> Result<launch::sev::Start> {
        use certs::*;

        let pdh = chain.verify()?;
        let (crt, prv) = sev::Certificate::generate(sev::Usage::PDH)?;

        let z = key::Key::new(prv.derive(pdh)?);
        let mut nonce = [0u8; 16];
        let mut iv = [0u8; 16];
        rand::rand_bytes(&mut nonce)?;
        rand::rand_bytes(&mut iv)?;

        Ok(launch::sev::Start {
            policy: self.policy,
            cert: crt,
            session: self.session(nonce, iv, z)?,
        })
    }
/// Produces data needed to initiate the SEV launch sequence.
Produces data needed to initiate the SEV launch sequence.
Produces data needed to initiate the SEV launch sequence .
pub fn start(&self, chain: certs::Chain) -> Result<launch::sev::Start> {
        use certs::*;
        let pdh = chain.verify()?;
        let (crt, prv) = sev::Certificate::generate(sev::Usage::PDH)?;
        let z = key::Key::new(prv.derive(pdh)?);
        let mut nonce = [0u8; 16];
        let mut iv = [0u8; 16];
        rand::rand_bytes(&mut nonce)?;
        rand::rand_bytes(&mut iv)?;
        Ok(launch::sev::Start {
            policy: self.policy,
            cert: crt,
            session: self.session(nonce, iv, z)?,
        })
    }
pub fn start ( & self , chain : certs :: Chain ) -> Result < launch :: sev :: Start > { use certs :: * ; let pdh = chain . verify ( ) ? ; let ( crt , prv ) = sev :: Certificate :: generate ( sev :: Usage :: PDH ) ? ; let z = key :: Key :: new ( prv . derive ( pdh ) ? ) ; let mut nonce = [ 0u8 ; 16 ] ; let mut iv = [ 0u8 ; 16 ] ; rand :: rand_bytes ( & mut nonce ) ? ; rand :: rand_bytes ( & mut iv ) ? ; Ok ( launch :: sev :: Start { policy : self . policy , cert : crt , session : self . session ( nonce , iv , z ) ? , } ) }
Produces data needed to initiate the SEV launch sequence.
Produces data needed to initiate the SEV launch sequence .
&self
chain
certs::Chain
&self
chain
certs::Chain