From patchwork Thu Jun 18 17:02:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 486440 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1015B140271 for ; Fri, 19 Jun 2015 03:03:44 +1000 (AEST) Received: from localhost ([::1]:54062 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5dE6-0003QB-6f for incoming@patchwork.ozlabs.org; Thu, 18 Jun 2015 13:03:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5dDI-0001s2-5K for qemu-devel@nongnu.org; Thu, 18 Jun 2015 13:02:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5dDB-0003SJ-MI for qemu-devel@nongnu.org; Thu, 18 Jun 2015 13:02:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5dDB-0003SD-GJ for qemu-devel@nongnu.org; Thu, 18 Jun 2015 13:02:45 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 2350E2DC3E4; Thu, 18 Jun 2015 17:02:45 +0000 (UTC) Received: from localhost.localdomain.com (vpn1-5-162.ams2.redhat.com [10.36.5.162]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5IH2ZJv026289; Thu, 18 Jun 2015 13:02:43 -0400 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Thu, 18 Jun 2015 18:02:17 +0100 Message-Id: <1434646944-24040-4-git-send-email-berrange@redhat.com> In-Reply-To: <1434646944-24040-1-git-send-email-berrange@redhat.com> References: <1434646944-24040-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , Gonglei , Gerd Hoffmann , Paolo Bonzini , Richard Henderson Subject: [Qemu-devel] [PATCH v3 03/10] crypto: move built-in D3DES implementation into crypto/ X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org To prepare for a generic internal cipher API, move the built-in D3DES implementation into the crypto/ directory. This is not in fact a normal D3DES implementation, it is D3DES with double & triple length modes removed, and the key bytes in reversed bit order. IOW it is crippled specifically for the "benefit" of RFB, so call the new files desrfb.c instead of d3des.c to make it clear that it isn't a generally useful impl. Signed-off-by: Daniel P. Berrange Reviewed-by: Gonglei --- crypto/Makefile.objs | 1 + ui/d3des.c => crypto/desrfb.c | 2 +- ui/d3des.h => include/crypto/desrfb.h | 0 ui/Makefile.objs | 2 +- ui/vnc.c | 2 +- 5 files changed, 4 insertions(+), 3 deletions(-) rename ui/d3des.c => crypto/desrfb.c (99%) rename ui/d3des.h => include/crypto/desrfb.h (100%) diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs index 9efc9b4..9f70294 100644 --- a/crypto/Makefile.objs +++ b/crypto/Makefile.objs @@ -1,3 +1,4 @@ util-obj-y += init.o util-obj-y += hash.o util-obj-y += aes.o +util-obj-y += desrfb.o diff --git a/ui/d3des.c b/crypto/desrfb.c similarity index 99% rename from ui/d3des.c rename to crypto/desrfb.c index 5bc99b8..fc20a30 100644 --- a/ui/d3des.c +++ b/crypto/desrfb.c @@ -26,7 +26,7 @@ * (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992. */ -#include "d3des.h" +#include "crypto/desrfb.h" static void scrunch(unsigned char *, unsigned long *); static void unscrun(unsigned long *, unsigned char *); diff --git a/ui/d3des.h b/include/crypto/desrfb.h similarity index 100% rename from ui/d3des.h rename to include/crypto/desrfb.h diff --git a/ui/Makefile.objs b/ui/Makefile.objs index 023914c..dd1f8e4 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -1,4 +1,4 @@ -vnc-obj-y += vnc.o d3des.o +vnc-obj-y += vnc.o vnc-obj-y += vnc-enc-zlib.o vnc-enc-hextile.o vnc-obj-y += vnc-enc-tight.o vnc-palette.o vnc-obj-y += vnc-enc-zrle.o diff --git a/ui/vnc.c b/ui/vnc.c index 69b605c..d86f9c2 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -46,7 +46,7 @@ static const struct timeval VNC_REFRESH_STATS = { 0, 500000 }; static const struct timeval VNC_REFRESH_LOSSY = { 2, 0 }; #include "vnc_keysym.h" -#include "d3des.h" +#include "crypto/desrfb.h" static QTAILQ_HEAD(, VncDisplay) vnc_displays = QTAILQ_HEAD_INITIALIZER(vnc_displays);