Home | History | Annotate | Download | only in lib20

Lines Matching refs:key

5  * Key unpacking functions
12 const uint8_t *vb2_packed_key_data(const struct vb2_packed_key *key)
14 return (const uint8_t *)key + key->key_offset;
19 const struct vb2_packed_key *key)
22 key, sizeof(*key),
23 key->key_offset, key->key_size);
26 int vb2_unpack_key(struct vb2_public_key *key,
36 /* Make sure passed buffer is big enough for the packed key */
41 /* Unpack key algorithm */
42 key->sig_alg = vb2_crypto_to_signature(packed_key->algorithm);
43 if (key->sig_alg == VB2_SIG_INVALID) {
48 key->hash_alg = vb2_crypto_to_hash(packed_key->algorithm);
49 if (key->hash_alg == VB2_HASH_INVALID) {
54 expected_key_size = vb2_packed_key_size(key->sig_alg);
56 VB2_DEBUG("Wrong key size for algorithm\n");
65 /* Sanity check key array size */
66 key->arrsize = buf32[0];
67 if (key->arrsize * sizeof(uint32_t) != vb2_rsa_sig_size(key->sig_alg))
70 key->n0inv = buf32[1];
72 /* Arrays point inside the key data */
73 key->n = buf32 + 2;
74 key->rr = buf32 + 2 + key->arrsize;