This commit is contained in:
Jay D Dee
2023-10-06 22:18:09 -04:00
parent bc5a5c6df8
commit 31c4dedf59
144 changed files with 5931 additions and 3746 deletions

View File

@@ -21,8 +21,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <emmintrin.h>
#include "compat/sha3-defs.h"
//#include <emmintrin.h>
//#include "compat/sha3-defs.h"
/* The length of digests*/
#define DIGEST_BIT_LEN_224 224
#define DIGEST_BIT_LEN_256 256
@@ -49,23 +49,23 @@
/*********************************/
typedef struct {
uint32 buffer[8] __attribute((aligned(32)));
__m128i chainv[10] __attribute((aligned(32))); /* Chaining values */
uint32_t buffer[8] __attribute((aligned(32)));
v128_t chainv[10] __attribute((aligned(32))); /* Chaining values */
int hashbitlen;
int rembytes;
} hashState_luffa;
HashReturn init_luffa( hashState_luffa *state, int hashbitlen );
int init_luffa( hashState_luffa *state, int hashbitlen );
// len is in bytes
HashReturn update_luffa( hashState_luffa *state, const BitSequence *data,
int update_luffa( hashState_luffa *state, const void *data,
size_t len );
HashReturn final_luffa( hashState_luffa *state, BitSequence *hashval );
int final_luffa( hashState_luffa *state, void *hashval );
HashReturn update_and_final_luffa( hashState_luffa *state, BitSequence* output,
const BitSequence* data, size_t inlen );
int update_and_final_luffa( hashState_luffa *state, void* output,
const void* data, size_t inlen );
int luffa_full( hashState_luffa *state, BitSequence* output, int hashbitlen,
const BitSequence* data, size_t inlen );
int luffa_full( hashState_luffa *state, void* output, int hashbitlen,
const void* data, size_t inlen );
#endif // LUFFA_FOR_SSE2_H___