Closed enj closed 1 year ago
A quick peak at the ascon implementation suggests that the cipher is unsafe to use across go routines:
https://github.com/cloudflare/circl/blob/278354d01755a901d6629247e464265218d9d120/cipher/ascon/ascon.go#L178
I believe the general intent is for a cipher.AEAD to be safely reusable across go routines to avoid the setup cost.
cipher.AEAD
Either way, it would be good to at least document.
In general AEADs don't have to be thread safe, cf https://github.com/golang/go/issues/41689
A quick peak at the ascon implementation suggests that the cipher is unsafe to use across go routines:
https://github.com/cloudflare/circl/blob/278354d01755a901d6629247e464265218d9d120/cipher/ascon/ascon.go#L178
I believe the general intent is for a
cipher.AEAD
to be safely reusable across go routines to avoid the setup cost.Either way, it would be good to at least document.