Lines Matching refs:key

115 	} __packed *key = p;  in zcrypt_type6_mex_key_en()  local
128 memset(key, 0, sizeof(*key)); in zcrypt_type6_mex_key_en()
130 key->pubhdr = static_pub_hdr; in zcrypt_type6_mex_key_en()
131 key->pubsec = static_pub_sec; in zcrypt_type6_mex_key_en()
134 temp = key->exponent; in zcrypt_type6_mex_key_en()
149 key->pubsec.modulus_bit_len = 8 * mex->inputdatalength; in zcrypt_type6_mex_key_en()
150 key->pubsec.modulus_byte_len = mex->inputdatalength; in zcrypt_type6_mex_key_en()
151 key->pubsec.exponent_len = mex->inputdatalength - i; in zcrypt_type6_mex_key_en()
152 key->pubsec.section_length = sizeof(key->pubsec) + in zcrypt_type6_mex_key_en()
154 key->pubhdr.token_length = in zcrypt_type6_mex_key_en()
155 key->pubsec.section_length + sizeof(key->pubhdr); in zcrypt_type6_mex_key_en()
156 key->t6_hdr.ulen = key->pubhdr.token_length + 4; in zcrypt_type6_mex_key_en()
157 key->t6_hdr.blen = key->pubhdr.token_length + 6; in zcrypt_type6_mex_key_en()
158 return sizeof(*key) + 2 * mex->inputdatalength - i; in zcrypt_type6_mex_key_en()
184 } __packed *key = p; in zcrypt_type6_crt_key() local
197 memset(key, 0, sizeof(*key)); in zcrypt_type6_crt_key()
203 size = sizeof(*key) + key_len + sizeof(*pub) + 3; in zcrypt_type6_crt_key()
206 key->t6_hdr.blen = size; in zcrypt_type6_crt_key()
207 key->t6_hdr.ulen = size - 2; in zcrypt_type6_crt_key()
210 key->token.token_identifier = CCA_TKN_HDR_ID_EXT; in zcrypt_type6_crt_key()
211 key->token.token_length = size - 6; in zcrypt_type6_crt_key()
214 key->pvt.section_identifier = CCA_PVT_EXT_CRT_SEC_ID_PVT; in zcrypt_type6_crt_key()
215 key->pvt.section_length = sizeof(key->pvt) + key_len; in zcrypt_type6_crt_key()
216 key->pvt.key_format = CCA_PVT_EXT_CRT_SEC_FMT_CL; in zcrypt_type6_crt_key()
217 key->pvt.key_use_flags[0] = CCA_PVT_USAGE_ALL; in zcrypt_type6_crt_key()
218 key->pvt.p_len = key->pvt.dp_len = key->pvt.u_len = long_len; in zcrypt_type6_crt_key()
219 key->pvt.q_len = key->pvt.dq_len = short_len; in zcrypt_type6_crt_key()
220 key->pvt.mod_len = crt->inputdatalength; in zcrypt_type6_crt_key()
221 key->pvt.pad_len = pad_len; in zcrypt_type6_crt_key()
224 if (copy_from_user(key->key_parts, crt->np_prime, long_len) || in zcrypt_type6_crt_key()
225 copy_from_user(key->key_parts + long_len, in zcrypt_type6_crt_key()
227 copy_from_user(key->key_parts + long_len + short_len, in zcrypt_type6_crt_key()
229 copy_from_user(key->key_parts + 2 * long_len + short_len, in zcrypt_type6_crt_key()
231 copy_from_user(key->key_parts + 2 * long_len + 2 * short_len, in zcrypt_type6_crt_key()
234 memset(key->key_parts + 3 * long_len + 2 * short_len + pad_len, in zcrypt_type6_crt_key()
236 pub = (struct cca_public_sec *)(key->key_parts + key_len); in zcrypt_type6_crt_key()