Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANO7a6xkCA2xnN0r2-zZms5PTbHYBG9ELzAe=2UYi=ec3GQYng@mail.gmail.com>
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

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.