eosledger_test
zeropass / dmrtd Goto Github PK
View Code? Open in Web Editor NEWDart library for reading Biometric Passport
License: Other
Dart library for reading Biometric Passport
License: Other
eosledger_test
I've made sure from passport number DOB and expiration date, but I still haven’t succeed
in this code
final rapdu = await _transceive(
CommandAPDU(cla: cla, ins: ISO7816_INS.EXTERNAL_AUTHENTICATE, p1: 0x00, p2: 0x00, data: data, ne: ne)
);
if(rapdu.status != StatusWord.success) {
throw ICCError("External authenticate failed", rapdu.status, rapdu.data);
}
Always the status != StatusWord.success
Hi and thanks for this project!
Unfortunately, it does not work for German passports. I ran the code, it detects the chip, but then I get an error.
I assume they use PACE and not BAC anymore (even though I think they should be backwards compatible), or am I missing something?
Hello, after cloning I cannot run the project, can you help me? Please..
From documentations I found online , it say mark or signature (digital version of hand written signature) are stored in dg7 data , I know it is optional in some documents , I'm trying to parse the imageData if its present just like in dg2
When we read the DG2, connection is lost even if the document is correctly positioned on the phone (only iOS).
The error is the following:
[CoreNFC] -[NFCTagReaderSession transceive:tagUpdate:error:]:879 Error Domain=NFCError Code=102 "Tag response error / no response" UserInfo={NSLocalizedDescription=Tag response error / no response, NSUnderlyingError=0x280bc6d30 {Error Domain=nfcd Code=29 "Tag Error" UserInfo={NSLocalizedDescription=Tag Error, NSUnderlyingError=0x280bc7540 {Error Domain=com.apple.nfstack Code=20 "No response from tag" UserInfo={NSLocalizedDescription=No response from tag}}}}}
I tested on iPhone 12, 13, 14 with iOS 16.
I also tested on iPhone X and XR and everything's working fine.
Hello
I would like to send an APDU to a device with usb connection and not with nfc. Is it possible with your lib ?
Thx
Hi, I am getting on some documents CommandAPDU status 6988 instead of 9000.
Do you know about this error?
I get the following error. How do I fix it?
_lib/main.dart:563:29: Error: The method 'PlatformButton' isn't defined for the class '_MrtdHomePageState'.
Thanks!
Was trying to build the example app. It works in debug mode, but when trying to run it in profile or release mode it shows the following error:
Command RuleScriptExecution failed with a nonzero exit code
ld: framework not found Flutter
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It seems like it is a consequence of the flutter_nfc_kit dependency, but not 100% sure.
I am receiving the following error log when reading a passport. It works with other apps so I assume that it is not an issue with the passport I am using. What could this issue be related to?
Not the full log:
flutter: icc FINE: 2022-02-17 14:18:29.292117: Transceiving to ICC: C-APDU(CLA:00 INS:B0 P1:00 P2:08 Le:256 Lc:0 Data:null)
flutter: mrtd.sm FINE: 2022-02-17 14:18:29.292228: Protecting APDU
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.292453: header=00b00008
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.292623: data=null
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.292725: Le=256
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.292887: masked APDU header=0cb00008
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.293006: Generated data DO=
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.293149: Generated data DO97=970100
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.293304: Generated M=0cb0000880000000970100
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.293693: Generated N=4af8b0801b9fe1eb0cb00008800000009701008000000000
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.293901: used SSC=4af8b0801b9fe1eb
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.295125: Calculated CC=c2a335e25877dfdd
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.295230: Generated data DO8E=8e08c2a335e25877dfdd
flutter: icc FINE: 2022-02-17 14:18:29.295355: Sending 19 byte(s) to ICC: data='0cb000080d9701008e08c2a335e25877dfdd00'
flutter: icc FINE: 2022-02-17 14:18:29.324454: Received 107 byte(s) from ICC
flutter: icc FINE: 2022-02-17 14:18:29.324789: data='<..redacted...>93963ad39000'
flutter: mrtd.sm FINE: 2022-02-17 14:18:29.325054: Unprotecting RAPDU: sw=9000 data=<..redacted...>693963ad3
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.329571: Generated K=<..redacted...>2900080
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.330052: used SSC=4af8b0801b9fe1ec
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.330334: APDU CC=a8a7551693963ad3
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.330453: Calculated CC=a8a7551693963ad3
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.330644: Decrypting data=<..redacted...>2ef5c2
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.337735: Decrypted data=<..redacted...>3c38800000
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.337933: Decrypted data is padded: true
flutter: mrtd.sm FINER: 2022-02-17 14:18:29.338026: Decrypted and upadded data=<..redacted...>3c38
flutter: icc FINE: 2022-02-17 14:18:29.338224: Received response from ICC: sw=9000 data_len=85
flutter: icc FINE: 2022-02-17 14:18:29.338420: data=<..redacted...>3c3c38
flutter: mrtdeg.app SEVERE: 2022-02-17 14:18:29.339651: An exception was encountered while trying to read Passport: FormatException: Invalid number (at character 1)
^
flutter: nfc.provider FINE: 2022-02-17 14:18:29.340014: Disconnecting
how do i get the photo from nfc to show up ?
[CoreNFC] -[NFCHardwareManager areFeaturesSupported:outError:]:166 XPC Error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.nfcd.service.corenfc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service named com.apple.nfcd.service.corenfc was invalidated from this process.}
Hi,
is there any further progress for supporting PACE authentication with CAN based access key?
Currently there is only BAC, which is slowly becoming deprecated and superseded by PACE.
Hi,
I am trying to read image data from passport. How can i take photos from passport with using dmrtd ? I try to take bytearray from dg2 and transform to image with using Image.memory(bytes) but it doesnt work. İt give wrong data error. İs it another data in dg2 other than faceimages ?
Here is my code to read passport data using NFC:
final nfc = NfcProvider();
try {
await nfc.connect(iosAlertMessage: "Hold your iPhone near Passport");
final passport = Passport(nfc);
nfc.setIosAlertMessage("Reading EF.CardAccess...");
final cardAccess = await passport.readEfCardAccess();
nfc.setIosAlertMessage("Initiating session...");
final bacKeySeed = DBAKeys(
"AB6613787",
DateTime(1998, DateTime.august, 17),
DateTime(2027, DateTime.april, 21));
await passport.startSession(bacKeySeed);
nfc.setIosAlertMessage("Reading EF.COM...");
final efcom = await passport.readEfCOM();
nfc.setIosAlertMessage("Reading Data Groups...");
EfDG1? dg1;
if (efcom.dgTags.contains(EfDG1.TAG)) {
dg1 = await passport.readEfDG1();
}
EfDG2 dg2;
if (efcom.dgTags.contains(EfDG2.TAG)) {
dg2 = await passport.readEfDG2();
}
// You can read other data groups similarly
nfc.setIosAlertMessage("Reading EF.SOD...");
final sod = await passport.readEfSOD();
// You can print or display the data groups as you wish
print(dg1?.mrz);
// print(dg2.);
} catch (e) {
print("as87das: $e");
// Handle errors
} finally {
await nfc.disconnect();
}
This line: final cardAccess = await passport.readEfCardAccess();
Gives this error in catch: Security status not satisfied
Hello, thanks for the great code ! The code works perfectly for me in android, I need to build a desktop app to read passport using external NFC reader. Which type should I buy please ? And how to do it ? Thanks in advance ❤️
Hi. Is there any plan to support the EfSOD?
Code which parses AAPublicKey from bytes is missing multiple throw
specifiers at places throwing EfParseError
: https://github.com/ZeroPass/dmrtd/blob/master/lib/src/crypto/aa_pubkey.dart#L36-L62.
TODO: Replace EfParseError
exception with general parser exception and catch & re-throw this exception inEfDG15 as EfParseError
.
I read data with project (EFSOD,EFCOM,EF.DG1 ....) but I can't convert them to string.. can you help me ?
for example :
Hex : 6c1f5c025f195f1918c4b0c387c4b0c59e4c4552c4b02042414b414e4c49c49e49 converted
Text : l�\�_�_��İ�İ�LERİ BAKANLI�I
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.