Commit graph

655 commits

Author SHA1 Message Date
grauerfuchs
fc7a78f2d1 Changes requested by @marshmellow42
Added CHANGELOG details for new lf hid commands
Restored basic ARM-side decoding of 26-bit and 35-bit cards
2018-09-13 21:05:11 -04:00
grauerfuchs
53e2f2fad1
Correction to Samyrun offline mode
update to Samyrun offline mode to support changes to HID ARM-side commands

This code has not yet been tested
2018-09-13 06:30:26 -04:00
grauerfuchs
be59094de9 lf hid improvements - encoding and long tag simulation
**DEVICE FIRMWARE UPDATE**
The code changes needed to support long tag emulation required an update to the device firmware. As of this patch, devices running older firmware will not be able to read or emulate HID tags until the firmware is updated. Additionally, devices with the firmware from this update or newer will not properly read or encode HID tags with a prior version client.

The 'lf hid encode' command has been further refined, and is now entirely parameterized to support use of fields other than facility code and card number. The client help data has been updated to show the correct syntax.
2018-08-30 21:01:21 -04:00
marshmellow42
43591e6464 Add Smartcard functions (RDV4.0) (#646)
* allow common makefile options-defines

* remove non-existing file references

* Uncomment lcd option (still) not enabled by default

use Makefile_Enabled_Options.common
to enable lcd if desired.

* Add Smartcard Functions

* add smartcard to menu + make get atr work

sc is now functioning as far as my limited knowledge takes me

* sc cleanup - add init to all sc commands...

because cmds won't work until the first init happens.  (multiple inits
don't appear to affect it negatively)

* default options to exclude Smartcard

for main repo

* update changelog
2018-08-21 05:08:49 +02:00
AntiCat
f684231796 Legic: fixed write (#655)
Due to an oversight the bytes to be written were fetched
from the wrong location. This is fixed now.
2018-08-21 05:08:06 +02:00
AntiCat
da05bc6eca Legic: rewrite reader to use xcorrelation and precise timing (#654)
* Legic: rewrite reader to use xcorrelation and precise timing
 - Even tough Legic tags transmit just AM, receiving using
   xcorrelation results in a significantly better signal
   quality.
 - Switching from bit bang to a hardware based ssc frees
   up CPU time for other tasks e.g. prng and demodulation
 - Having all times based on a fixed ts, results in perfect
   rwd-tag synchronization without magic +/- calculations.
* hi_read_tx: remove jerry-riged hysteresis based receiver
- This feature got obsolete by a x-correlation based receiver.
* Legic: adjusted sampling to new ssp clock speed
- Sampling is 4 times faster and pipeline daly reduced to 1/4.
 The new code samples each bit earyler to account for the
 shorter pipeline. That introduced bit errors by leeking the
 next bit into the current one.
* Legic: average 8 samples for better noise rejection.
* Update CHANGELOG.md
2018-08-20 22:29:34 +02:00
pwpiwi
315e18e66c
ISO15693 device side improvements (#652)
* ISO15693 device side improvements
* increase accuracy by doubling the sample frequency (hi_read_rx_xcorr.v)
* adjust armsrc/iso15693.c and client/cmdhf15.c accordingly
* use more accurate approximation for sqrt(ci^2 + cq^2)
* improve EOF detection (was often mistaken for Logic0, resulting in "error, uneven octet! (extra bits!)")
* hi_read_r_xcorr.v: avoid overflows during accumulation and truncation
* explicitely cast unsigned ADC samples to signed
2018-08-15 14:03:20 +02:00
AntiCat
8ff31e935d fix: 32bit tick timer based on TC0 and TC1 (#653)
TC1 counts the number of TC0 overflows (carry bits).
In random conditions TC1 would return or stay at zero,
instead of counting up. This due to the behavior of the
reset signal.

SAM7S Series Datasheet, 33.5.6 Trigger:
Regardless of the trigger used, it will be taken into account
at the following active edge of the selected clock. This means
that the counter value can be read differently from zero just
after a trigger, especially when a low frequency signal is
selected as the clock.

The new code first prepares TC1 and asserts TC1 trigger and
then prepares TC0 and asserts TC0 trigger. The TC0 start-up
will reset TC1.
2018-08-14 09:24:02 +02:00
marshmellow42
a2937cea8d Separate WITH_LF and WITH_LF_StandAlone 2018-08-06 07:27:37 -04:00
pwpiwi
472345daee
mod hw version: (#631)
* create fpga version info at compile time (by additional functionality in fpgacompress)
* remove hw version caching (prepare USB reconnect)
* fix calculation of available compressed bytes in fpga_loader.c
2018-08-05 18:15:03 +02:00
marshmellow42
5125e4263c allow common makefile options-defines (#635) 2018-08-05 18:13:44 +02:00
pwpiwi
913a54a86a
save 2.3K flash-memory by avoiding a single floating point operation (#630) 2018-07-26 17:18:10 +02:00
pwpiwi
44964fd181
Code cleanup (#616)
* coverity fixes (including a real bug in cmdhftopaz.c)
* Typo fix
* replace TRUE/FALSE by stdbool true/false
2018-06-13 08:13:20 +02:00
pwpiwi
0000a4cda2
fix HitagS simulation erors (issue #605) (#606) 2018-05-11 05:24:02 +02:00
marshmellow42
854fdf15e0 fix bug if -DWITH_ISO14443a_StandAlone is removed from makefile (#598) 2018-05-03 19:36:51 +02:00
James Chambers
b24930c764 mfu read block: retry block with bad CRC (#584)
* mfu read block: retry block with bad CRC, command timeout, or unknown response.
2018-03-23 20:26:30 +01:00
marshmellow42
2896e490d9 update changelog
+fix a comment typo
+ move clear bigbuf after fpgadownloadandgo...
2018-02-14 15:41:39 -05:00
marshmellow42
779d9a0e90 reconfigure lf cmdread ...
to use lf config settings instead of it's own settings.  (now allows
full options of lf config...)

also it will now run `data samples` when the command completes making it
not necessary to run manually...

note: adjusted client wait message as it was confusing.
2018-02-10 17:30:32 -05:00
marshmellow42
61e96805ad add bitbang option to lf cmdread
by setting delay to 0 we can use cmd binary to bitbang the antenna.

note that the timing isn't perfect (especially on the off periods) but
is fairly close. worst i've seen it off is 8us on a large off period.
but i don't have the best test equipment...
2018-02-09 15:51:20 -05:00
Oleg Moiseenko
a37725facf add nested auth decoding to hf mf sniff 2018-02-09 15:50:55 +01:00
pwpiwi
664e132f88 hf mf mifare:
* prevent WDT crash on repeated tries
* comes with faster execution as side effect
* use uint8_t instead of byte_t
* populate ar instead of (correctly) assuming that it is zero
* remove the "will take a few seconds longer" message because it is no longer true
2018-02-08 14:51:24 +01:00
pwpiwi
298e1a2d0d
update license conditions in armsrc/optimized_cipher.[ch] (#554) 2018-01-31 08:14:56 +01:00
Iceman
30bb6d6591
Merge pull request #548 from merlokk/mfsniff_fix
`hf mf sniff` not a small fix
2018-01-17 23:16:08 +01:00
Iceman
af1940a5d8
Merge pull request #546 from pwpiwi/fix_tune
hw tune improvements (based on issue #544)
2018-01-17 16:11:56 +01:00
merlokk
f7887fa82e added magic cards 2018-01-17 16:01:56 +02:00
merlokk
3e77c7a7b4 ignore SELECT ALL 2018-01-17 15:57:24 +02:00
merlokk
543a6ed3c9 SNF_WUPREQ and SNF_SAK harmonized) 2018-01-17 15:48:01 +02:00
merlokk
968cb35498 deleted save UID from card 2018-01-17 14:14:36 +02:00
merlokk
35cc71b075 delete opposite states fix 2018-01-17 14:10:26 +02:00
merlokk
3544b99715 fixed #541 2018-01-16 17:54:54 +02:00
merlokk
feb328c90a hf mf sniff small fix 2018-01-16 14:34:04 +02:00
pwpiwi
d1f9ec06ae
Revert changes in hardnested nonces collection. Sacrifice some speed in favor of stability for some card types (#547) 2018-01-15 15:29:14 +01:00
Oleg Moiseenko
8ec06f5ef3 hf mf sniff: small fixes 2018-01-12 22:37:55 +01:00
pwpiwi
d040cb9024 hw tune:
* scale results to allow higher LF voltages
* remove historic comments
2018-01-12 21:48:42 +01:00
pwpiwi
9b32625c2c hw tune minor fix, comments updated 2018-01-11 08:32:01 +01:00
Iceman
2d51da38f3 HW TUNE adapting for powerful antennas. (#540)
CHG:  'hw tune'  adapting LF measuring from ( >> 8) max 65v,  to ( >>9 ) max 130v in the graph data.   Max LF voltage is 140.8v to measure.

Added a delay for antenna coil and caps to power up before measuring,
removed a variable in ReadAdc
2018-01-10 13:56:27 +01:00
Iceman
6469d5503a
Update lfsampling.c
@marshmellow42 's fix for #514
2017-12-21 07:55:51 +01:00
pwpiwi
fa85b08504 fix iso14a_set_timeout() adjustment 2017-12-11 20:40:09 +01:00
pwpiwi
7c7327e7c8 fix: hf mf hardnested failed with new WUPA timing
* allow additional 2 ssp_frame cycles to detect SOF
* use only respective functions to get/set iso14a_timeout
* remove waiting time in MifareAcquireEncryptedNonces(). This is covered by GetATQA() now.
2017-12-10 19:27:46 +01:00
Iceman
dc93020701 Update fpgaloader.c (#500)
This address part1 in issue https://github.com/Proxmark/proxmark3/issues/499

Device power out 13.56Mhz when started (initialised). This output is not stopped until arbitary command is sent.
2017-11-30 12:46:40 +01:00
pwpiwi
47b78133a0 minor iso14443a timing fixes to avoid select errors:
* take setup frame guard time (SFGT) into account
* adjust iso14a_timeout by FPGA delays
* don't give up on first WUPA. Retry several times
2017-11-22 19:43:12 +01:00
pwpiwi
4058a2d7df
fix: avoid SspClk overflow due to incomplete reset
* should fix watchdog reset during hf mf mifare. Thanks @iceman1001 for the hint.
2017-11-21 07:31:42 +01:00
pwpiwi
db68bcdb06
Complete WTX handling 2017-11-15 07:47:18 +01:00
merlokk
ba4f95b4af added some info from @peterfillmore fork 2017-11-11 23:05:08 +02:00
merlokk
a63505c953 Added work with S-Block WTX in 14a apdu on arm side 2017-11-11 22:56:50 +02:00
marshmellow42
cb593491df fix incorrect variable name
that is what i get for going back over my code and trying to mimic the
naming style used previously...
2017-11-10 16:03:55 -05:00
marshmellow42
217cfb6b29 fix lf search bugs when no tag is on antenna
cotag read could enter endless loop, now cancels if the next bit doesn't
appear

em4x05 detection would loop due to a threshold never being met, now has
a dump out after 1000 samples tested.

fixed some indenting in hitag2 while i was reviewing that code for
potential endless loops...
2017-11-10 15:57:55 -05:00
Iceman
e464f62258
Merge pull request #462 from pwpiwi/fix_hfmfsim
Fix hf mf sim (issue #412)
2017-11-10 18:07:25 +01:00
merlokk
b7d3e89923 changed iso14aapdu arm side and client 2017-11-09 16:39:40 +02:00
merlokk
eb6e8de45d moved includes, added clear_trace flag (it was there...) and fixed multiapdu iso14443 stream 2017-11-03 13:42:38 +02:00