|
Message-ID: <87ed3qpsfb.fsf@keithp.com>
Date: Mon, 04 Nov 2024 14:04:08 -0800
From: Keith Packard <keithp@...thp.com>
To: Alan Coopersmith <alan.coopersmith@...cle.com>,
libc-coord@...ts.openwall.com
Subject: Re: Anyone have a secure 'free' API?
> memset_explicit() has been standardized in C23:
> https://en.cppreference.com/w/c/string/byte/memset
Yup, John Scott pointed me at that as well. I'm not sure how I missed
it. The only other C library I use on a regular basis is glibc and that
doesn't seem to have memset_explicit yet.
> There's also a number of libc's with the pre-standard explicit_memset()
> or explicit_bzero() as well:
I was only looking for something that was either an actual standard or a
common cross-libc standard so I didn't create a new name. Lacking
memset_explicit, I'd have been happy to provide explicit_memset (as
explicit_bzero is more constrained).
> (C11 also had memset_s() in the optional AnnexK, but that's not widely
> implemented.)
Picolibc has AnnexK, but I can't quite see how memset_s is supposed to
provide the desired behavior. It's clearly trying, but the simple
language in memset_explicit makes it a much better plan. Plus, it
doesn't add a pile of AnnexK goop to the resulting program.
--
-keith
Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.