Re: [DNSOP] Specification of DNSKEY "Private-key-format"

Mukund Sivaraman <muks@mukund.org> Mon, 18 November 2019 10:31 UTC

Return-Path: <muks@mukund.org>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 96899120851 for <dnsop@ietfa.amsl.com>; Mon, 18 Nov 2019 02:31:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=mukund.org
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 61chwTlU2-8t for <dnsop@ietfa.amsl.com>; Mon, 18 Nov 2019 02:31:06 -0800 (PST)
Received: from mail.akira.org (mail.akira.org [88.198.135.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8A74C1200DF for <dnsop@ietf.org>; Mon, 18 Nov 2019 02:31:06 -0800 (PST)
Received: from jurassic.lan.banu.com (unknown [27.5.147.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.akira.org (Postfix) with ESMTPSA id B6104790013A; Mon, 18 Nov 2019 10:31:03 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mukund.org; s=mail; t=1574073064; bh=+1AQs0VnuTE789+5AfqHilj0F+HMTOryS1rA7D8AEHY=; h=Date:From:To:Subject:References:In-Reply-To:From; b=ImQPbH+kGb38A7F7tq/htGmQ/FvUmrZXWZPfkr0sUXtiUccZOTfjdtkcuqV67eSbW aNF7hJ09DNl2sfwHiMBVf0UWJA+qALXq9cfAKnQswDW+T7m3hBigtFrvwfdv2HoF8q 9OJQBia9KpDRqT7ZwmwqWJ4BA/H7pcz9uc9RTPCI=
Date: Mon, 18 Nov 2019 16:01:00 +0530
From: Mukund Sivaraman <muks@mukund.org>
To: dnsop@ietf.org
Message-ID: <20191118103100.GB7494@jurassic.lan.banu.com>
References: <20190829125502.GA2048@jurassic.lan.banu.com> <20190829134831.GC90696@straasha.imrryr.org> <20190829135554.GA3616@jurassic.lan.banu.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20190829135554.GA3616@jurassic.lan.banu.com>
User-Agent: Mutt/1.12.1 (2019-06-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/cyczTFOY9-07fNubJSrA2nIDe-U>
Subject: Re: [DNSOP] Specification of DNSKEY "Private-key-format"
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Nov 2019 10:31:09 -0000

Hi Victor

On Thu, Aug 29, 2019 at 07:25:54PM +0530, Mukund Sivaraman wrote:
> Hi Viktor
> 
> On Thu, Aug 29, 2019 at 09:48:31AM -0400, Viktor Dukhovni wrote:
> > On Thu, Aug 29, 2019 at 06:25:02PM +0530, Mukund Sivaraman wrote:
> > > A tool such as BIND's dnssec-keygen generates the following formatted
> > > private keys:
> > > 
> > > [muks@naina ~]$ cat Kexample.org.+008+10638.private
> > > Private-key-format: v1.3
> > > Algorithm: 8 (RSASHA256)
> > > Modulus: [...]
> > > PublicExponent: [...]
> > > PrivateExponent: [...]
> > > Prime1: [...]
> > > Prime2: [...]
> > > Exponent1: [...]
> > > Exponent2: [...]
> > > Coefficient: [...]
> > 
> > Compare the above with:
> > 
> >     $ openssl genrsa 512 2>/dev/null | openssl rsa -text -noout | egrep -v ':..:'
> >     RSA Private-Key: (512 bit, 2 primes)
> >     modulus:
> >     publicExponent: 65537 (0x10001)
> >     privateExponent:
> >     prime1:
> >     prime2:
> >     exponent1:
> >     exponent2:
> >     coefficient:
> > 
> > And it becomes clear that what you're seeing is a sequence of tagged
> > base64 encodings of the BIGNUM elements of the CRT form of an RSA
> > private key.
> 
> I am initimately familiar with what these fields mean and the code that
> generates it. The question is not about what the meaning of these fields
> are.
> 
> I am asking about where this key format is specified - I want to extend
> it.

I apologize for the way I replied to your email. My response was
arrogantly written. You only tried to help me.

(I realized it soon after sending the email and it has bugged me since.)

		Mukund