This repository has been archived by the owner on Jan 9, 2021. It is now read-only.
forked from tpruvot/cpuminer-multi
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nicehashdev
committed
Aug 22, 2016
1 parent
a105a75
commit 5a2c6d2
Showing
32 changed files
with
12,839 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
This package contains an implementation of the Groestl-512 hash | ||
function optimized for the Intel AES instructions. | ||
|
||
Authors are Krystian Matusiewicz, Günther A. Roland, Martin Schläffer | ||
|
||
There are no known present or future claims by a copyright holder that | ||
the distribution of this software infringes the copyright. In | ||
particular, the author of the software is not making such claims and | ||
does not intend to make such claims. | ||
|
||
Moreover, there are no known present or future claims by a patent | ||
holder that the use of this software infringes the patent. In | ||
particular, the author of the software is not making such claims and | ||
does not intend to make such claims. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#define CRYPTO_BYTES 64 | ||
#define CRYPTO_VERSION "2.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
/* | ||
--------------------------------------------------------------------------- | ||
Copyright (c) 1998-2008, Brian Gladman, Worcester, UK. All rights reserved. | ||
LICENSE TERMS | ||
The redistribution and use of this software (with or without changes) | ||
is allowed without the payment of fees or royalties provided that: | ||
1. source code distributions include the above copyright notice, this | ||
list of conditions and the following disclaimer; | ||
2. binary distributions include the above copyright notice, this list | ||
of conditions and the following disclaimer in their documentation; | ||
3. the name of the copyright holder is not used to endorse products | ||
built using this software without specific written permission. | ||
DISCLAIMER | ||
This software is provided 'as is' with no explicit or implied warranties | ||
in respect of its properties, including, but not limited to, correctness | ||
and/or fitness for purpose. | ||
--------------------------------------------------------------------------- | ||
Issue Date: 20/12/2007 | ||
*/ | ||
|
||
#ifndef _BRG_ENDIAN_H | ||
#define _BRG_ENDIAN_H | ||
|
||
#define IS_BIG_ENDIAN 4321 /* byte 0 is most significant (mc68k) */ | ||
#define IS_LITTLE_ENDIAN 1234 /* byte 0 is least significant (i386) */ | ||
|
||
/* Include files where endian defines and byteswap functions may reside */ | ||
#if defined( __sun ) | ||
# include <sys/isa_defs.h> | ||
#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ ) | ||
# include <sys/endian.h> | ||
#elif defined( BSD ) && ( BSD >= 199103 ) || defined( __APPLE__ ) || \ | ||
defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ ) | ||
# include <machine/endian.h> | ||
#elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) | ||
# if !defined( __MINGW32__ ) && !defined( _AIX ) | ||
# include <endian.h> | ||
# if !defined( __BEOS__ ) | ||
# include <byteswap.h> | ||
# endif | ||
# endif | ||
#endif | ||
|
||
/* Now attempt to set the define for platform byte order using any */ | ||
/* of the four forms SYMBOL, _SYMBOL, __SYMBOL & __SYMBOL__, which */ | ||
/* seem to encompass most endian symbol definitions */ | ||
|
||
#if defined( BIG_ENDIAN ) && defined( LITTLE_ENDIAN ) | ||
# if defined( BYTE_ORDER ) && BYTE_ORDER == BIG_ENDIAN | ||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
# elif defined( BYTE_ORDER ) && BYTE_ORDER == LITTLE_ENDIAN | ||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN | ||
# endif | ||
#elif defined( BIG_ENDIAN ) | ||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
#elif defined( LITTLE_ENDIAN ) | ||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN | ||
#endif | ||
|
||
#if defined( _BIG_ENDIAN ) && defined( _LITTLE_ENDIAN ) | ||
# if defined( _BYTE_ORDER ) && _BYTE_ORDER == _BIG_ENDIAN | ||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
# elif defined( _BYTE_ORDER ) && _BYTE_ORDER == _LITTLE_ENDIAN | ||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN | ||
# endif | ||
#elif defined( _BIG_ENDIAN ) | ||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
#elif defined( _LITTLE_ENDIAN ) | ||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN | ||
#endif | ||
|
||
#if defined( __BIG_ENDIAN ) && defined( __LITTLE_ENDIAN ) | ||
# if defined( __BYTE_ORDER ) && __BYTE_ORDER == __BIG_ENDIAN | ||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
# elif defined( __BYTE_ORDER ) && __BYTE_ORDER == __LITTLE_ENDIAN | ||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN | ||
# endif | ||
#elif defined( __BIG_ENDIAN ) | ||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
#elif defined( __LITTLE_ENDIAN ) | ||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN | ||
#endif | ||
|
||
#if defined( __BIG_ENDIAN__ ) && defined( __LITTLE_ENDIAN__ ) | ||
# if defined( __BYTE_ORDER__ ) && __BYTE_ORDER__ == __BIG_ENDIAN__ | ||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
# elif defined( __BYTE_ORDER__ ) && __BYTE_ORDER__ == __LITTLE_ENDIAN__ | ||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN | ||
# endif | ||
#elif defined( __BIG_ENDIAN__ ) | ||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
#elif defined( __LITTLE_ENDIAN__ ) | ||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN | ||
#endif | ||
|
||
/* if the platform byte order could not be determined, then try to */ | ||
/* set this define using common machine defines */ | ||
#if !defined(PLATFORM_BYTE_ORDER) | ||
|
||
#if defined( __alpha__ ) || defined( __alpha ) || defined( i386 ) || \ | ||
defined( __i386__ ) || defined( _M_I86 ) || defined( _M_IX86 ) || \ | ||
defined( __OS2__ ) || defined( sun386 ) || defined( __TURBOC__ ) || \ | ||
defined( vax ) || defined( vms ) || defined( VMS ) || \ | ||
defined( __VMS ) || defined( _M_X64 ) | ||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN | ||
|
||
#elif defined( AMIGA ) || defined( applec ) || defined( __AS400__ ) || \ | ||
defined( _CRAY ) || defined( __hppa ) || defined( __hp9000 ) || \ | ||
defined( ibm370 ) || defined( mc68000 ) || defined( m68k ) || \ | ||
defined( __MRC__ ) || defined( __MVS__ ) || defined( __MWERKS__ ) || \ | ||
defined( sparc ) || defined( __sparc) || defined( SYMANTEC_C ) || \ | ||
defined( __VOS__ ) || defined( __TIGCC__ ) || defined( __TANDEM ) || \ | ||
defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX ) | ||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
|
||
#elif 0 /* **** EDIT HERE IF NECESSARY **** */ | ||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN | ||
#elif 0 /* **** EDIT HERE IF NECESSARY **** */ | ||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
#else | ||
# error Please edit lines 126 or 128 in brg_endian.h to set the platform byte order | ||
#endif | ||
|
||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
/* | ||
--------------------------------------------------------------------------- | ||
Copyright (c) 1998-2008, Brian Gladman, Worcester, UK. All rights reserved. | ||
(a few lines added by Soeren S. Thomsen, October 2008) | ||
LICENSE TERMS | ||
The redistribution and use of this software (with or without changes) | ||
is allowed without the payment of fees or royalties provided that: | ||
1. source code distributions include the above copyright notice, this | ||
list of conditions and the following disclaimer; | ||
2. binary distributions include the above copyright notice, this list | ||
of conditions and the following disclaimer in their documentation; | ||
3. the name of the copyright holder is not used to endorse products | ||
built using this software without specific written permission. | ||
DISCLAIMER | ||
This software is provided 'as is' with no explicit or implied warranties | ||
in respect of its properties, including, but not limited to, correctness | ||
and/or fitness for purpose. | ||
--------------------------------------------------------------------------- | ||
Issue Date: 20/12/2007 | ||
The unsigned integer types defined here are of the form uint_<nn>t where | ||
<nn> is the length of the type; for example, the unsigned 32-bit type is | ||
'uint_32t'. These are NOT the same as the 'C99 integer types' that are | ||
defined in the inttypes.h and stdint.h headers since attempts to use these | ||
types have shown that support for them is still highly variable. However, | ||
since the latter are of the form uint<nn>_t, a regular expression search | ||
and replace (in VC++ search on 'uint_{:z}t' and replace with 'uint\1_t') | ||
can be used to convert the types used here to the C99 standard types. | ||
*/ | ||
|
||
#ifndef _BRG_TYPES_H | ||
#define _BRG_TYPES_H | ||
|
||
#if defined(__cplusplus) | ||
extern "C" { | ||
#endif | ||
|
||
#include <limits.h> | ||
|
||
#if defined( _MSC_VER ) && ( _MSC_VER >= 1300 ) | ||
# include <stddef.h> | ||
# define ptrint_t intptr_t | ||
#elif defined( __GNUC__ ) && ( __GNUC__ >= 3 ) | ||
# include <stdint.h> | ||
# define ptrint_t intptr_t | ||
#else | ||
# define ptrint_t int | ||
#endif | ||
|
||
#ifndef BRG_UI8 | ||
# define BRG_UI8 | ||
# if UCHAR_MAX == 255u | ||
typedef unsigned char uint_8t; | ||
# else | ||
# error Please define uint_8t as an 8-bit unsigned integer type in brg_types.h | ||
# endif | ||
#endif | ||
|
||
#ifndef BRG_UI16 | ||
# define BRG_UI16 | ||
# if USHRT_MAX == 65535u | ||
typedef unsigned short uint_16t; | ||
# else | ||
# error Please define uint_16t as a 16-bit unsigned short type in brg_types.h | ||
# endif | ||
#endif | ||
|
||
#ifndef BRG_UI32 | ||
# define BRG_UI32 | ||
# if UINT_MAX == 4294967295u | ||
# define li_32(h) 0x##h##u | ||
typedef unsigned int uint_32t; | ||
# elif ULONG_MAX == 4294967295u | ||
# define li_32(h) 0x##h##ul | ||
typedef unsigned long uint_32t; | ||
# elif defined( _CRAY ) | ||
# error This code needs 32-bit data types, which Cray machines do not provide | ||
# else | ||
# error Please define uint_32t as a 32-bit unsigned integer type in brg_types.h | ||
# endif | ||
#endif | ||
|
||
#ifndef BRG_UI64 | ||
# if defined( __BORLANDC__ ) && !defined( __MSDOS__ ) | ||
# define BRG_UI64 | ||
# define li_64(h) 0x##h##ui64 | ||
typedef unsigned __int64 uint_64t; | ||
# elif defined( _MSC_VER ) && ( _MSC_VER < 1300 ) /* 1300 == VC++ 7.0 */ | ||
# define BRG_UI64 | ||
# define li_64(h) 0x##h##ui64 | ||
typedef unsigned __int64 uint_64t; | ||
# elif defined( __sun ) && defined( ULONG_MAX ) && ULONG_MAX == 0xfffffffful | ||
# define BRG_UI64 | ||
# define li_64(h) 0x##h##ull | ||
typedef unsigned long long uint_64t; | ||
# elif defined( __MVS__ ) | ||
# define BRG_UI64 | ||
# define li_64(h) 0x##h##ull | ||
typedef unsigned int long long uint_64t; | ||
# elif defined( UINT_MAX ) && UINT_MAX > 4294967295u | ||
# if UINT_MAX == 18446744073709551615u | ||
# define BRG_UI64 | ||
# define li_64(h) 0x##h##u | ||
typedef unsigned int uint_64t; | ||
# endif | ||
# elif defined( ULONG_MAX ) && ULONG_MAX > 4294967295u | ||
# if ULONG_MAX == 18446744073709551615ul | ||
# define BRG_UI64 | ||
# define li_64(h) 0x##h##ul | ||
typedef unsigned long uint_64t; | ||
# endif | ||
# elif defined( ULLONG_MAX ) && ULLONG_MAX > 4294967295u | ||
# if ULLONG_MAX == 18446744073709551615ull | ||
# define BRG_UI64 | ||
# define li_64(h) 0x##h##ull | ||
typedef unsigned long long uint_64t; | ||
# endif | ||
# elif defined( ULONG_LONG_MAX ) && ULONG_LONG_MAX > 4294967295u | ||
# if ULONG_LONG_MAX == 18446744073709551615ull | ||
# define BRG_UI64 | ||
# define li_64(h) 0x##h##ull | ||
typedef unsigned long long uint_64t; | ||
# endif | ||
# endif | ||
#endif | ||
|
||
#if !defined( BRG_UI64 ) | ||
# if defined( NEED_UINT_64T ) | ||
# define BRG_UI64 | ||
# define li_64(h) 0x##h##ull | ||
typedef unsigned long long uint_64t; | ||
/*# error Please define uint_64t as an unsigned 64 bit type in brg_types.h*/ | ||
# endif | ||
#endif | ||
|
||
#ifndef RETURN_VALUES | ||
# define RETURN_VALUES | ||
# if defined( DLL_EXPORT ) | ||
# if defined( _MSC_VER ) || defined ( __INTEL_COMPILER ) | ||
# define VOID_RETURN __declspec( dllexport ) void __stdcall | ||
# define INT_RETURN __declspec( dllexport ) int __stdcall | ||
# elif defined( __GNUC__ ) | ||
# define VOID_RETURN __declspec( __dllexport__ ) void | ||
# define INT_RETURN __declspec( __dllexport__ ) int | ||
# else | ||
# error Use of the DLL is only available on the Microsoft, Intel and GCC compilers | ||
# endif | ||
# elif defined( DLL_IMPORT ) | ||
# if defined( _MSC_VER ) || defined ( __INTEL_COMPILER ) | ||
# define VOID_RETURN __declspec( dllimport ) void __stdcall | ||
# define INT_RETURN __declspec( dllimport ) int __stdcall | ||
# elif defined( __GNUC__ ) | ||
# define VOID_RETURN __declspec( __dllimport__ ) void | ||
# define INT_RETURN __declspec( __dllimport__ ) int | ||
# else | ||
# error Use of the DLL is only available on the Microsoft, Intel and GCC compilers | ||
# endif | ||
# elif defined( __WATCOMC__ ) | ||
# define VOID_RETURN void __cdecl | ||
# define INT_RETURN int __cdecl | ||
# else | ||
# define VOID_RETURN void | ||
# define INT_RETURN int | ||
# endif | ||
#endif | ||
|
||
/* These defines are used to detect and set the memory alignment of pointers. | ||
Note that offsets are in bytes. | ||
ALIGN_OFFSET(x,n) return the positive or zero offset of | ||
the memory addressed by the pointer 'x' | ||
from an address that is aligned on an | ||
'n' byte boundary ('n' is a power of 2) | ||
ALIGN_FLOOR(x,n) return a pointer that points to memory | ||
that is aligned on an 'n' byte boundary | ||
and is not higher than the memory address | ||
pointed to by 'x' ('n' is a power of 2) | ||
ALIGN_CEIL(x,n) return a pointer that points to memory | ||
that is aligned on an 'n' byte boundary | ||
and is not lower than the memory address | ||
pointed to by 'x' ('n' is a power of 2) | ||
*/ | ||
|
||
#define ALIGN_OFFSET(x,n) (((ptrint_t)(x)) & ((n) - 1)) | ||
#define ALIGN_FLOOR(x,n) ((uint_8t*)(x) - ( ((ptrint_t)(x)) & ((n) - 1))) | ||
#define ALIGN_CEIL(x,n) ((uint_8t*)(x) + (-((ptrint_t)(x)) & ((n) - 1))) | ||
|
||
/* These defines are used to declare buffers in a way that allows | ||
faster operations on longer variables to be used. In all these | ||
defines 'size' must be a power of 2 and >= 8. NOTE that the | ||
buffer size is in bytes but the type length is in bits | ||
UNIT_TYPEDEF(x,size) declares a variable 'x' of length | ||
'size' bits | ||
BUFR_TYPEDEF(x,size,bsize) declares a buffer 'x' of length 'bsize' | ||
bytes defined as an array of variables | ||
each of 'size' bits (bsize must be a | ||
multiple of size / 8) | ||
UNIT_CAST(x,size) casts a variable to a type of | ||
length 'size' bits | ||
UPTR_CAST(x,size) casts a pointer to a pointer to a | ||
varaiable of length 'size' bits | ||
*/ | ||
|
||
#define UI_TYPE(size) uint_##size##t | ||
#define UNIT_TYPEDEF(x,size) typedef UI_TYPE(size) x | ||
#define BUFR_TYPEDEF(x,size,bsize) typedef UI_TYPE(size) x[bsize / (size >> 3)] | ||
#define UNIT_CAST(x,size) ((UI_TYPE(size) )(x)) | ||
#define UPTR_CAST(x,size) ((UI_TYPE(size)*)(x)) | ||
|
||
/* Added by Soeren S. Thomsen (begin) */ | ||
#define u8 uint_8t | ||
#define u32 uint_32t | ||
#define u64 uint_64t | ||
/* (end) */ | ||
|
||
#if defined(__cplusplus) | ||
} | ||
#endif | ||
|
||
#endif |
Oops, something went wrong.