pbkdf2.c revision 159d09a20817016f09b3ea28d1bdada4a336bb91
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*
* Copyright 2002 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
*
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation, and that
* the name of M.I.T. not be used in advertising or publicity pertaining
* to distribution of the software without specific, written prior
* permission. Furthermore if you modify this software you must label
* your software as modified software and not distribute it in such a
* fashion that it might be confused with the original M.I.T. software.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
*
* Implementation of PBKDF2 from RFC 2898.
* Not currently used; likely to be used when we get around to AES support.
*/
#ifndef _KERNEL
#include <ctype.h>
#include "k5-int.h"
#include "hash_provider.h"
/*
* Solaris Kerberos:
* MIT code ripped out, use PBKDF2 algorithm from PKCS#11
* provider.
*/
unsigned long count,
{
krb5_error_code ret = 0;
int attrs = 0;
attrs++;
return (PKCS_ERR);
attrs++;
/*
* For DES key types, do not include the value len attr.
*/
enctype != ENCTYPE_DES_CBC_CRC &&
enctype != ENCTYPE_DES_CBC_MD5 &&
enctype != ENCTYPE_DES_CBC_RAW &&
enctype != ENCTYPE_DES_HMAC_SHA1 &&
enctype != ENCTYPE_DES3_CBC_SHA1 &&
enctype != ENCTYPE_DES3_CBC_RAW) {
/* using outlen to avoid 64bit alignment issues */
attrs++;
}
params.ulPrfDataLen = 0;
/* using passlen to avoid 64bit alignment issues */
else {
/* Get the value from the key object. */
tmpl, 1);
}
return (ret);
}
#endif /* !_KERNEL */