Fabcoin Core
0.16.2
P2P Digital Currency
|
#include <stdint.h>
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) |
#define SCRYPT_HASH_LEN |
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 |
Definition at line 47 of file libscrypt.h.
Definition at line 50 of file libscrypt.h.
int libscrypt_check | ( | char * | mcf, |
const char * | password | ||
) |
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.