#include "xf_security/poly1305.hpp"
void poly1305 ( hls::stream <ap_uint <256>>& keyStrm, hls::stream <ap_uint <128>>& payloadStrm, hls::stream <ap_uint <64>>& lenPldStrm, hls::stream <bool>& endLenStrm, hls::stream <ap_uint <128>>& tagStrm )
The poly1305 takes a 32-byte one-time key and a message and produces a 16-byte tag. This tag is used to authenticate the message.
Parameters:
keyStrm | Corresponding message key |
payloadStrm | For a massage, input block stream text, 128 bits per block, less than 128 bits, high padding 0 |
lenPldStrm | Length of a massage in byte. |
endLenStrm | Flag to signal the end of the length streams. |
tagStrm | Return a 16-byte tag to to authenticate the message. |