|
| 1 | +# |
| 2 | +# PKCS15 r/w profile for MyEID cards |
| 3 | +# |
| 4 | +# This is a special version of the MyEID profile, which enables unblocking user PINs using the SO-PIN |
| 5 | +# This configuration is not strictly ISO 7816-15 compliant, because by the standard unblockingPin and soPin flags should not be set in the same authentication object |
| 6 | +# Use profiles "myeid_unblocking_pin" and "myeid_unblock_with_other_pin" to set up a card with a separate unblocking PIN. |
| 7 | +# The purpose of these special profiles is to enable configuring MyEID so that a PUK code associated with a user PIN can be changed after initialization. |
| 8 | + |
| 9 | +cardinfo { |
| 10 | + label = "MyEID"; |
| 11 | + manufacturer = "Aventra Ltd."; |
| 12 | + min-pin-length = 4; |
| 13 | + max-pin-length = 8; |
| 14 | + pin-encoding = ascii-numeric; |
| 15 | + pin-pad-char = 0xFF; |
| 16 | +} |
| 17 | + |
| 18 | +# |
| 19 | +# The following controls some aspects of the PKCS15 we put onto |
| 20 | +# the card. |
| 21 | +# |
| 22 | +pkcs15 { |
| 23 | + # Put certificates into the CDF itself? |
| 24 | + direct-certificates = no; |
| 25 | + # Put the DF length into the ODF file? |
| 26 | + encode-df-length = no; |
| 27 | + # Have a lastUpdate field in the EF(TokenInfo)? |
| 28 | + do-last-update = no; |
| 29 | +} |
| 30 | + |
| 31 | +option default { |
| 32 | + macros { |
| 33 | + #protected = READ=NONE, UPDATE=CHV1, DELETE=CHV2; |
| 34 | + #unprotected = READ=NONE, UPDATE=CHV1, DELETE=CHV1; |
| 35 | + |
| 36 | + unusedspace-size = 510; |
| 37 | + odf-size = 255; |
| 38 | + aodf-size = 255; |
| 39 | + cdf-size = 1530; |
| 40 | + cdf-trusted-size = 510; |
| 41 | + prkdf-size = 1530; |
| 42 | + pukdf-size = 1530; |
| 43 | + skdf-size = 1530; |
| 44 | + dodf-size = 1530; |
| 45 | + } |
| 46 | +} |
| 47 | + |
| 48 | +# Define reasonable limits for PINs and PUK |
| 49 | +# Note that we do not set a file path or reference |
| 50 | +# here; that is done dynamically. |
| 51 | +# This version of the profile sets the auth-if of user PIN to point to the SO-PIN. With this configuration, the driver applies the "allow global unblocking" flag to the PIN, allowing it to be unblocked with SO-PIN |
| 52 | +PIN user-pin { |
| 53 | + auth-id = FF; |
| 54 | + reference = 1; |
| 55 | + min-length = 4; |
| 56 | + max-length = 8; |
| 57 | + attempts = 3; |
| 58 | + flags = initialized, needs-padding; |
| 59 | +} |
| 60 | + |
| 61 | +PIN user-puk { |
| 62 | + reference =3; |
| 63 | + min-length = 4; |
| 64 | + max-length = 8; |
| 65 | + attempts = 10; |
| 66 | + flags = needs-padding; |
| 67 | +} |
| 68 | + |
| 69 | +# This version of the profile allows using so-pin to unblock other PINs. |
| 70 | +PIN so-pin { |
| 71 | + reference = 3; |
| 72 | + auth-id = FF; |
| 73 | + min-length = 4; |
| 74 | + max-length = 8; |
| 75 | + attempts = 3; |
| 76 | + flags = initialized, soPin, needs-padding, unblockingPin; |
| 77 | +} |
| 78 | + |
| 79 | +PIN so-puk { |
| 80 | + min-length = 4; |
| 81 | + max-length = 8; |
| 82 | + attempts = 10; |
| 83 | + flags = needs-padding; |
| 84 | +} |
| 85 | + |
| 86 | +# Additional filesystem info. |
| 87 | +# This is added to the file system info specified in the |
| 88 | +# main profile. |
| 89 | +filesystem { |
| 90 | + DF MF { |
| 91 | + path = 3F00; |
| 92 | + type = DF; |
| 93 | + acl = CREATE=$PIN, DELETE=$SOPIN; |
| 94 | + |
| 95 | + # This is the DIR file |
| 96 | + EF DIR { |
| 97 | + file-id = 2F00; |
| 98 | + structure = transparent; |
| 99 | + size = 128; |
| 100 | + acl = READ=NONE, UPDATE=$SOPIN, DELETE=$SOPIN; |
| 101 | + } |
| 102 | + DF PKCS15-AppDF { |
| 103 | + type = DF; |
| 104 | + file-id = 5015; |
| 105 | + aid = A0:00:00:00:63:50:4B:43:53:2D:31:35; |
| 106 | + acl = DELETE=$PIN, CREATE=$PIN; |
| 107 | + |
| 108 | + EF PKCS15-ODF { |
| 109 | + file-id = 5031; |
| 110 | + structure = transparent; |
| 111 | + size = $odf-size; |
| 112 | + acl = READ=NONE, UPDATE=$PIN, DELETE=$SOPIN; |
| 113 | + } |
| 114 | + |
| 115 | + EF PKCS15-TokenInfo { |
| 116 | + file-id = 5032; |
| 117 | + size = 160; |
| 118 | + structure = transparent; |
| 119 | + acl = READ=NONE, UPDATE=$SOPIN, DELETE=$SOPIN; |
| 120 | + } |
| 121 | + |
| 122 | + EF PKCS15-UnusedSpace { |
| 123 | + file-id = 5033; |
| 124 | + structure = transparent; |
| 125 | + size = $unusedspace-size; |
| 126 | + acl = READ=NONE, UPDATE=$SOPIN, DELETE=$SOPIN; |
| 127 | + } |
| 128 | + |
| 129 | + EF PKCS15-AODF { |
| 130 | + file-id = 4401; |
| 131 | + structure = transparent; |
| 132 | + size = $aodf-size; |
| 133 | + acl = READ=NONE, UPDATE=$SOPIN, DELETE=$SOPIN; |
| 134 | + } |
| 135 | + |
| 136 | + EF PKCS15-PrKDF { |
| 137 | + file-id = 4402; |
| 138 | + structure = transparent; |
| 139 | + size = $prkdf-size; |
| 140 | + acl = *=NEVER, READ=NONE, UPDATE=$PIN, DELETE=$SOPIN; |
| 141 | + } |
| 142 | + |
| 143 | + EF PKCS15-PuKDF { |
| 144 | + file-id = 4404; |
| 145 | + structure = transparent; |
| 146 | + size = $pukdf-size; |
| 147 | + acl = *=NEVER, READ=NONE, UPDATE=$PIN, DELETE=$SOPIN; |
| 148 | + } |
| 149 | + |
| 150 | + EF PKCS15-SKDF { |
| 151 | + file-id = 4407; |
| 152 | + structure = transparent; |
| 153 | + size = $skdf-size; |
| 154 | + acl = *=NEVER, READ=NONE, UPDATE=$PIN, DELETE=$SOPIN; |
| 155 | + } |
| 156 | + |
| 157 | + EF PKCS15-CDF { |
| 158 | + file-id = 4403; |
| 159 | + structure = transparent; |
| 160 | + size = $cdf-size; |
| 161 | + acl = *=NEVER, READ=NONE, UPDATE=$PIN, DELETE=$SOPIN; |
| 162 | + } |
| 163 | + |
| 164 | + EF PKCS15-CDF-TRUSTED { |
| 165 | + file-id = 4405; |
| 166 | + structure = transparent; |
| 167 | + size = $cdf-trusted-size; |
| 168 | + acl = *=NEVER, READ=NONE, UPDATE=$PIN, DELETE=$SOPIN; |
| 169 | + } |
| 170 | + |
| 171 | + EF PKCS15-DODF { |
| 172 | + file-id = 4406; |
| 173 | + structure = transparent; |
| 174 | + size = $dodf-size; |
| 175 | + acl = *=NEVER, READ=NONE, UPDATE=$PIN, DELETE=$SOPIN; |
| 176 | + } |
| 177 | + |
| 178 | + EF template-private-key { |
| 179 | + type = internal-ef; |
| 180 | + file-id = 4B01; |
| 181 | + acl = CRYPTO=$PIN, UPDATE=$PIN, DELETE=$PIN, GENERATE=$PIN; |
| 182 | + } |
| 183 | + |
| 184 | + EF template-secret-key { |
| 185 | + type = internal-ef; |
| 186 | + file-id = 4D01; |
| 187 | + acl = CRYPTO=$PIN, UPDATE=$PIN, DELETE=$PIN, GENERATE=$PIN; |
| 188 | + } |
| 189 | + |
| 190 | + EF template-public-key { |
| 191 | + structure = transparent; |
| 192 | + file-id = 5501; |
| 193 | + acl = READ=NONE, UPDATE=$PIN, DELETE=$PIN, GENERATE=$PIN; |
| 194 | + } |
| 195 | + |
| 196 | + EF template-certificate { |
| 197 | + file-id = 4301; |
| 198 | + structure = transparent; |
| 199 | + acl = READ=NONE, UPDATE=$PIN, DELETE=$PIN; |
| 200 | + } |
| 201 | + |
| 202 | + template key-domain { |
| 203 | + # This is a dummy entry - pkcs15-init insists that |
| 204 | + # this is present |
| 205 | + EF private-key { |
| 206 | + file-id = 4B01; |
| 207 | + type = internal-ef; |
| 208 | + acl = CRYPTO=$PIN, UPDATE=$PIN, DELETE=$PIN, GENERATE=$PIN; |
| 209 | + } |
| 210 | + EF public-key { |
| 211 | + file-id = 5501; |
| 212 | + structure = transparent; |
| 213 | + acl = READ=NONE, UPDATE=$PIN, DELETE=$PIN, GENERATE=$PIN; |
| 214 | + } |
| 215 | + EF secret-key { |
| 216 | + file-id = 4D01; |
| 217 | + type = internal-ef; |
| 218 | + acl = CRYPTO=$PIN, UPDATE=$PIN, DELETE=$PIN, GENERATE=$PIN; |
| 219 | + } |
| 220 | + |
| 221 | + # Certificate template |
| 222 | + EF certificate { |
| 223 | + file-id = 4301; |
| 224 | + structure = transparent; |
| 225 | + acl = READ=NONE, UPDATE=$PIN, DELETE=$PIN; |
| 226 | + } |
| 227 | + EF privdata { |
| 228 | + file-id = 4501; |
| 229 | + structure = transparent; |
| 230 | + acl = READ=$PIN, UPDATE=$PIN, DELETE=$PIN; |
| 231 | + } |
| 232 | + EF data { |
| 233 | + file-id = 4601; |
| 234 | + structure = transparent; |
| 235 | + acl = READ=NONE, UPDATE=$PIN, DELETE=$PIN; |
| 236 | + } |
| 237 | + } |
| 238 | + } |
| 239 | + } |
| 240 | +} |
0 commit comments