Skip to content

Commit

Permalink
Expose shake128_absorb/squeeze functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mamonet committed Dec 14, 2023
1 parent 5b7b85e commit 34a6736
Show file tree
Hide file tree
Showing 6 changed files with 1,912 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/Hacl_Hash_SHA3_Scalar.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ void Hacl_Hash_SHA3_Scalar_sha3_384(uint8_t *output, uint8_t *input, uint32_t in

void Hacl_Hash_SHA3_Scalar_sha3_512(uint8_t *output, uint8_t *input, uint32_t inputByteLen);

uint64_t *Hacl_Hash_SHA3_Scalar_state_malloc(void);

void Hacl_Hash_SHA3_Scalar_state_free(uint64_t *s);

void
Hacl_Hash_SHA3_Scalar_shake128_absorb(uint64_t *state, uint8_t *input, uint32_t inputByteLen);

void
Hacl_Hash_SHA3_Scalar_shake128_squeeze_nblocks(
uint64_t *state,
uint8_t *output,
uint32_t outputByteLen
);

#if defined(__cplusplus)
}
#endif
Expand Down
24 changes: 24 additions & 0 deletions include/Hacl_Hash_SHA3_Simd256.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,30 @@ Hacl_Hash_SHA3_Simd256_sha3_512(
uint32_t inputByteLen
);

uint64_t *Hacl_Hash_SHA3_Simd256_state_malloc(void);

void Hacl_Hash_SHA3_Simd256_state_free(uint64_t *s);

void
Hacl_Hash_SHA3_Simd256_shake128_absorb(
Lib_IntVector_Intrinsics_vec256 *state,
uint8_t *input0,
uint8_t *input1,
uint8_t *input2,
uint8_t *input3,
uint32_t inputByteLen
);

void
Hacl_Hash_SHA3_Simd256_shake128_squeeze_nblocks(
Lib_IntVector_Intrinsics_vec256 *state,
uint8_t *output0,
uint8_t *output1,
uint8_t *output2,
uint8_t *output3,
uint32_t outputByteLen
);

#if defined(__cplusplus)
}
#endif
Expand Down
14 changes: 14 additions & 0 deletions include/msvc/Hacl_Hash_SHA3_Scalar.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ void Hacl_Hash_SHA3_Scalar_sha3_384(uint8_t *output, uint8_t *input, uint32_t in

void Hacl_Hash_SHA3_Scalar_sha3_512(uint8_t *output, uint8_t *input, uint32_t inputByteLen);

uint64_t *Hacl_Hash_SHA3_Scalar_state_malloc(void);

void Hacl_Hash_SHA3_Scalar_state_free(uint64_t *s);

void
Hacl_Hash_SHA3_Scalar_shake128_absorb(uint64_t *state, uint8_t *input, uint32_t inputByteLen);

void
Hacl_Hash_SHA3_Scalar_shake128_squeeze_nblocks(
uint64_t *state,
uint8_t *output,
uint32_t outputByteLen
);

#if defined(__cplusplus)
}
#endif
Expand Down
24 changes: 24 additions & 0 deletions include/msvc/Hacl_Hash_SHA3_Simd256.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,30 @@ Hacl_Hash_SHA3_Simd256_sha3_512(
uint32_t inputByteLen
);

uint64_t *Hacl_Hash_SHA3_Simd256_state_malloc(void);

void Hacl_Hash_SHA3_Simd256_state_free(uint64_t *s);

void
Hacl_Hash_SHA3_Simd256_shake128_absorb(
Lib_IntVector_Intrinsics_vec256 *state,
uint8_t *input0,
uint8_t *input1,
uint8_t *input2,
uint8_t *input3,
uint32_t inputByteLen
);

void
Hacl_Hash_SHA3_Simd256_shake128_squeeze_nblocks(
Lib_IntVector_Intrinsics_vec256 *state,
uint8_t *output0,
uint8_t *output1,
uint8_t *output2,
uint8_t *output3,
uint32_t outputByteLen
);

#if defined(__cplusplus)
}
#endif
Expand Down
Loading

0 comments on commit 34a6736

Please sign in to comment.