• Home
  • Raw
  • Download

Lines Matching refs:kctx

58     SCRYPT_PKEY_CTX *kctx;  in pkey_scrypt_init()  local
60 kctx = OPENSSL_zalloc(sizeof(*kctx)); in pkey_scrypt_init()
61 if (kctx == NULL) { in pkey_scrypt_init()
70 kctx->N = 1 << 20; in pkey_scrypt_init()
71 kctx->r = 8; in pkey_scrypt_init()
72 kctx->p = 1; in pkey_scrypt_init()
73 kctx->maxmem_bytes = 1025 * 1024 * 1024; in pkey_scrypt_init()
75 ctx->data = kctx; in pkey_scrypt_init()
82 SCRYPT_PKEY_CTX *kctx = ctx->data; in pkey_scrypt_cleanup() local
84 OPENSSL_clear_free(kctx->salt, kctx->salt_len); in pkey_scrypt_cleanup()
85 OPENSSL_clear_free(kctx->pass, kctx->pass_len); in pkey_scrypt_cleanup()
86 OPENSSL_free(kctx); in pkey_scrypt_cleanup()
123 SCRYPT_PKEY_CTX *kctx = ctx->data; in pkey_scrypt_ctrl() local
128 return pkey_scrypt_set_membuf(&kctx->pass, &kctx->pass_len, p2, p1); in pkey_scrypt_ctrl()
131 return pkey_scrypt_set_membuf(&kctx->salt, &kctx->salt_len, p2, p1); in pkey_scrypt_ctrl()
137 kctx->N = u64_value; in pkey_scrypt_ctrl()
144 kctx->r = u64_value; in pkey_scrypt_ctrl()
151 kctx->p = u64_value; in pkey_scrypt_ctrl()
158 kctx->maxmem_bytes = u64_value; in pkey_scrypt_ctrl()
219 SCRYPT_PKEY_CTX *kctx = ctx->data; in pkey_scrypt_derive() local
221 if (kctx->pass == NULL) { in pkey_scrypt_derive()
226 if (kctx->salt == NULL) { in pkey_scrypt_derive()
231 return EVP_PBE_scrypt((char *)kctx->pass, kctx->pass_len, kctx->salt, in pkey_scrypt_derive()
232 kctx->salt_len, kctx->N, kctx->r, kctx->p, in pkey_scrypt_derive()
233 kctx->maxmem_bytes, key, *keylen); in pkey_scrypt_derive()