From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvOAF-0000ef-Me for qemu-devel@nongnu.org; Thu, 21 May 2015 06:57:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvOAB-0007Vr-MG for qemu-devel@nongnu.org; Thu, 21 May 2015 06:57:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvOAB-0007Vh-HK for qemu-devel@nongnu.org; Thu, 21 May 2015 06:57:19 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 13E478E718 for ; Thu, 21 May 2015 10:57:19 +0000 (UTC) From: "Daniel P. Berrange" Date: Thu, 21 May 2015 11:56:50 +0100 Message-Id: <1432205817-16414-4-git-send-email-berrange@redhat.com> In-Reply-To: <1432205817-16414-1-git-send-email-berrange@redhat.com> References: <1432205817-16414-1-git-send-email-berrange@redhat.com> Subject: [Qemu-devel] [PATCH 03/10] crypto: move built-in D3DES implementation into crypto/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Gerd Hoffmann 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 --- 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 029a42a..d9796b1 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 1013ea5..2b80160 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); -- 2.1.0