I've been working on sigstore-rs and had issues with the nonce generation.
I believe your implementation might also suffer from a bug: When nonce[0] has values 0x80-0xFF (50% of the time), the Int will be interpreted as negative, which violates the RFC 3161 requirement that nonces be positive integers.
Here is a patch that was added to the Python library: https://github.com/trailofbits/rfc3161-client/pull/33/files
I've been working on sigstore-rs and had issues with the nonce generation.
I believe your implementation might also suffer from a bug: When nonce[0] has values 0x80-0xFF (50% of the time), the Int will be interpreted as negative, which violates the RFC 3161 requirement that nonces be positive integers.
Here is a patch that was added to the Python library: https://github.com/trailofbits/rfc3161-client/pull/33/files