Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

pkcs5.c File Reference

pkcs5.c File Reference

PKCS #5 (Password-Based Cryptography Standard) More...

Go to the source code of this file.

Functions

error_t pbkdf1 (const HashAlgo *hash, const uint8_t *p, size_t pLen, const uint8_t *s, size_t sLen, uint_t c, uint8_t *dk, size_t dkLen)
 PBKDF1 key derivation function.
error_t pbkdf2 (const HashAlgo *hash, const uint8_t *p, size_t pLen, const uint8_t *s, size_t sLen, uint_t c, uint8_t *dk, size_t dkLen)
 PBKDF2 key derivation function.

Detailed Description

PKCS #5 (Password-Based Cryptography Standard)

License

Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneCrypto Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author:
Oryx Embedded SARL (www.oryx-embedded.com)
Version:
1.7.6

Definition in file pkcs5.c.


Function Documentation

error_t pbkdf1 ( const HashAlgo hash,
const uint8_t *  p,
size_t  pLen,
const uint8_t *  s,
size_t  sLen,
uint_t  c,
uint8_t *  dk,
size_t  dkLen 
)

PBKDF1 key derivation function.

PBKDF1 applies a hash function, which shall be MD2, MD5 or SHA-1, to derive keys. The length of the derived key is bounded by the length of the hash function output, which is 16 octets for MD2 and MD5 and 20 octets for SHA-1

Parameters:
[in]hashUnderlying hash function (MD2, MD5 or SHA-1)
[in]pPassword, an octet string
[in]pLenLength in octets of password
[in]sSalt, an octet string
[in]sLenLength in octets of salt
[in]cIteration count
[out]dkDerived key
[in]dkLenIntended length in octets of the derived key
Returns:
Error code

Definition at line 65 of file pkcs5.c.

error_t pbkdf2 ( const HashAlgo hash,
const uint8_t *  p,
size_t  pLen,
const uint8_t *  s,
size_t  sLen,
uint_t  c,
uint8_t *  dk,
size_t  dkLen 
)

PBKDF2 key derivation function.

PBKDF2 applies a pseudorandom function to derive keys. The length of the derived key is essentially unbounded

Parameters:
[in]hashHash algorithm used by the underlying PRF
[in]pPassword, an octet string
[in]pLenLength in octets of password
[in]sSalt, an octet string
[in]sLenLength in octets of salt
[in]cIteration count
[out]dkDerived key
[in]dkLenIntended length in octets of the derived key
Returns:
Error code

Definition at line 136 of file pkcs5.c.