From: Job Snijders Subject: Re: rpki-client: kill the BN_CTX in the parser To: Theo Buehler , tech@openbsd.org Date: Wed, 11 Nov 2026 12:04:53 +0000 On Wed, Nov 11, 2026 at 11:21:32AM +0100, Theo Buehler wrote: > Before threads were added to the parser, having a global BN_CTX was easy > enough. While it saves many small allocations, I don't think it's worth > the complexity. > > A bignum is a struct containing a pointer to an array of words and then > four ints. Sequence numbers are at most 20 octets (fitting into 3 8-bit > words on 64 bits), so each seqnum requires at most 48 bytes. We check > with two bignums instead of three without loss of clarity, so we have > all this complexity to avoid allocations of at most 96 bytes. OK job@