Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 24 May 2012 16:58:45 +0530
From: Dhiru Kholia <dhiru.kholia@...il.com>
To: john-dev@...ts.openwall.com
Subject: allocating salts

Hi,

Which way of the following ways of handling salts is better / preferred.

Given,

static struct custom_salt {
        unsigned char userid[8 + 1];
        char unsigned hash[8];
} *salt_struct;


1. #define SALT_SIZE sizeof(*salt_struct) and malloc'ing custom_salt
structure for every salt (involves a single pointer copy but leaks
memory) in get_salt().

2. #define SALT_SIZE sizeof(struct custom_salt) and have a static
custom_salt structure (involves whole buffer copy but doesn't leak
memory)

-- 
Cheers,
Dhiru

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ