X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fjournal%2Ffsprg.c;h=dd9a24256147278dd99436fa0d7a5e80291fb6c2;hp=2190b7c796857d1645a99ae85165e711b03f72d7;hb=a69f4254a82765cd0c7f155d5dc86e0768ea0ef3;hpb=f274ece0f76b5709408821e317e87aef76123db6 diff --git a/src/journal/fsprg.c b/src/journal/fsprg.c index 2190b7c79..dd9a24256 100644 --- a/src/journal/fsprg.c +++ b/src/journal/fsprg.c @@ -19,7 +19,13 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA + */ + +/* + * See "Practical Secure Logging: Seekable Sequential Key Generators" + * by G. A. Marson, B. Poettering for details: * + * http://eprint.iacr.org/2013/397 */ #include @@ -74,7 +80,7 @@ static void uint64_export(void *buf, size_t buflen, uint64_t x) { ((uint8_t*) buf)[7] = (x >> 0) & 0xff; } -static uint64_t uint64_import(const void *buf, size_t buflen) { +_pure_ static uint64_t uint64_import(const void *buf, size_t buflen) { assert(buflen == 8); return (uint64_t)(((uint8_t*) buf)[0]) << 56 |