This is security-breaking behavior, potentially. Simply generating a random nonce each time is not sufficient in this scenario. We need to use a counter as well, to ensure that we don't use a given nonce + MAC key more than once for the same encrypted information.
This takes place here: https://github.com/blur-network/blur/blob/master/src/crypto/chacha.c#L142
And has relevance here:
|
cache_file_data.iv = crypto::rand<crypto::chacha_iv>(); |
... among other places, too.
For the implications of what this inadvertent reuse could result in, see:
https://github.com/miscreant/miscreant/wiki/Nonce-Reuse-Misuse-Resistance
This was mentioned as a prospective change in #53