From owner-svn-src-head@freebsd.org Fri Apr 14 20:54:05 2017 Return-Path: Delivered-To: svn-src-head@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 EFFBDD3E336; Fri, 14 Apr 2017 20:54:05 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D7EBCD9; Fri, 14 Apr 2017 20:54:05 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f51.google.com with SMTP id y18so2655266wmh.0; Fri, 14 Apr 2017 13:54:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=jLJHTvhQ45fPLtF6i8vRX49c8KtjsF7jFekdo0eCAAE=; b=q9FzmMpvspeIaiHFKQvnsVx/MOpL2ei9o8/wr++jexAYkdfHIek4nMqRqSw1+dH8O4 c8e0HYtbIb27wBbqju0HUbWjijy7ZO17mdHLB/JBxz+EEDDK0Y+k1CIrftPtK+Zsp8Ev 27F4hRTgeoQo6eD2qAzSe+pUCU7OEyMwefMMKG5GOM1RUMH/j5JA2Cvalw1jR7AHSXkq zSMeBt+1y48JdGFfteVzVHH2wBRRopQCo9gBcUZpAp5YWzcsOIIDkZgj0109KRWOCjNZ ddTunqCkuuyJOdC7nvRwRckvSO1vTdczO2adEDk3coF5/tQGdNJWLhXMhkIc0tYH345+ RXvQ== X-Gm-Message-State: AN3rC/7KX7wi6QMQBvYTQT+2s6nxEmdPslaaSgQ5cccTZoXP+muRuF4S eW4nvgnu05ecjzWLjkbbsw== X-Received: by 10.28.7.18 with SMTP id 18mr64052wmh.80.1492203243425; Fri, 14 Apr 2017 13:54:03 -0700 (PDT) Received: from mail-wr0-f173.google.com (mail-wr0-f173.google.com. [209.85.128.173]) by smtp.gmail.com with ESMTPSA id y66sm3740141wrb.39.2017.04.14.13.54.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 13:54:03 -0700 (PDT) Received: by mail-wr0-f173.google.com with SMTP id z109so55818787wrb.1; Fri, 14 Apr 2017 13:54:03 -0700 (PDT) X-Received: by 10.223.160.214 with SMTP id n22mr9389993wrn.198.1492203243152; Fri, 14 Apr 2017 13:54:03 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Fri, 14 Apr 2017 13:54:02 -0700 (PDT) In-Reply-To: References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> From: Conrad Meyer Date: Fri, 14 Apr 2017 13:54:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316938 - head/sbin/savecore To: Alan Somers Cc: Mark Johnston , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:54:06 -0000 On Fri, Apr 14, 2017 at 1:41 PM, Alan Somers wrote: > On Fri, Apr 14, 2017 at 2:29 PM, Mark Johnston wrote: >> I've been hesitant about pushing it forward: >> - The dump_write* APIs need some simplification after the addition of >> encrypted dump support and support for dumping to 4Kn drives. >> - I'm not sure how encryption should compose with compression. It seems >> intuitively obvious that we should compress before encrypting if the >> compression is to be of any use, but I don't know enough to know >> whether the compression might somehow compromise the effectiveness of >> the encryption. >> >> If anyone has some insight on the second of these two points, I'd >> appreciate hearing it. > > I think compress then encrypt should be ok. AFAIK all attacks against > compress-then-encrypt systems have involved either incredibly short > payloads that are easy to guess, or a stream of separately compressed > blocks that can be fingerprinted. But core dumps are very long, and > they can't be fingerprinted in whole because they're unique. If you > were to encrypt each page individually then pages could be > fingerprinted, so don't do that. Instead, compress the entire core > dump as a single stream and you should be ok. +1.