Lines Matching defs:key
2 * keyraw.c - raw key operations and conversions
89 uint16_t sldns_calc_keytag_raw(uint8_t* key, size_t keysize)
95 if (key[3] == LDNS_RSAMD5) {
98 memmove(&ac16, key + keysize - 3, 2);
106 ac32 += (i & 1) ? key[i] : key[i] << 8;
178 sldns_key_buf2dsa_raw(unsigned char* key, size_t len)
189 T = (uint8_t)key[0];
199 Q = BN_bin2bn(key+offset, SHA_DIGEST_LENGTH, NULL);
202 P = BN_bin2bn(key+offset, (int)length, NULL);
205 G = BN_bin2bn(key+offset, (int)length, NULL);
208 Y = BN_bin2bn(key+offset, (int)length, NULL);
211 /* create the key and set its properties */
230 sldns_key_buf2rsa_raw(unsigned char* key, size_t len)
241 if (key[0] == 0) {
244 memmove(&int16, key+1, 2);
248 exp = key[0];
252 /* key length at least one */
259 (void) BN_bin2bn(key+offset, (int)exp, exponent);
268 /* length of the buffer must match the key length! */
269 (void) BN_bin2bn(key+offset, (int)(len - offset), modulus);
287 sldns_gost2pkey_raw(unsigned char* key, size_t keylen)
297 /* key wrong size */
303 memmove(encoded+37, key, 64);
312 sldns_ecdsa2pkey_raw(unsigned char* key, size_t keylen, uint8_t algo)
334 memmove(buf+1, key, keylen);