Romain Tartiere
07c5c78a8e
Fix wrong variable usage.
2012-05-14 13:58:06 +00:00
Romain Tartiere
fe5e7f3016
Fix signed/unsigned comparison.
2012-05-14 13:57:20 +00:00
Romain Tartiere
3a0b70c8a9
Fix Mifare Ultralight C card detection routine (Fixes Issue 86).
2012-03-01 17:42:57 +00:00
Audrey Diacre
4f0227ddcb
update to use libnfc's trunk
2012-01-25 09:58:16 +00:00
Romain Tartiere
3ab44974ca
Fix inconsistencies in man pages (missing quotes, typos).
2012-01-15 11:07:32 +00:00
Romain Tartiere
68ef944cd0
Make freefare_tag_new() public (Fixes issue 64).
2011-09-29 14:10:07 +00:00
Romain Tartiere
0a7ce855b8
Sync w/ libnfc-1.5.1.
2011-09-22 13:05:07 +00:00
Romuald Conty
bb113d5b28
Minor TLV manpage fix.
2011-09-22 10:15:18 +00:00
Romain Tartiere
0339fb51f4
Enable WITH_DEBUG for Windows (Fixes issue 65)
...
PR: Issue 65
Submitted by: glenn.ergeerts
2011-06-27 18:34:07 +00:00
Romain Tartiere
0abe2c9d66
Indent after last commit.
2011-04-24 11:47:33 +00:00
Romain Tartiere
35b87d4acd
Merge CRC location / verification in mifare_cryto_postprocess_data().
...
Fix issue 52.
2011-04-24 11:43:07 +00:00
Romain Tartiere
de64cce14c
Add Microsoft Windows support.
...
Update issue 62
Status: Feedback
Gleen, I slightly modified your patches to better stick with the style of the
rest of the project, Can you please confirm that it does not break?
PR: Issue 62
Submitted by: glenn.ergeerts
2011-04-24 10:21:03 +00:00
Romain Tartiere
0f32259ee2
Return error if something bad happen in mifare_cryto_preprocess_data() / mifare_cryto_postprocess_data().
...
Fixes issue 60.
PR: Issue 60
Submitted by: ervin.kaljola
2011-04-23 16:01:05 +00:00
Romain Tartiere
ec16eb5572
Fix mifare_desfire_create_value_file().
...
Fixes issue 59
Committed, thanks!
PR: Issue 59
Submitted by: ervin.kaljola
2011-04-23 15:31:45 +00:00
Romain Tartiere
52e1c90425
Enhance the mifare_cryto_postprocess_data() function.
...
Update issue 52
Both code snippets are now similar and it should be possible to merge them
together.
2011-04-23 15:17:11 +00:00
Romain Tartiere
573fc1b778
Implement mifare_ultralight_write() using macros.
...
Update issue 58
I can't reproduce this bug, but saw that the mifare_ultralight_write() was
implemented in an old-school way. I updated the code so that you should have
better traces when compiling the library in debug mode and running:
romain@marvin ~/Projects/libfreefare % cutter -n test_mifare_ultralight_write test
===> 0000 30 07 |0. |
<=== 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
===> 0000 a2 07 12 34 56 78 |...4Vx |
===> 0000 30 07 |0. |
<=== 0000 12 34 56 78 00 00 00 00 00 00 00 00 00 00 00 00 |.4Vx............|
===> 0000 a2 07 aa 55 00 ff |...U.. |
===> 0000 30 07 |0. |
<=== 0000 aa 55 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 |.U..............|
===> 0000 a2 07 00 00 00 00 |...... |
===> 0000 30 07 |0. |
<=== 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
.
Finished in 0,548238 seconds (total: 0,069079 seconds)
1 test(s), 12 assertion(s), 0 failure(s), 0 error(s), 0 pending(s), 0 omission(s), 0 notification(s)
100% passed
2011-04-05 21:05:27 +00:00
Romain Tartiere
b6cbeb2e20
Fix invalid test.
2011-03-26 13:50:21 +00:00
Romain Tartiere
f27352180c
Complete ISO 7816 compatibility for Mifare DESFire EV1
...
Fixes issue 37
2011-03-26 13:22:48 +00:00
Romain Tartiere
b41f93cd5b
Start support of ISO files for Mifare DESFire EV1.
...
Fixes issue 57
New API functions:
* mifare_desfire_create_application_iso()
* mifare_desfire_create_application_3k3des_iso()
* mifare_desfire_create_application_aes_iso()
* mifare_desfire_get_df_names()
Plus unit test to check this.
2011-03-25 16:49:36 +00:00
Romain Tartiere
c7dc9f0ccc
New API functions mifare_desfire_create_application_3k3des(), mifare_desfire_create_application_aes().
...
Update issue 37
Only ISO application creation as requested by Issue 57 is lacking now.
2011-03-25 13:00:24 +00:00
Romain Tartiere
db489b6cb7
R is const.
2011-02-23 15:08:47 +00:00
Romain Tartiere
22e9854995
Do not abort on crypto error.
...
Because in some circumstances the crypto is skipped regardless of the
communication settings by the Mifare DESFire (e.g. when reading a file which is
writable with any key), do not abort if the crypto fail, and make it possible
to the user to catch such an event to fix his code accordingly.
Only display crypto diagnostic if compiled with debug support.
2011-02-13 14:13:35 +00:00
Romain Tartiere
7c8c818a08
Fix mifare_classic_transfer() with some readers.
2011-02-13 12:50:41 +00:00
Romain Tartiere
d9ed7f2c24
Fix CRC localisation code.
...
New issue
Summary: Add regression tests for CRC location in encyphered data files.
The CRC position location code in mifare_cryto_postprocess_data() shall be
checked.
new issue
Summary: Rework mifare_cryto_postprocess_data() CRC localisations
The function has two different implementation of the same feature: locate a CRC
at the end of a decyphered stream and check it. The crc32 will fail if the
last CRC byte is 0x80, and the crc16 code looks awful. A refactoring would
make our life easier.
2011-01-01 15:27:36 +00:00
Romain Tartiere
f418845fb4
Make mifare_desfire_authenticate() a bit more magic.
...
If the provided key is a 3K3DES key, authenticate in ISO mode. If the key is
an AES one, authenticate in AES mode. This sugar should help third party
applications to handle authentication in a more generic way.
2010-12-31 12:47:55 +00:00
Romain Tartiere
c2cc0ba53d
Move away global variables.
2010-12-31 10:53:05 +00:00
Romain Tartiere
899ed3d7bb
Fix create_file2().
...
ECOPYPASTETOOFAST | EBADLUCKITSVALID: The argument communication_settings is
not to be used to construct the parameters passed to the crypto functions
mifare_cryto_preprocess_data() & mifare_cryto_postprocess_data(), but only for
building the frame.
2010-12-29 22:18:30 +00:00
Romain Tartiere
8caa2da31e
Fix write_data() return value when data is enciphered.
...
We only have to return the number of bytes of raw data which are sent.
2010-12-29 22:05:08 +00:00
Romain Tartiere
2750ed668c
Fix usage of a potentially reallocated memory area.
2010-12-29 21:44:26 +00:00
Romain Tartiere
f19d9bd05f
Fix parenthesis position.
2010-12-28 11:42:24 +00:00
Romain Tartiere
82a7b8df66
Merge de libfreefare-ultralight branch into trunk (Mifare UltraLightC support).
2010-12-28 11:30:31 +00:00
Romain Tartiere
e4057ef163
Update man pages.
2010-12-26 15:46:07 +00:00
Romain Tartiere
06c052db36
Detect Mifare DESFire targets with more than one historical character.
2010-12-24 22:14:56 +00:00
Romain Tartiere
9a4b7b5882
New API function mifare_desfire_set_ats().
2010-12-24 22:08:56 +00:00
Romain Tartiere
58f64b881e
Simplify redundant code.
2010-12-24 22:08:15 +00:00
Romain Tartiere
adbba0342b
New API function mifare_desfire_set_default_key().
2010-12-24 20:41:43 +00:00
Romain Tartiere
e587e26aeb
Rename some internal functions.
...
A function with DES in its name that can perform AES crypto is somewhat
disturbing.
2010-12-24 14:10:44 +00:00
Romain Tartiere
4c3f0cd7d0
Sync man pages.
2010-12-24 13:34:25 +00:00
Audrey Diacre
29c8ef5c07
replace last deprecated bzero function by memset.
2010-12-24 13:33:02 +00:00
Romain Tartiere
417052fb2f
Create forgotten man pages symlinks.
2010-12-24 13:24:13 +00:00
Romain Tartiere
01fff97d6c
Add support for ISO authentication with 3DES keys.
2010-12-24 13:04:16 +00:00
Romain Tartiere
8d492abf5d
Change the enciphered_data_length() internal function prototype.
2010-12-24 12:38:52 +00:00
Romain Tartiere
0d8a53308c
Change the mifare_cbc_des() internal function prototype.
2010-12-24 11:41:15 +00:00
Romain Tartiere
dd5156a997
Reindent.
2010-12-18 13:32:05 +00:00
Romain Tartiere
b300ef5fcf
Update the MifareDirection structure for consistency.
2010-12-18 03:11:05 +00:00
Romain Tartiere
ebd98b32e0
Switch from obscure 'int mac' argument to 'MifareCryptoOperation operation'.
2010-12-18 03:07:16 +00:00
Romain Tartiere
683cbdf64f
Rename mifare_desfire_authenticate.c to mifare_desfire_crypto.c.
2010-12-18 02:50:38 +00:00
Romain Tartiere
d098bf623f
Add support for authentication using 3K3DES.
...
Please note that according to the NXP documentation of the Mifare DESFire EV1,
the mifare_desfire_authenticate_iso() function can be used using either 3DES or
3K3DES keys. The former has not been tested yet and is likely not to work. To
word it differently, this is a 3K3DES crypto support, not a ISO authentication
support...
2010-12-18 02:28:27 +00:00
Romain Tartiere
f06b0ac5d3
Ignore the status code when deciphering (3)DES data.
2010-12-18 02:14:51 +00:00
Romain Tartiere
373cb4f0ef
Rewrite some tests using switch statements.
...
Add a note for the reason I do this in the HACKING file.
2010-12-18 02:07:56 +00:00