#include "xf_security/blake2b.hpp"
void blake2b ( hls::stream <ap_uint <64>>& msg_strm, hls::stream <ap_uint <128>>& msg_len_strm, hls::stream <ap_uint <512>>& key_strm, hls::stream <ap_uint <8>>& key_len_strm, hls::stream <ap_uint <8>>& out_len_strm, hls::stream <bool>& end_len_strm, hls::stream <ap_uint <8*64>>& digest_strm, hls::stream <bool>& end_digest_strm )
Top function of BLAKE2B.
The algorithm reference is : “The BLAKE2 Cryptographic Hash and Message Authentication Code (MAC)”. The implementation dataflows the sub-modules.
Parameters:
msg_strm | The message being hashed. |
msg_len_strm | Message length in byte (0 <= msg_len <= 2^128). |
key_strm | The optional key. |
key_len_strm | Key length in byte (0 <= key_len <= 64). |
out_len_strm | Result hash value length in byte (0 < out_len < 64). |
end_len_strm | The flag to signal end of input message stream. |
digest_strm | The digest (hash value) stream. |
end_digest_strm | Flag to signal the end of the result. |