beldmit: (Программизм)
Dmitry Belyavskiy ([personal profile] beldmit) wrote2015-10-24 11:08 pm
  • Previous Entry
  • Add Memory
  • Share This Entry
  • Next Entry
  • Crossposts: http://beldmit.livejournal.com/459154.html
Entry tags:
  • криптография,
  • программирование

Помножим потихонечку на нуль

memset may be optimized away (under the as-if rules) if the object modified by this function is not accessed again for the rest of its lifetime. For that reason, this function cannot be used to scrub memory (e.g. to fill an array that stored a password with zeroes). This optimization is prohibited for memset_s: it is guaranteed to perform the memory write.

А пока gcc (4.9.2) это не подддерживает, остаётся только извращаться. И всё равно компиляторы хитрее, а проблема этим не исчерпывается.

  • 8 comments
  • Post a new comment
Flat | Top-Level Comments Only

Вот, кажется, оригинальное письмо.

[identity profile] beldmit.livejournal.com 2015-10-26 10:39 am (UTC)(link)
http://www.metzdowd.com/pipermail/cryptography/2015-October/026834.html
  • Thread
  • Reply to this
  • Thread from start
  • Parent

  • 8 comments
  • Post a new comment
Flat | Top-Level Comments Only

[ Home | Post Entry | Log in | Search | Browse Options | Site Map ]