45
43
Version, n, e, d, p, q, d mod (p-1), d mod (q - 1), 1/q mod p
47
if ((err = der_encode_sequence_multi(out, outlen,
45
return der_encode_sequence_multi(out, outlen,
48
46
LTC_ASN1_SHORT_INTEGER, 1UL, &zero,
49
LTC_ASN1_INTEGER, 1UL, &key->N,
50
LTC_ASN1_INTEGER, 1UL, &key->e,
51
LTC_ASN1_INTEGER, 1UL, &key->d,
52
LTC_ASN1_INTEGER, 1UL, &key->p,
53
LTC_ASN1_INTEGER, 1UL, &key->q,
54
LTC_ASN1_INTEGER, 1UL, &key->dP,
55
LTC_ASN1_INTEGER, 1UL, &key->dQ,
56
LTC_ASN1_INTEGER, 1UL, &key->qP,
57
LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) {
61
/* clear zero and return */
47
LTC_ASN1_INTEGER, 1UL, key->N,
48
LTC_ASN1_INTEGER, 1UL, key->e,
49
LTC_ASN1_INTEGER, 1UL, key->d,
50
LTC_ASN1_INTEGER, 1UL, key->p,
51
LTC_ASN1_INTEGER, 1UL, key->q,
52
LTC_ASN1_INTEGER, 1UL, key->dP,
53
LTC_ASN1_INTEGER, 1UL, key->dQ,
54
LTC_ASN1_INTEGER, 1UL, key->qP,
55
LTC_ASN1_EOL, 0UL, NULL);
65
58
return der_encode_sequence_multi(out, outlen,
66
LTC_ASN1_INTEGER, 1UL, &key->N,
67
LTC_ASN1_INTEGER, 1UL, &key->e,
59
LTC_ASN1_INTEGER, 1UL, key->N,
60
LTC_ASN1_INTEGER, 1UL, key->e,
68
61
LTC_ASN1_EOL, 0UL, NULL);