Lines Matching refs:p
102 OSSL_PARAM *p; in chacha20_poly1305_get_ctx_params() local
104 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_IVLEN); in chacha20_poly1305_get_ctx_params()
105 if (p != NULL) { in chacha20_poly1305_get_ctx_params()
106 if (!OSSL_PARAM_set_size_t(p, CHACHA20_POLY1305_IVLEN)) { in chacha20_poly1305_get_ctx_params()
111 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_KEYLEN); in chacha20_poly1305_get_ctx_params()
112 if (p != NULL && !OSSL_PARAM_set_size_t(p, CHACHA20_POLY1305_KEYLEN)) { in chacha20_poly1305_get_ctx_params()
116 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_AEAD_TAGLEN); in chacha20_poly1305_get_ctx_params()
117 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->tag_len)) { in chacha20_poly1305_get_ctx_params()
121 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD); in chacha20_poly1305_get_ctx_params()
122 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->tls_aad_pad_sz)) { in chacha20_poly1305_get_ctx_params()
127 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_AEAD_TAG); in chacha20_poly1305_get_ctx_params()
128 if (p != NULL) { in chacha20_poly1305_get_ctx_params()
129 if (p->data_type != OSSL_PARAM_OCTET_STRING) { in chacha20_poly1305_get_ctx_params()
137 if (p->data_size == 0 || p->data_size > POLY1305_BLOCK_SIZE) { in chacha20_poly1305_get_ctx_params()
141 memcpy(p->data, ctx->tag, p->data_size); in chacha20_poly1305_get_ctx_params()
164 const OSSL_PARAM *p; in chacha20_poly1305_set_ctx_params() local
173 p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN); in chacha20_poly1305_set_ctx_params()
174 if (p != NULL) { in chacha20_poly1305_set_ctx_params()
175 if (!OSSL_PARAM_get_size_t(p, &len)) { in chacha20_poly1305_set_ctx_params()
184 p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_IVLEN); in chacha20_poly1305_set_ctx_params()
185 if (p != NULL) { in chacha20_poly1305_set_ctx_params()
186 if (!OSSL_PARAM_get_size_t(p, &len)) { in chacha20_poly1305_set_ctx_params()
196 p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_AEAD_TAG); in chacha20_poly1305_set_ctx_params()
197 if (p != NULL) { in chacha20_poly1305_set_ctx_params()
198 if (p->data_type != OSSL_PARAM_OCTET_STRING) { in chacha20_poly1305_set_ctx_params()
202 if (p->data_size == 0 || p->data_size > POLY1305_BLOCK_SIZE) { in chacha20_poly1305_set_ctx_params()
206 if (p->data != NULL) { in chacha20_poly1305_set_ctx_params()
211 memcpy(ctx->tag, p->data, p->data_size); in chacha20_poly1305_set_ctx_params()
213 ctx->tag_len = p->data_size; in chacha20_poly1305_set_ctx_params()
216 p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_AEAD_TLS1_AAD); in chacha20_poly1305_set_ctx_params()
217 if (p != NULL) { in chacha20_poly1305_set_ctx_params()
218 if (p->data_type != OSSL_PARAM_OCTET_STRING) { in chacha20_poly1305_set_ctx_params()
222 len = hw->tls_init(&ctx->base, p->data, p->data_size); in chacha20_poly1305_set_ctx_params()
230 p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED); in chacha20_poly1305_set_ctx_params()
231 if (p != NULL) { in chacha20_poly1305_set_ctx_params()
232 if (p->data_type != OSSL_PARAM_OCTET_STRING) { in chacha20_poly1305_set_ctx_params()
236 if (hw->tls_iv_set_fixed(&ctx->base, p->data, p->data_size) == 0) { in chacha20_poly1305_set_ctx_params()