Fabcoin Core  0.16.2
P2P Digital Currency
Macros | Functions
libscrypt.h File Reference
#include <stdint.h>
Include dependency graph for libscrypt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SCRYPT_HASH_LEN
 
#define SCRYPT_SAFE_N
 
#define SCRYPT_SALT_LEN   16 /* This is just a recommended size */
 
#define SCRYPT_MCF_LEN   125 /* mcf is 120 byte + nul */
 
#define SCRYPT_MCF_ID   "$s1"
 
#define SCRYPT_N   16384
 
#define SCRYPT_r   8
 
#define SCRYPT_p   16
 

Functions

int libscrypt_scrypt (const uint8_t *, size_t, const uint8_t *, size_t, uint64_t, uint32_t, uint32_t, uint8_t *, size_t)
 crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen): Compute scrypt(passwd[0 . More...
 
int libscrypt_mcf (uint32_t N, uint32_t r, uint32_t p, const char *salt, const char *hash, char *mcf)
 
int libscrypt_check (char *mcf, const char *password)
 

Macro Definition Documentation

#define SCRYPT_HASH_LEN
Value:
64 /* This can be user defined -
*but 64 is the reference size
*/

Definition at line 44 of file libscrypt.h.

#define SCRYPT_MCF_ID   "$s1"

Definition at line 52 of file libscrypt.h.

#define SCRYPT_MCF_LEN   125 /* mcf is 120 byte + nul */

Definition at line 51 of file libscrypt.h.

#define SCRYPT_N   16384

Definition at line 53 of file libscrypt.h.

#define SCRYPT_p   16

Definition at line 55 of file libscrypt.h.

#define SCRYPT_r   8

Definition at line 54 of file libscrypt.h.

#define SCRYPT_SAFE_N
Value:
30 /* This is much higher than you want. It's just
* a blocker for insane defines
*/

Definition at line 47 of file libscrypt.h.

#define SCRYPT_SALT_LEN   16 /* This is just a recommended size */

Definition at line 50 of file libscrypt.h.

Function Documentation

int libscrypt_check ( char *  mcf,
const char *  password 
)

Definition at line 16 of file crypto_scrypt-check.c.

Here is the call graph for this function:

int libscrypt_mcf ( uint32_t  N,
uint32_t  r,
uint32_t  p,
const char *  salt,
const char *  hash,
char *  mcf 
)

Definition at line 41 of file crypto-mcf.c.

int libscrypt_scrypt ( const uint8_t *  passwd,
size_t  passwdlen,
const uint8_t *  salt,
size_t  saltlen,
uint64_t  N,
uint32_t  r,
uint32_t  p,
uint8_t *  buf,
size_t  buflen 
)

crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen): Compute scrypt(passwd[0 .

. passwdlen - 1], salt[0 .. saltlen - 1], N, r, p, buflen) and write the result into buf. The parameters r, p, and buflen must satisfy r * p < 2^30 and buflen <= (2^32 - 1) * 32. The parameter N must be a power of 2 greater than 1.

libscrypt_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen): password; duh N: CPU AND RAM cost (first modifier) r: RAM Cost p: CPU cost (parallelisation) In short, N is your main performance modifier. Values of r = 8, p = 1 are standard unless you want to modify the CPU/RAM ratio. Return 0 on success; or -1 on error.

. passwdlen - 1], salt[0 .. saltlen - 1], N, r, p, buflen) and write the result into buf. The parameters r, p, and buflen must satisfy r * p < 2^30 and buflen <= (2^32 - 1) * 32. The parameter N must be a power of 2 greater than 1.

Return 0 on success; or -1 on error

Definition at line 234 of file crypto_scrypt-nosse.c.

Here is the call graph for this function:

Here is the caller graph for this function: