From owner-freebsd-mips@FreeBSD.ORG Tue Jun 25 23:57:17 2013 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E2B03C58 for ; Tue, 25 Jun 2013 23:57:17 +0000 (UTC) (envelope-from lists@rewt.org.uk) Received: from hosted.mx.as41113.net (hosted.mx.as41113.net [91.208.177.22]) by mx1.freebsd.org (Postfix) with ESMTP id AFE731D10 for ; Tue, 25 Jun 2013 23:57:17 +0000 (UTC) Received: from [172.16.9.23] (bella.stf.rewt.org.uk [91.208.177.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lists@rewt.org.uk) by hosted.mx.as41113.net (Postfix) with ESMTPSA id 3bg46h5VjVz6F; Wed, 26 Jun 2013 00:57:16 +0100 (BST) Message-ID: <51CA2E5C.3010709@rewt.org.uk> Date: Wed, 26 Jun 2013 00:57:16 +0100 From: Joe Holden User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Warner Losh Subject: Re: AES-GCM/Hardware crypto for Octeon References: <51C9BFE6.20701@rewt.org.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-mips@FreeBSD.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2013 23:57:18 -0000 Warner Losh wrote: > On Jun 25, 2013, at 10:05 AM, Joe Holden wrote: > >> Hi, >> >> Is the hardware crypto used by OpenCrypto/OpenSSL on the Octeon Plus range? Other than specifying cryptodev engine, is there a way to make sure that it's being used? >> >> Also, according to the Cavium product brief, the coprocessor supports AES-GCM, I can't work out if it's actually supported in OpenSSL as the patches seem to be geared towards Intel's hardware assisted variant - is this supportable on the current tree, or will it require extra patches/work (perhaps upstream?) > > The Cavium crypto support is done as part of the open crypto framework. OpenSSL uses the open crypto framework to offload crypto calculations. The cavium coprocessor is used inside the open crypto framework in the kernel. It isn't used like intel's AES instructions in userland. > > Looking at the code, it appears we'd support using the Cavium Coprocessor in user space. However, a quick peek at the OpenSSL code in the tree today suggests that the MIPS optimized versions of the various crypto functions don't use the cavium coprocessor. > > I believe Cavium has patches to OpenSSL available on their cnusers.org web site that could be used to update the code in the FreeBSD tree, but I haven't looked closely lately at that stuff since the opencrypto support is plenty fast for my needs. > > Warner > I'll have to look at that, I registered a while ago but haven't perused their code yet. Thanks, Joe