Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2c7426b authored by Jason Cooper's avatar Jason Cooper Committed by Greg Kroah-Hartman
Browse files

staging: crypto: skein: allow building statically



These are the minimum changes required to get the code to build
statically in the kernel.  It's necessary to do this first so that we
can empirically determine that future cleanup patches aren't changing
the generated object code.

Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 449bb812
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -146,6 +146,8 @@ source "drivers/staging/gs_fpgaboot/Kconfig"

source "drivers/staging/nokia_h4p/Kconfig"

source "drivers/staging/skein/Kconfig"

source "drivers/staging/unisys/Kconfig"

endif # STAGING
+1 −0
Original line number Diff line number Diff line
@@ -65,4 +65,5 @@ obj-$(CONFIG_DGAP) += dgap/
obj-$(CONFIG_MTD_SPINAND_MT29F)	+= mt29f_spinand/
obj-$(CONFIG_GS_FPGABOOT)	+= gs_fpgaboot/
obj-$(CONFIG_BT_NOKIA_H4P)	+= nokia_h4p/
obj-$(CONFIG_CRYPTO_SKEIN)	+= skein/
obj-$(CONFIG_UNISYSSPAR)	+= unisys/
+0 −27
Original line number Diff line number Diff line
cmake_minimum_required (VERSION 2.6)

include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include)

# set(skeinBlock_src skein_block.c)
set(skeinBlock_src skeinBlockNo3F.c)

set(skein_src 
    ${skeinBlock_src}
    skein.c
    skeinApi.c
    )

set(threefish_src
    threefishApi.c
    threefish256Block.c
    threefish512Block.c
    threefish1024Block.c
    )
set(s3f_src ${skein_src} ${threefish_src})

add_library(skein3fish SHARED ${s3f_src})
set_target_properties(skein3fish PROPERTIES VERSION ${VERSION} SOVERSION ${SOVERSION})
target_link_libraries(skein3fish ${LIBS})

install(TARGETS skein3fish DESTINATION ${LIBDIRNAME})
+32 −0
Original line number Diff line number Diff line
config CRYPTO_SKEIN
	bool "Skein digest algorithm"
	depends on (X86 || UML_X86) && 64BIT
	select CRYPTO_THREEFISH
	select CRYPTO_HASH
	help
	  Skein secure hash algorithm is one of 5 finalists from the NIST SHA3
	  competition.

	  Skein is optimized for modern, 64bit processors and is highly
	  customizable.  See:

	  http://www.skein-hash.info/sites/default/files/skein1.3.pdf

	  for more information.  This module depends on the threefish block
	  cipher module.

config CRYPTO_THREEFISH
	bool "Threefish tweakable block cipher"
	depends on (X86 || UML_X86) && 64BIT
	select CRYPTO_ALGAPI
	help
	  Threefish cipher algorithm is the tweakable block cipher underneath
	  the Skein family of secure hash algorithms.  Skein is one of 5
	  finalists from the NIST SHA3 competition.

	  Skein is optimized for modern, 64bit processors and is highly
	  customizable.  See:

	  http://www.skein-hash.info/sites/default/files/skein1.3.pdf

	  for more information.
+13 −0
Original line number Diff line number Diff line
#
# Makefile for the skein secure hash algorithm
#
subdir-ccflags-y := -I$(src)/include/

obj-$(CONFIG_CRYPTO_SKEIN) +=   skein.o \
				skeinApi.o \
				skein_block.o

obj-$(CONFIG_CRYPTO_THREEFISH) += threefish1024Block.o \
				  threefish256Block.o \
				  threefish512Block.o \
				  threefishApi.o
Loading