lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171204092303.op7xo6nsptyvvtfv@linux.intel.com>
Date:   Mon, 4 Dec 2017 11:23:03 +0200
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     platform-driver-x86@...r.kernel.org, x86@...nel.org
Cc:     linux-kernel@...r.kernel.org, Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>
Subject: Re: [PATCH v6 08/11] intel_sgx: in-kernel launch enclave

On Wed, Nov 29, 2017 at 12:38:52AM +0200, Jarkko Sakkinen wrote:
> On Sat, Nov 25, 2017 at 09:29:25PM +0200, Jarkko Sakkinen wrote:
> > This commits implements the in-kernel launch enclave. It is wrapped into
> > a user space program that reads SIGSTRUCT instances from stdin and
> > outputs launch tokens to stdout.
> > 
> > The commit also adds enclave signing tool that is used by kbuild to
> > measure and sign the launch enclave.
> > 
> > CONFIG_INTEL_SGX_SIGNING_KEY points to a PEM-file for the 3072-bit RSA
> > key that is used as the LE public key pair. The default location is:
> > 
> >   drivers/platform/x86/intel_sgx/intel_sgx_signing_key.pem
> > 
> > If the default key does not exist kbuild will generate a random key and
> > place it to this location. KBUILD_SGX_SIGN_PIN can be used to specify
> > the passphrase for the LE public key.
> > 
> > TinyCrypt (https://github.com/01org/tinycrypt) is used as AES
> > implementation, which is not timing resistant. Eventually this needs to
> > be replaced with AES-NI based implementation that could be either
> > 
> > - re-use existing AES-NI code in the kernel
> > - have its own hand written code
> 
> The AES is the biggest remaining open I think.
> 
> I'm starting look at how to re-use kernel aesni code by linking it as
> part of the enclave binary i.e. aesni-intel_asm.S. This will render
> away TinyCrypt's AES code that is used ATM.
> 
> I still need TinyCrypt CMAC, which I will modify to call CBC AES
> encryption routine.
> 
> Does this sound like a sufficient plan?

I'm successfully using now kernel provided aesni_enc and aesni_set_key.
Only CMAC comes from TC. I think refactor stuff in cmac_mode.c to kernel
coding style and call it as derived works from TC since already calls
have replaced (AES). Makes sense to clean it up and make it pass
checkpatch.pl.

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ