6 Commits

Author SHA1 Message Date
Pol Henarejos
938b5abb13
Fix when reusing the same context for another operation.
Occurs in hmac, where multiple hashes are performed with the same context) and thus, it requires to reinitialize the internal states to 0.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-20 20:07:40 +02:00
Pol Henarejos
1f3ae1639d
olen parameter shall contain the length of the buffer.
For SHA-3 families, it must be at least 28, 32, 48 or 64, depending on the family.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-20 20:07:40 +02:00
Pol Henarejos
116411e1a9
Fix when no SHA3 family is found.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-20 20:07:39 +02:00
Pol Henarejos
85eeda0122
olen = 0 is not allowed for SHA-3.
Sanity checks are moved to mbedtls_sha3_xxx() functions.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-20 20:07:39 +02:00
Pol Henarejos
084649d189
SHA-3 does not use SHA3_ALT anymore.
Next releases will not use alt files.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-20 20:07:39 +02:00
Pol Henarejos
0cd1f1c77f
Add SHA-3 module.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-09 01:04:15 +02:00