Go to the documentation of this file.
18 #include "../internal.h"
42 for (
int i = 8;
i > 0;
i -= 2) {
77 for (
int i = 0;
i < 16; ++
i) {
84 for (
size_t i = 0;
i < 16;
i++) {
85 out->words[
i] =
a->words[
i] ^
b->words[
i];
117 &V[2 *
r * (
i - 1) ],
r);
125 for (
size_t k = 0;
k < 2 *
r;
k++) {
138 #define SCRYPT_PR_MAX ((1 << 30) - 1)
142 #define SCRYPT_MAX_MEM (1024 * 1024 * 32)
150 N < 2 || (
N & (
N - 1)) ||
154 (16 * r <= 63 && N >=
UINT64_C(1) << (16 *
r))) {
165 size_t max_scrypt_blocks = max_mem / (2 *
r *
sizeof(
block_t));
166 if (max_scrypt_blocks <
p + 1 ||
167 max_scrypt_blocks -
p - 1 <
N) {
175 size_t B_blocks =
p * 2 *
r;
176 size_t B_bytes = B_blocks *
sizeof(
block_t);
177 size_t T_blocks = 2 *
r;
178 size_t V_blocks =
N * 2 *
r;
#define OPENSSL_PUT_ERROR(library, reason)
std::vector< std::string > words
static uint32_t CRYPTO_rotl_u32(uint32_t value, int shift)
const OPENSSL_EXPORT EVP_MD * EVP_sha256(void)
#define T(upbtypeconst, upbtype, ctype, default_value)
static void scryptROMix(block_t *B, uint64_t r, uint64_t N, block_t *T, block_t *V)
#define EVP_R_INVALID_PARAMETERS
unsigned __int64 uint64_t
static void * OPENSSL_memcpy(void *dst, const void *src, size_t n)
int EVP_PBE_scrypt(const char *password, size_t password_len, const uint8_t *salt, size_t salt_len, uint64_t N, uint64_t r, uint64_t p, size_t max_mem, uint8_t *out_key, size_t key_len)
OPENSSL_STATIC_ASSERT(sizeof(block_t)==64, "block_t has padding")
#define PKCS5_PBKDF2_HMAC
UniquePtr< SSL_SESSION > ret
static void scryptBlockMix(block_t *out, const block_t *B, uint64_t r)
static void salsa208_word_specification(block_t *inout)
static void xor_block(block_t *out, const block_t *a, const block_t *b)
#define EVP_R_MEMORY_LIMIT_EXCEEDED
#define ERR_R_MALLOC_FAILURE
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:15