Commit 41790bc2 authored by Jan Včelák's avatar Jan Včelák 🚀

libdnssec, add DS records for sample keys

parent c4d6f771
......@@ -20,6 +20,7 @@
typedef struct key_parameters {
// DNSSEC fields
uint8_t *name;
uint16_t flags;
uint8_t protocol;
uint8_t algorithm;
......@@ -31,6 +32,9 @@ typedef struct key_parameters {
// Hashes
const char *key_id;
uint16_t keytag;
dnssec_binary_t ds_sha1;
dnssec_binary_t ds_sha256;
dnssec_binary_t ds_sha384;
// Key information
unsigned bit_size;
......@@ -44,7 +48,9 @@ typedef struct key_parameters {
RSA-SHA-256
rsa. IN DNSKEY 256 3 8 AwEAAarbp0oh52KuF0SwXoSgMNRpcW/uPKCKQAu8NyYaY+e9G29rh7eqK1hqp7skbSvKKlItgAaFdDxZvPiD4AzBHQk= ;{id = 1506 (zsk), size = 512b}
rsa. IN DS 1506 8 1 172a500b374158d1a64ba3073cdbbc319b2fdf2c
rsa. IN DS 1506 8 2 253b099ff47b02c6ffa52695a30a94c6681c56befe0e71a5077d6f79514972f9
rsa. IN DS 1506 8 4 22ea940600dc2d9a98b1126c26ac0dc5c91b31eb50fe784b36ad675e9eecfe6573c1f85c53b6bc94580f3ac443d13c4c
Modulus: qtunSiHnYq4XRLBehKAw1Glxb+48oIpAC7w3Jhpj570bb2uHt6orWGqnuyRtK8oqUi2ABoV0PFm8+IPgDMEdCQ==
PublicExponent: AQAB
......@@ -69,6 +75,7 @@ Y5lIjDCa4+M=
*/
static const key_parameters_t SAMPLE_RSA_KEY = {
.name = (uint8_t *)"\x03""rsa",
.flags = 256,
.protocol = 3,
.algorithm = 8,
......@@ -93,6 +100,26 @@ static const key_parameters_t SAMPLE_RSA_KEY = {
}},
.key_id = "6d2b811564be0200132ef67d281de19e65ab3d1d",
.keytag = 1506,
.ds_sha1 = { .size = 24, .data = (uint8_t []) {
0x05, 0xe2, 0x08, 0x01,
0x17, 0x2a, 0x50, 0x0b, 0x37, 0x41, 0x58, 0xd1, 0xa6, 0x4b,
0xa3, 0x07, 0x3c, 0xdb, 0xbc, 0x31, 0x9b, 0x2f, 0xdf, 0x2c,
}},
.ds_sha256 = { .size = 36, .data = (uint8_t []) {
0x05, 0xe2, 0x08, 0x02,
0x25, 0x3b, 0x09, 0x9f, 0xf4, 0x7b, 0x02, 0xc6, 0xff, 0xa5,
0x26, 0x95, 0xa3, 0x0a, 0x94, 0xc6, 0x68, 0x1c, 0x56, 0xbe,
0xfe, 0x0e, 0x71, 0xa5, 0x07, 0x7d, 0x6f, 0x79, 0x51, 0x49,
0x72, 0xf9,
}},
.ds_sha384 = { .size = 52, .data = (uint8_t []) {
0x05, 0xe2, 0x08, 0x04,
0x22, 0xea, 0x94, 0x06, 0x00, 0xdc, 0x2d, 0x9a, 0x98, 0xb1,
0x12, 0x6c, 0x26, 0xac, 0x0d, 0xc5, 0xc9, 0x1b, 0x31, 0xeb,
0x50, 0xfe, 0x78, 0x4b, 0x36, 0xad, 0x67, 0x5e, 0x9e, 0xec,
0xfe, 0x65, 0x73, 0xc1, 0xf8, 0x5c, 0x53, 0xb6, 0xbc, 0x94,
0x58, 0x0f, 0x3a, 0xc4, 0x43, 0xd1, 0x3c, 0x4c,
}},
.bit_size = 512,
.pem = { .size = 522, .data = (uint8_t []) {
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e,
......@@ -157,6 +184,8 @@ DSA-NSEC3
dsa. IN DNSKEY 257 3 6 ALRB7JW8C3f9YYqtgW088YMR28u/tUD9ON0VGCNjvi6OFbTvuIP+Jaen8uFCpXy7KPPUXZQiDZrCvX5Vt0nvdAuHBk2Lqi9pn5nq3aWpOeer+L9o83KQ+jmCk1v1m+ryiNOCR1g14hmD6zF3x3Vncg0hrYRplMBB8UlgQKuCoJ2ktA9pTQYai0/TvXKVlqpXi41enyKld/E1Y7yDNjxDgGPROctlj8cYbs+6yjT4BbiQWG8qPCRsbfgqiLzjplQbGGkrSD08ozntKLD7XDCrq9RJP8gm ;{id = 1203 (ksk), size = 512b}
dsa. IN DS 1203 6 1 27a6bdcd62d80264ad71126adf9f2200e3c87f2f
dsa. IN DS 1203 6 2 6eeb47942d85578e9c611936e6ac7a3b969f543fc2f7b69790c256766c5df3e5
dsa. IN DS 1203 6 4 ab11a09b0dcea468a7d899e8f0be8791aa0fd911e97ead24cd428277f1762e40a266735533043ef1a692261647ff0e06
Prime(p): tUD9ON0VGCNjvi6OFbTvuIP+Jaen8uFCpXy7KPPUXZQiDZrCvX5Vt0nvdAuHBk2Lqi9pn5nq3aWpOeer+L9o8w==
Subprime(q): tEHslbwLd/1hiq2BbTzxgxHby78=
......@@ -175,6 +204,7 @@ ZjTfYqKkNYYh
*/
static const key_parameters_t SAMPLE_DSA_KEY = {
.name = (uint8_t *)"\x03""dsa",
.flags = 257,
.protocol = 3,
.algorithm = 6,
......@@ -229,6 +259,26 @@ static const key_parameters_t SAMPLE_DSA_KEY = {
}},
.keytag = 1203,
.key_id = "141b2d54837494735b53795bf0c1579bd9e12754",
.ds_sha1 = { .size = 24, .data = (uint8_t []) {
0x04, 0xb3, 0x06, 0x01,
0x27, 0xa6, 0xbd, 0xcd, 0x62, 0xd8, 0x02, 0x64, 0xad, 0x71,
0x12, 0x6a, 0xdf, 0x9f, 0x22, 0x00, 0xe3, 0xc8, 0x7f, 0x2f,
}},
.ds_sha256 = { .size = 36, .data = (uint8_t []) {
0x04, 0xb3, 0x06, 0x02,
0x6e, 0xeb, 0x47, 0x94, 0x2d, 0x85, 0x57, 0x8e, 0x9c, 0x61,
0x19, 0x36, 0xe6, 0xac, 0x7a, 0x3b, 0x96, 0x9f, 0x54, 0x3f,
0xc2, 0xf7, 0xb6, 0x97, 0x90, 0xc2, 0x56, 0x76, 0x6c, 0x5d,
0xf3, 0xe5,
}},
.ds_sha384 = { .size = 52, .data = (uint8_t []) {
0x04, 0xb3, 0x06, 0x04,
0xab, 0x11, 0xa0, 0x9b, 0x0d, 0xce, 0xa4, 0x68, 0xa7, 0xd8,
0x99, 0xe8, 0xf0, 0xbe, 0x87, 0x91, 0xaa, 0x0f, 0xd9, 0x11,
0xe9, 0x7e, 0xad, 0x24, 0xcd, 0x42, 0x82, 0x77, 0xf1, 0x76,
0x2e, 0x40, 0xa2, 0x66, 0x73, 0x55, 0x33, 0x04, 0x3e, 0xf1,
0xa6, 0x92, 0x26, 0x16, 0x47, 0xff, 0x0e, 0x06,
}},
.bit_size = 512,
.pem = { .size = 327, .data = (uint8_t []) {
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e,
......@@ -271,9 +321,10 @@ static const key_parameters_t SAMPLE_DSA_KEY = {
ECDSA-P256-SHA256
ecdsa. IN DNSKEY 256 3 13 8uD7C4THTM/w7uhryRSToeE/jKT78/p853RX0L5EwrZrSLBubLPiBw7g bvUP6SsIga5ZQ4CSAxNmYA/gZsuXzA==
ecdsa. IN DS 5345 13 1 954103AC7C43810CE9F414E80F30AB1CBE49B236
ecdsa. IN DS 5345 13 2 BAC2107036E735B50F85006CE409A19A3438CAB272E70769EBDA032239A3D0CA
ecdsa. IN DNSKEY 256 3 13 8uD7C4THTM/w7uhryRSToeE/jKT78/p853RX0L5EwrZrSLBubLPiBw7g bvUP6SsIga5ZQ4CSAxNmYA/gZsuXzA==
ecdsa. IN DS 5345 13 1 954103ac7c43810ce9f414e80f30ab1cbe49b236
ecdsa. IN DS 5345 13 2 bac2107036e735b50f85006ce409a19a3438cab272e70769ebda032239a3d0ca
ecdsa. IN DS 5345 13 4 a0ac6790483872be72a258314200a88ab75cdd70f66a18a09f0f414c074df0989fdb1df0e67d82d4312cda67b93a76c1
PrivateKey: iyLIPdk3DOIxVmmSYlmTstbtUPiVlEyDX46psyCwNVQ=
......@@ -287,6 +338,7 @@ YA/gZsuXzA==
*/
static const key_parameters_t SAMPLE_ECDSA_KEY = {
.name = (uint8_t *)"\x05""ecdsa",
.flags = 256,
.protocol = 3,
.algorithm = 13,
......@@ -311,6 +363,26 @@ static const key_parameters_t SAMPLE_ECDSA_KEY = {
}},
.keytag = 5345,
.key_id = "47fd10011e76cc6741af586041eae5519465fc8d",
.ds_sha1 = { .size = 24, .data = (uint8_t []) {
0x14, 0xe1, 0x0d, 0x01,
0x95, 0x41, 0x03, 0xac, 0x7c, 0x43, 0x81, 0x0c, 0xe9, 0xf4,
0x14, 0xe8, 0x0f, 0x30, 0xab, 0x1c, 0xbe, 0x49, 0xb2, 0x36,
}},
.ds_sha256 = { .size = 36, .data = (uint8_t []) {
0x14, 0xe1, 0x0d, 0x02,
0xba, 0xc2, 0x10, 0x70, 0x36, 0xe7, 0x35, 0xb5, 0x0f, 0x85,
0x00, 0x6c, 0xe4, 0x09, 0xa1, 0x9a, 0x34, 0x38, 0xca, 0xb2,
0x72, 0xe7, 0x07, 0x69, 0xeb, 0xda, 0x03, 0x22, 0x39, 0xa3,
0xd0, 0xca,
}},
.ds_sha384 = { .size = 52, .data = (uint8_t []) {
0x14, 0xe1, 0x0d, 0x04,
0xa0, 0xac, 0x67, 0x90, 0x48, 0x38, 0x72, 0xbe, 0x72, 0xa2,
0x58, 0x31, 0x42, 0x00, 0xa8, 0x8a, 0xb7, 0x5c, 0xdd, 0x70,
0xf6, 0x6a, 0x18, 0xa0, 0x9f, 0x0f, 0x41, 0x4c, 0x07, 0x4d,
0xf0, 0x98, 0x9f, 0xdb, 0x1d, 0xf0, 0xe6, 0x7d, 0x82, 0xd4,
0x31, 0x2c, 0xda, 0x67, 0xb9, 0x3a, 0x76, 0xc1,
}},
.bit_size = 256,
.pem = { .size = 262, .data = (uint8_t []) {
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment