comparison sencrypt.c @ 9:cc930aa0f3c2

Perform 50000 iterations with the PBKDF2 hash function when creating new files NIST and OWASP currently recommend at least 10000 iterations
author Guido Berhoerster <guido+sencrypt@berhoerster.name>
date Sat, 03 Sep 2016 11:43:37 +0200
parents abb770754967
children 8e9dd5328b5a
comparison
equal deleted inserted replaced
8:b284e11ee7a0 9:cc930aa0f3c2
1 /* 1 /*
2 * Copyright (C) 2011 Guido Berhoerster <guido+sencrypt@berhoerster.name> 2 * Copyright (C) 2016 Guido Berhoerster <guido+sencrypt@berhoerster.name>
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining 4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the 5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including 6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish, 7 * without limitation the rights to use, copy, modify, merge, publish,
47 #define MAX(a, b) (((a) > (b)) ? (a) : (b)) 47 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
48 48
49 #define EXIT_USAGE 2 49 #define EXIT_USAGE 2
50 50
51 #define SENCRYPT_FORMAT_VERSION 1 51 #define SENCRYPT_FORMAT_VERSION 1
52 #define PBKDF2_ITERATIONS 1000 52 #define PBKDF2_ITERATIONS 50000
53 #define SALT_LEN 16 53 #define SALT_LEN 16
54 #define BUFFER_SIZE (16 * 1024) 54 #define BUFFER_SIZE (16 * 1024)
55 #define MAX_PASSWORD_LEN 256 55 #define MAX_PASSWORD_LEN 256
56 56
57 enum { 57 enum {