From patchwork Tue Jul 7 14:12:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 492310 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 0922B1402BA for ; Wed, 8 Jul 2015 00:36:45 +1000 (AEST) Received: from localhost ([::1]:58603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCTzH-0001KQ-I6 for incoming@patchwork.ozlabs.org; Tue, 07 Jul 2015 10:36:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCTcK-0007gn-P5 for qemu-devel@nongnu.org; Tue, 07 Jul 2015 10:13:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCTcI-0004OB-6t for qemu-devel@nongnu.org; Tue, 07 Jul 2015 10:13:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCTcI-0004Nz-1O for qemu-devel@nongnu.org; Tue, 07 Jul 2015 10:12:58 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id C119196DE for ; Tue, 7 Jul 2015 14:12:57 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-27.ams2.redhat.com [10.36.112.27]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t67ECmAe021123; Tue, 7 Jul 2015 10:12:56 -0400 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 7 Jul 2015 16:12:40 +0200 Message-Id: <1436278368-13449-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1436278368-13449-1-git-send-email-pbonzini@redhat.com> References: <1436278368-13449-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 04/12] 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 From: "Daniel P. Berrange" 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 Message-Id: <1435770638-25715-4-git-send-email-berrange@redhat.com> Signed-off-by: Paolo Bonzini --- 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 2ffd9e5..b216182 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -48,7 +48,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);