Commit graph

12 commits

Author SHA1 Message Date
Romain Tartiere
8975c60de7 Add some shortcuts. 2010-11-20 22:24:36 +00:00
Romain Tartiere
d05f008e76 Change some numbers with corresponding constants. 2010-11-20 14:19:04 +00:00
Romain Tartiere
a643e9149d Add an offset parameter to mifare_cryto_preprocess_data()
Some cryptographic operations are performed on the whole data frame and not
only the payload with Mifare DESFire EV1.  The solution for now is not perfect,
(one new macro wrapping another big macro) but makes the code a bit easier to
read, and with the MIFARE_DESFIRE macro rewriting as a function (at some point
in the future), the whole should be bearable :-)
2010-11-20 14:10:27 +00:00
Romain Tartiere
3eb8d37d08 Make some more buffer sizes dynamic. 2010-10-29 12:44:12 +00:00
Romain Tartiere
a0b9df6ece Add a block_size parameter to mifare_des(). 2010-10-29 12:34:11 +00:00
Romain Tartiere
356219e21b Require the ivect to be provided to mifare_cbc_des().
- Store ivect in the struct mifare_desfire_tag;
- Reset it before and after authentication;
- Reset before each crypto operation (for now).
2010-10-29 12:22:47 +00:00
Romain Tartiere
87a04904bc Change xor8() to xor() to work with buffers of any length. 2010-10-29 12:07:26 +00:00
Romain Tartiere
13f03a60bb Change rol8() to rol() to work with buffers of any length. 2010-10-29 12:01:57 +00:00
Romain Tartiere
7278740a03 s|append_iso14443a_crc|iso14443a_crc_append|. 2010-10-29 11:07:22 +00:00
Romain Tartiere
7b9242e935 Reindent (2/2).
Align cases with switch statements.
Ça y est!  Le code est beau!
2010-09-03 18:04:12 +00:00
Romain Tartiere
af061a3c1a Reindent (1/2).
After trying to tweak gindent so that it does not mess-up my ASCII art, give
and read the help of Vim to setup 'cinoptions' according to my needs
(cino=t0(0).  This changeset reindent some bits that where not indented as they
should.  A future commit will reindent the switch/case according to my (bad)
taste now that I have setup cindent correctly on my system (cino=t0(0:0).
2010-09-03 18:01:02 +00:00
Romain Tartiere
5779d6f945 Merge the freefare-desfire branch into trunk. 2010-07-26 21:48:18 +00:00