#include "xf_security/chacha20.hpp"
void xchacha20 ( hls::stream <ap_uint <256>>& keyStrm, hls::stream <ap_uint <192>>& nonceStrm, hls::stream <ap_uint <512>>& plainStrm, hls::stream <bool>& ePlainStrm, hls::stream <ap_uint <512>>& cipherStrm, hls::stream <bool>& eCipherStrm )
xchahcha20 is variant of original chacha20 to support longer nonce of 192bits.
Parameters:
keyStrm | initail key |
nonceStm | initial nonce |
plainStrm | input plain text to be encrypted |
ePlainStrm | the end flag of plainStrm |
cipherStrm | output encrypted text |
eCipherStrm | the end flag of cipherStrm |