Re: [kitten] New EncTypes?

Rick van Rein <rick@openfortress.nl> Sun, 22 November 2015 20:18 UTC

Return-Path: <rick@openfortress.nl>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EE7991B345E for <kitten@ietfa.amsl.com>; Sun, 22 Nov 2015 12:18:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.099
X-Spam-Level:
X-Spam-Status: No, score=0.099 tagged_above=-999 required=5 tests=[BAYES_50=0.8, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
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 7XMrBhLtGQ4g for <kitten@ietfa.amsl.com>; Sun, 22 Nov 2015 12:18:05 -0800 (PST)
Received: from lb2-smtp-cloud6.xs4all.net (lb2-smtp-cloud6.xs4all.net [194.109.24.28]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A23431B345D for <kitten@ietf.org>; Sun, 22 Nov 2015 12:18:04 -0800 (PST)
Received: from airhead.local ([83.161.146.46]) by smtp-cloud6.xs4all.net with ESMTP id kkJ01r00610HQrX01kJ1u1; Sun, 22 Nov 2015 21:18:02 +0100
Message-ID: <565222F6.6000103@openfortress.nl>
Date: Sun, 22 Nov 2015 21:17:58 +0100
From: Rick van Rein <rick@openfortress.nl>
User-Agent: Postbox 3.0.11 (Macintosh/20140602)
MIME-Version: 1.0
To: Benjamin Kaduk <kaduk@MIT.EDU>
References: <FEF7E228-3AF4-4D12-B4B0-CFB935B5ABB5@oxy.edu> <564D7A8A.2070208@openfortress.nl> <alpine.GSO.1.10.1511200059500.26829@multics.mit.edu>
In-Reply-To: <alpine.GSO.1.10.1511200059500.26829@multics.mit.edu>
X-Enigmail-Version: 1.2.3
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/b2ETIA3HuJwOQ1SJHqXncNEyohc>
Cc: "kitten@ietf.org <kitten@ietf.org>" <kitten@ietf.org>
Subject: Re: [kitten] New EncTypes?
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/kitten/>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Nov 2015 20:18:07 -0000

Hello Benjamin,

>> For instance, AES-CTS-HMAC [...] ought to be possible to
>> implement with PKCS #11 (not that I've already actually tried, but it
>> looks possible).
>
> The argument would be more compelling if there was some prior art for it,
> though -- I don't know of any hardware devices implementing such a scheme
> at present.
I made a working demonstration that generates the test vectors for
AES128-CTS based on PKCS #11 stored AES key,
https://github.com/arpa2/kerberos-pkcs11

The demo comes to the boring conclusion that a diff between what it
generates and what was stripped from the RFC is empty:

shell> make
gcc -ggdb3 -DDEBUG -I
/usr/local/src/SoftHSMv2-with-OpenPGP/src/lib/cryptoki_compat/ 
-Wl,-rpath=/usr/local/src/SoftHSMv2-with-OpenPGP/src/lib/.libs
/usr/local/src/SoftHSMv2-with-OpenPGP/src/lib/.libs/libsofthsm.so  -o
aes128-cts-pkcs11 aes128-cts-pkcs11.c
./aes128-cts-pkcs11 > output.txt
Token PIN: sekreet
diff -u testvectors.txt output.txt
shell>

I ran this against SoftHSMv2 from the OpenDNSSEC project, but there is
no reason why it would not work on hardware tokens that implement the
same API; it only relies on CKK_AES and CKM_AES_CBC, which are not
special at all.

Enjoy,
 -Rick