File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,11 @@ func encodePIN(pin string) ([]byte, error) {
210
210
if len (data ) > 8 {
211
211
return nil , fmt .Errorf ("pin longer than 8 bytes" )
212
212
}
213
+
213
214
// apply padding
215
+ // 2.4 Security Architecture
216
+ // 2.4.3 Authentication of an Individual
217
+ // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=88
214
218
for i := len (data ); i < 8 ; i ++ {
215
219
data = append (data , 0xff )
216
220
}
@@ -237,7 +241,10 @@ func ykLogin(tx *scTx, pin string) error {
237
241
return err
238
242
}
239
243
244
+ // 3.2 PIV Card Application Card Commands for Authentication
245
+ // 3.2.1 VERIFY Card Command
240
246
// https://csrc.nist.gov/CSRC/media/Publications/sp/800-73/4/archive/2015-05-29/documents/sp800_73-4_pt2_draft.pdf#page=20
247
+ // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=86
241
248
cmd := apdu {instruction : insVerify , param2 : 0x80 , data : data }
242
249
if _ , err := tx .Transmit (cmd ); err != nil {
243
250
return fmt .Errorf ("verify pin: %w" , err )
You can’t perform that action at this time.
0 commit comments