VDR Plugin 'sc' Revision History
--------------------------------

09.12.2005: Version 0.5.3
- Added Nagra2 EMM support and EMM caching to cardclient newcamd.
- Added Cryptoworks EMM support and EMM caching to cardclient camd35.
- You may now add multiple CAID fields to cardclient.conf. A valid line woule be
  e.g. camd35:192.168.0.1:20248:1/1702/FF00,0604,0d0c/FF00:hero:itsme
- Added support for systems which broadcast ECM on tables other than 0x80/0x81.
- Added support for Nagra2 BEV & dual IDEA opkeys (00/10).
- Now reading CAID from Cryptoworks smartcard.
- Added sanity check to nano sorting to prevent memory trashing.
- Added new CAID nano to cardclient Radegast ECM request.
- Fixed Cryptoworks shared EMM parsing. Added additional checks to reduced EMM
  load too.
- Fixed smartcard Irdeto camkey challenge for Premiere S01 and other non-Z
  cards. As these cards don't support the RSA challenge, you don't need a
  certificate for them.
- Fixed matching Irdeto certificates which are given with ACS version only.
- Fixed misleading error messages in smartcard.conf parser.
- Fixed ECM-EMM caid mismatch and segfault due to leftover debug statements in
  cardclient camd35.
- Fixed (i.e. removed) global cardclient EMM cache as it corrupts EMM merging
  for systems which broadcast shared updates on different tables.
- Fixed cardclient newcamd segfault on bad config data.

12.11.2005: Version 0.5.2
- Introducing a new config file for smartcard specific data e.g. RSA certificate
  or box keys. The file is called smartcard.conf. See the example file.
- Added support for full camkey challenge in smartcard Irdeto. You need a RSA
  certificate matching your card (either Irdeto default or card specific one) in
  smartcard.conf or your card won't work!
- Added an abstract layer to parse and assemble EMM messages. This touches
  several systems e.g. Viaccess, Cryptoworks & NDS. A bug here may break them
  all.
- Added Cryptoworks & Viaccess EMM handling to newcamd cardclient (via new
  assemble code).
- Added some more MAP math calls to Nagra emulation to fix Rom10 AU.
- Several fixes to NDS EMM parsing/assembling.
- Fixed ConstCW key lookup (was broken due to Nagra1/2 key handling changes).
- Fixed cardclient camd3 to include SID in ECM request.
- Fixed cardclient newcamd to handle NULL-cw which are send by newcs.
- Removed logger option 'non-recording on' from the config. In 0.5.x it is
  without function anyways.
- Added a message to hint the user about unusual values in ScCaps. Changed the
  default values to something more reasonable too.
- Updated FFdecsa patch to 0.1.2 (fixing a segfault).

13.10.2005: Version 0.5.1
- Added smartcard Cryptoworks EMM handling. There is a setup option to disable
  the parental rating on the card too (experimental). Thanks to scotty for the
  sample code.
- Added smartcard Viaccess EMM handling (experimental).
- Added FFdecsa-0.1.1 patch.
- Don't count a live stream on a FF card when deciding about allowed
  concurrency. A live stream doesn't use bandwidth on the bus.
- Apply min. ECM processing time to Nagra2 too.
- Fixed segfault for Seca1.
- Fixed Irdeto key updates. Somehow/sometime the code was broken.
- Fixed cardclient newcamd NDS EMM (still experimental).
- Now considering the key size when superseding keys.
- Forgot to mention that you need additional table files for Seca 6a (s2_sse.bin
  5120; s2_sse_006a.bin 336; s2_cw_006a.bin 512 (Numbers are the filesize)).
- Updated finnish translations.

15.09.2005: Version 0.5.0
- Forked development branch.
- Added concurrent recording feature i.e. record/view multiple encrypted
  channels on a single DVB card. This also works on a full-featured DVB card!
  To make this feature work you NEED:
  on a BUDGET card:
    * SoftCSA version 0.1.0 or greater
  on a FULL-FEATURED card:
    * a DVB driver patched with dvb-cwidx.diff
    * a specialy patched firmware. The "normal" patched firmware doesn't work!
  See further details in the README.
- vdr-sc patch has been updated. This plugin version ONLY works with this patch!
  Older plugin versions doesn't work with this patch, although they may compile
  fine!
- Dropped compatibility for older VDR versions. Requires VDR version 1.3.29 or
  newer.
- Changed card & provider handling in cardclient camd35 (experimental).
- Added NDS support to newcamd cardclient (experimental).
- Added limited Seca 6a support.
- Fixed mismatching Nagra1 & Nagra2 keys.

------------------------------------------------------------

31.10.2005: Version 0.4.11
- Backported from 0.5.1:
   * Fixed segfault for Seca1.
   * Fixed Irdeto key updates.
   * Now considering the key size when superseding keys.
   * Updated finnish translations.

24.09.2005: Version 0.4.10
- Apply min. ECM processing time to Nagra2 too.
- Backported from 0.5.0:
   * Fixed mismatching Nagra1 & Nagra2 keys.
   * Limited Seca 6a support.

10.09.2005: Version 0.4.9
- Fixed cardclient camd35 to include provider ID in ECM request.
- Fixed Nagra2 padding 2nd RSA and CW swap for NA.
- Fixed compiling issue in Nagra code on older VDR versions.
- Fixed compiling issue in IDEA code if a recent openssl but without IDEA is
  installed.

04.09.2005: Version 0.4.8
- Added Nagra2 code. See example keyfile for key format.
- Fixed coredump in ECM delay feature.
- Fixed buffer overflow in cardclient camd35.
- Fixed setting serial IO speed for smartcard access.
- Now truncating all key printouts in the debug log.

18.08.2005: Version 0.4.7
- Fixed compatibility issue with camd 3.7x.
- Fixed switching to FTA while card is replaying.
- Changed decoding, so that if the decoding fails consecutively, further
  processing is delayed until the next parity change.
- Fixed ECM card response parsing in smartcard Conax.
- Added some generic ECM/EMM parsing.
- Updated finnish translations.

20.06.2005: Version 0.4.6
- Added EMM support for smartcard Conax.
- Added EMM support to Newcamd client.
- Fixed EMM card command in smartcard Seca.
- Fixed Camd Cmd05/Cmd06 offsets.
- Now really fixed canceling netwatcher thread.

25.05.2005: Version 0.4.5
- Fixed Nagra key update issues.
- Added support for the new Camd Cmd05/Cmd06. Thanks to Dukat for the example.
- Added support for broadcasts without ECM data (only if system delivers
  constant CW). Based on Ragnos patch.
- Fixed ca.cache handling if ECM PID changed since entry was created.
- Fixed Radegast client to work with shared Seca cards.
- Fixed netwatcher cancel timeout.
- Now using unaligned.h in cDes to prevent unaligned memory accesses on
  architectures which doesn't support them (e.g. Alpha).

07.02.2005: Version 0.4.4
- Now caching CA descriptor data to speed up intial sync for systems which
  depend on this data (e.g. Seca).
- Fixed Nagra EMM code to handle additional nanos in front of cpu updates.
- Fixed Seca RSA for short decrypt results.
- Fixed Viaccess EMM assemble buffer size.

21.01.2005: Version 0.4.3
- Added Seca2 nano 5109 handling. You need special RSA keys for this. See
  example keyfile.
- Increased wait timeout for ECM extra data.
- Fixed Seca permtables. Thanks to millemila.
- Fixed Seca SHA1 signature. Thanks to BB.
- Fixed return length position in Newcamd cardclient. Thanks to cart.

10.01.2005: Version 0.4.2
- Added workarounds for changes in vdr 1.3.18.
- Fixed comparision of BIGNUM keys (Nagra, but not only Nagra).
- Fixed cCondWait calls for vdr before 1.3.13.

23.12.2004: Version 0.4.1
- Added constant-CW system, CONSTCW=1 to activate. See example keyfile for CW
  key format.
- Added support for Viaccess TPS crypt v2. You need a suitable TPS key for your
  provider. See example keyfile. 
- Added support for v5.25 protocol in Newcamd cardclient (with fallback to old
  protocol).
- Added support for Nagra RSA key updates (high system id only). You need a
  proper eeprom file for this to work.
- Now delaying first access to smartcards until the cards are initialised. 
- Fixed Seca code which though it has a correct decode while it hasn't.
- Fixed several minor issues in Nagra code.
- Fixed CA descriptor parsing for sc-viaccess and cardclients.
- Fixed cardd client to send network message of at least 96 bytes.
- Fixed inline asm macros to be used only on x86 CPUs.
- Replaced non-reentrant libc functions with their reentrant counter part.
- Replaced usleep() calls with proper cCondWait calls (vdr 1.3.x only).

26.10.2004: Version 0.4.0
- Versions bump, now in stable branch.
- Added Viaccess smartcard code, SC_VIACCESS=1 to activate. ECM only for now.
- Added ragnos Sc-Seca-PPV patch.
- Added zens FullX-2 patch.
- Added permtable for Seca provider 0x65.
- Added cardclient config option to trigger immediate connect to cardserver on
  startup.
- Extended smartcard code to support indirect convention, zero-byte writes and
  256-byte reads.
- Fixed Nagra plaintext AU.
- Fixed camd33 reconnecting and discard keep-alive packets.
- Removed unnecessary bind() in udp networking (allows camd35 server on same
  machine).
- Fixed disconnect timeout not working if no dial script is given.
- Updated finnish translations.

------------------------------------------------------------

26.09.2004: Version 0.3.17
- Joined "dukat" & "freezer" cardclients to new "camd33" client.
- Added cardclient "camd35", supporting camd 3.5 udp protocol.
- Added caid & mask to cardclient config. Added carddata (hexbase, hexser) to
  Aroureos cardclient config. See example cardclient.conf.
- Fixed Viaccess logger (wrong section filter mask).
- Fixed dialup networking not hanging up in case of connect error.

14.09.2004: Version 0.3.16
- Now supporting all Nagra keysets (pk0-2,typ0-1). Keyformat has changed. See
  example keyfile.
- Fixed some long standing bugs in Nagra ECM handling. Verify keys (V) are
  mandatory now, 80 keynumber is obsolete. Note: you need both keysets for a
  provider, e.g. for Polsat 7001 & 7101.
- Added support for Seca provider 0x65 (appropriate hash/mt files needed).
- Added finnish translations.
- Fixed key length mismatch on EMM update for 8/16 byte keys.
- Fixed sc-cryptoworks ATR parsing for cards with bios3mod.
- Fixed stupid typo bug in sc-Irdeto which prevented EMM updates at all
  (introduced in .13), fixed potentional buffer overflows.
- Fixed Seca to really loop through all available keys (with same key nr).
- Several compatibility fixes for 64-bit systems.

07.08.2004: Version 0.3.15
- Unified Seca, Viaccess & Nagra DES implementation.
- Added CAID parsing to dukat cardclient.
- Added support for 16-byte Seca keys.
- Added Seca2 0064 51 nano processing.
- Attempt to fix cardclient EMM update problem (appearently AES related).
- Fixed Nagra CPU emu (random generator).

23.07.2004: Version 0.3.14
- Fixed Seca2 nano processing (Thanks to Sandali for new permutation values).
- Fixed missing CAT parsing in Viaccess logger.
- Fixed logger debug output (cardNum vs. CardNum()).
- Fixed error-case memory leak in Nagra file mapper.

01.07.2004: Version 0.3.13
- Added Viaccess2 algo. Note that you need 16-byte keys for Viaccess2.
- Added extended Seca2 nano handling.
- Added provider based addressing and Irdeto2 support in common cardclient.
- Added local caching of ECM/EMM messages to reduce cardserver load.
- Major code restructure to unify system & logger code.
- Fixed reconnecting to server in newcamd client.
- Some changes for gcc 3.4.x compatibility.

06.06.2004: Version 0.3.12
- Added new Seca2 nano handling. Thanks to Nightshad.
- Added some glue for VDR 1.3.7+ compatibility.
- Major code rewrite in cardclient. Use CARDCLIENT=1 to activate. Configuration
  of cardclients has changed completely. See README.
- New network code supporting on demand dialup networking.
- Added Radegast and Newcamd client.
- Added minimum processing time to Nagra ECM code (emulates card processing time
  in case timing depends on this). Configurable from the setup menu (0=disabled).
- Fixed Nagra EMM tester code for DISH and ROM10/11 OTP size.
- Fixed some possible table overflows in Seca code.
- Fixed processing of short blocks in Conax code.
- Fixed FTA switch in case VDR shortly interrupts a recording (e.g. when
  changing PIDs).

07.04.2004: Version 0.3.11a
- Fixed Seca2 segfault on mask table access.
- Now flushing ECM filter buffers on error.

02.04.2004: Version 0.3.11
- Added Seca2 support. Openssl and mask/hash table files needed. See README.
  Seca1 compatiblility not yet tested. Thanks to Nightshad.
- Added fix for Nagra ROM11 and plain key updates.
- Using multiple threads to read from PID filters. Prevents that high-latency
  systems (like smartcards) block out other systems.
- Remember the system name in ca.cache and use this system first later on.
  Prevents delays for low-priority systems if ECM is cached.
- Fixed smartcard Seca PBM checking for cards which doesn't support the needed
  card command.
- Fixed network timeout and flushing read buffer in cardserver client.
- Fixed transponder handling for VDR 1.3.x (frequency vs. transponder).

22.02.2004: Version 0.3.10
- Added cardserver client (Streamboard client). EMM transfers are disabled at
  the moment. Contributed by S.Laurel.
- Added support for Conax smartcards. Thanks to Nightshad.
- Added provider based addressing for EMM updates in Irdeto smartcard.
- Added commandline option to support card reader with reverse reset line (-R).
- Added make option to add a smartcard default port (DEFAULT_PORT).
- Reworked plugin setup menu. Added separate status page. Added smartcard
  information page (press OK on the smartcard interface line).
- Added code to allow system specific setup options.
- Fixed off by one error and more mixed up arguments in Seca1 decryption.
- Fixed typos in Viaccess logger debug statements.

05.02.2004: Version 0.3.9
- Fixed memory initialisation in Nagra cardemu.
- Fixed filedescriptor leak in Nagra ROM mapping code.
- Fixed MECM XOR table if there are less than 64 bytes. Thanks to Vlinders.
- Fixed off by one error in (unused) smartcard Irdeto camcrypt code.
- Fixed mixed up function arguments in Seca1 decryption.
- Fixed Viaccess logger for ViaSat and TPS shared updates. Note that the format
  of the Viaccess.KID file has changed (SA added). Thanks to Nightshad.
- Changed default make options. Irdeto, Seca & Viaccess systems aren't compiled
  by default anymore. Use IRDETO=1 SECA=1 VIACCESS=1 for old behaviour.

18.01.2004: Version 0.3.8
- Several improvements to the Nagra code (Cardemu, MECM). Completely new
  layout, no more libnagra. Now you need some Eeprom files and the location for
  the ROM files has changed. See README file.
  Thanks to Nightshad, BB and their friends.
- Fixed Irdeto smartcard EMM command creation for PW. Also don't overrun the
  card with ECM requests in case of not subscribed/expired channel.
- Reworked Seca, Viaccess and Irdeto crypto code. No more libmgcam.
- Added commandline option to detect smartcards in readers with reverse CD.
- Added a SC patch for vdr 1.3.1 and some glue to the plugin. See README for
  notes about 1.3.1 support.

13.12.2003: Version 0.3.7
- Several Nagra auto-update fixes. Thanks to Nightshad.
- Fixed Irdeto smartcard EMM path. Thanks to Scotty.
- Fixed wrong behaviour in case of transfer mode.
- Added support to load Nagra ROM extentions (needs ROM?ext.bin files).
- Now checking PBM and date in Seca smartcard. Fixed card status for EMM
  updates. Thanks to Nightshad.
- Added a VDR patch to prevent SC activation during EPG scans.
  Contributed by Andy.
- Changed CICAM handling. SC activation is now more channel base.
  Note: you have to update your config! See README file.

8.11.2003: Version 0.3.6
- Added support for Irdeto smartcards (e.g. Premiere). Thanks to Scotty.
- Added smartcard insert/remove detection, card auto-initialisation and support
  for multiple card interfaces.
- Enhanced smartcard ISO functions (e.g. 0x60 handling, ATR parsing).
- Fixed smartcard Cryptoworks (V3 ATR, serial timeout).
- Fixed Nagra ROM10 emu (Cabo 4801).
- Fixed saving ECM values to ca.cache.
- Fixed removing of cached ECM entries so that only really failed entries are
  removed.

24.10.2003: Version 0.3.5
- Fixed Nagra cardemulator (MUL bug, OTP area, etc). Thanks to BB & Nightshad.
- Added handling for ROM specific Nagra keys. See examples/Softcam.Key.
- Fixed display of used Nagra key in the OSD.

18.10.2003: Version 0.3.4
- Added EMM logger in sc-Seca to auto-update card data. Works for Seca2 cards
  too. Thanks to Nightshad.
- Added cardemulator to execute ROM code for improved Nagra key updates. Thanks
  to BB & Nightshad. Probably there are still some issues with providers which
  require seperate keys for EMM processing. This will be addressed in the next
  release.
- Now removing old, failed ECM entries from the cache.
- Fixed possible race condition in Nagra rom locking.
- Fixed memory leaks in Nagra & Conax code (BIGNUM handling).

18.07.2003: Version 0.3.3
- Allow new keys to supersede/invalidate older keys (only for systems with
  unique key identifiers; for now all beside Irdeto & @SHL). This should fix
  Viaccess key updates.
- Made Viaccess loop through all available keys while decrypting.

05.07.2003: Version 0.3.2
- Added some information about @SHL to the README.
- Cleaned up @SHL code. Now supporting multiple keys in keyfile, no need to
  uncomment unused keys.
- New code for hex dumping of incoming data (see common.h for activation).
- Excluding a range of potentional "fake" ECM pids for Viaccess system. Does
  this affects any valid channel?

24.06.2003: Version 0.3.1unstable
- Completely new section filter handling.
- Restructure of the logger code (will allow EMM processing for smartcards).
- Reworked Viaccess logger. Thanks to BB & Nightshad.
- Added @SHL (SkyCrypyt) support. Thanks to Nightshad and his friends.
- Fixed writing duplicate ecm entries into cache file.
- Fixed SoftCSA activation (was broken in 0.3.0, 0.2.x is fine).
- Fixed saving Viaccess keys with odd digit count.
- Fixed leaving a locked mutex in CAM setup.
- Fixed crash in smartcard setup if no serial device was given.
- Added examples files to show file formats.
- Added system specific Makefile's (*.mk).
- Added french translations.

25.05.2003: Version 0.3.0unstable
- Forked 0.3.x unstable branch.
- Major restructure of CA system code.
- Added Viaccess logger. Requires Viaccess.KID. Thanks to BB for providing
  the sample code.
- Generalized smartcard code. Use new plugin commandline option -s to set
  serial port. Use setup menu to select card type.
- Now supporting Seca smartcards. Another big thanks to Nightshad.
- Reworked Cryptoworks smartcard code. Please report working status.

------------------------------------------------------------

29.05.2003: Version 0.2.2
- Added patch for vdr 1.1.32/33.
- Added french translations. Thanks to Piout.

14.05.2003: Version 0.2.1
- Adapted to the changes in (and now also requires) VDR 1.1.31.

05.05.2003: Version 0.2.0
- Some code cleanup.
- Fixed Nagra key saving.
- Added Greek translations. Thanks to Aroureos.
- Stable release version. A new development branch will fork soon.

27.04.2003: Version 0.2.0rc1
- Added patch for vdr 1.1.29

24.04.2003: Version 0.1.13
- Rescanning CaDescr from time to time in case that we initialy got some
  descriptors but are unable to find a valid key with them.
- Some more Cryptoworks fixes.
- Fixed BN bug in Nagra RSA code.
- Newbie protection: actively checking required VDR version and some patch
  versions.
- Adapted to the changes in (and now also requires) VDR 1.1.28. Timeshifting of
  encrypted channels works. You must use a patched LL firmware for this feature,
  the -icam firmware won't allow timeshift.

14.04.2003: Version 0.1.12
- Changed debug messages to avoid confusion between loaded keys and loaded
  cards *sigh*.
- Now using VDR internal functions to get the ECM pids. This requires VDR 1.1.27
  to work. Note also, that there is a new sc patch for VDR 1.1.27.
- Make the ECM cache take care of the fact that the SID may not be unique (now
  matching for source & transponder too).
- Cleanup of Nagra code (now in libnagra). Got rid of the miracle stuff, now
  using libcrypto (openssl) here too. Big thanks to Nightshad.
- Added (untested) Nagra BEV/DISH support.

21.03.2003: Version 0.1.11
- Fixed segmentation fault on plugin exit (stupid: static initialization of
  list members is a no-no).
- Increased timeout for reading PAT.
- Some fixes to the Cryptoworks code. Hope this works better. No testing here.

03.03.2003: Version 0.1.10
- Improved "stop logger" with transfer mode. Disabled this feature for budget
  cards. They don't crash with logger enabled.
- Fixed stopping sc processing if a transfer mode ends.
- SoftCSA now available as separate archive.

19.03.2003: Version 0.1.9
- Fixed Nagra MECM handling.
- Logger is stopped when a transfer mode is detected, too.
- Experimental SoftCSA support. See README for setup instructions. Thanks to
  emumensch for the initial version.

31.01.2003: Version 0.1.8
- Fixed Conax decoding and key handling.
- Fixed Nagra key strings which havn't been NULL terminated.
- Fixed loading SoftCam.Key with Nagra/Conax keys if one or both have been
  disabled at compile time.
- Fixed long standing bug in FastKey().
- Added Nagra logger. No need for a Nagra.KID, the keys should still be in
  SoftCam.Key if you are able to watch Nagra channels. Thanks to Nightshad.

15.01.2003: Version 0.1.7
- Switched to Conax code from mgcam_20030114 (much shorter). You must have
  installed libcrypto (part of openssl). This fixes the Conax linking problem in
  0.1.6 too.
- Nagra & Conax keys are now loaded from SoftCam.Key too. See README for format.

14.01.2003: Version 0.1.6
- Fixed Viacess code for NTV and TPS crypt (mgcam_20021123).
- Extended setup option for logger. Logger can be stopped during recordings as
  soon as a valid key is found. Is this more stable?
- Fixed a compile error in Nagra code (miracl.h).
- Switched Cryptoworks support to libcwemu. Serial line detection is now in the
  main Makefile, see ISO_TTY. CRYTOWORKS=1 to enable.
- Added Conax support, based on lincardemu0.1.9n and some adaptions to mgcam
  found on the net. Thanks to all the guys for their work. CONAX=1 to enable.
- Fixed PMK update in Irdeto logger.
- Updated card data is also written to ca.cache now. The ca.cache format has
  changed for this. The old format is converted automatically.
- Changed detection of fake channel id's.
- Improved filter settings and paket reading.

16.11.2002: Version 0.1.5
- Adapted to the changes in vdr 1.1.15. Now requires vdr >=1.1.15 and HEAD
  driver.
- Added Cryptoworks support together with original cards and a cardreader with
  Phoenix ISO interface at the serial line. Add CRYPTOWORKS=1 to enable. (see
  libmgcam/cryptoworks.c for serial line selection).
- Remove xor/firmware hacks (not needed anymore).

28.10.2002: Version 0.1.4
- Adapted to the changes up to vdr 1.1.14 and the new HEAD DVB driver.
- Added option to setup menu to reload config files.
- Added code to detect fake channel id's on primafila.
- Minor logger fixes.

28.09.2002: Version 0.1.3
- Now compiles with vdr 1.1.9+.
- Cleaned up Viaccess code.
- Added Seca logger.
- Fixed switching back to a FTA channel after recording.

09.09.2002: Version 0.1.2
- Load cardinfos/cacache even if no keyfile found.
- Fixed rescanning of PAT/PMT if temporarily no enc. system found.
- Fixed timeout handling while reading from dvb device.
- Removed usleep() loops from logger code.

29.08.2002: Version 0.1.1
- Added missing code to save the xor & firmware hack setup.

22.08.2002: Version 0.1.0
- Initial release.
