From owner-freebsd-hackers@freebsd.org Tue Oct 24 00:00:55 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88E19E2BA92; Tue, 24 Oct 2017 00:00:55 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (mail.metricspace.net [IPv6:2001:470:1f11:617::107]) by mx1.freebsd.org (Postfix) with ESMTP id 5F6CE652C5; Tue, 24 Oct 2017 00:00:55 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from [IPv6:2001:470:1f11:617:3210:b3ff:fe77:ca3f] (unknown [IPv6:2001:470:1f11:617:3210:b3ff:fe77:ca3f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id 13E7B2FC6; Tue, 24 Oct 2017 00:00:54 +0000 (UTC) Subject: Re: Trust system write-up To: "Simon J. Gerraty" Cc: Ian Lepore , "freebsd-hackers@freebsd.org" , freebsd-security@freebsd.org, freebsd-arch@freebsd.org References: <1a9bbbf6-d975-0e77-b199-eb1ec0486c8a@metricspace.net> <1508775285.34364.2.camel@freebsd.org> <72903.1508799185@kaos.jnpr.net> From: Eric McCorkle Message-ID: Date: Mon, 23 Oct 2017 20:00:53 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <72903.1508799185@kaos.jnpr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Oct 2017 00:00:55 -0000 On 10/23/2017 18:53, Simon J. Gerraty wrote: > Eric McCorkle wrote: >>> Any thoughts on how to validate executables which are not elf binaries, >>> such as shell scripts, python programs, etc? >> >> I hadn't really thought in depth about it, as my main initial goal is >> signed kernel/modules, but I have given it some thought... >> > >> An alternative is something like the NetBSD veriexec framework, where > > Yes, as previously mentioned the verified exec model deals with this > neatly, and btw is more efficient than signing individual files - as is > needed with ELF signing etc. I think for linux based platforms using IMA we > need to generate 20-30k+ signatures, vs about a dozen for platforms using > verified exec, verification is also more expensive I'm told. Hmmm. There's advantages both ways, and I'll probably end up supporting both, as it's useful to have an in-band mechanism as well (also, I've already implemented signed ELFs). However, there is a definite advantage to having one signature for a huge number of MACs. Moreover, as I mention in the paper, the most feasible quantum-safe signature scheme at the present is SPHINCS, which has signatures about 40Kib in size. That's pretty terrible if you're signing each executable, but if you're signing 20-30k MACs at 16-32 bytes per code plus a path, suddenly a 40Kib signature doesn't look so bad anymore. It would be pretty great to roll out a trust infrastructure AND viable quantum-safe signatures. I could also see a combined scheme, say, where ELF files carry a UUID which indexes into a MAC manifest.