Results 1 to 11 of 11

Thread: Gamma processor type

  1. #1
    Senior Member gw1's Avatar
    Join Date
    Jan 2008
    Location
    Hobart
    Posts
    957
    Thanks
    49
    Thanked 608 Times in 213 Posts
    Rep Power
    268
    Reputation
    1901

    Default Gamma processor type

    i was wondering if you knew what chip the gamma was?
    I don't know the exact part number, but it definitely uses core pioneered by Motorola's MMC2107 microcontroller. Gamma didn't use the MMC2107 itself but rather a descendant which added a crypto coprocessor with RSA & 3DES and repackaged for smartcard applications, probably dropping a heap of stuff like the external bus interface and ADC, and perhaps enhancing one of the UARTs with ISO7816 support (which many modern microcontrollers offer).

    What we do know is Gamma was written using the original Motorola MMC2107 evaluation kit SDK which bundled Metrowerks’ CodeWarrior ANSI C/C++ compiler that generated ROM-bootable binaries, along with MMC2107 headers, sample code and a flash loader. Other compiler vendors besides Metrowerks support the MMC2107 but CodeWarrior was what the Gamma author used.

    I don't have the datasheet for MMC2107, let alone the exact chip Gamma cards use, but we get a fair idea of its architecture and capability from the MMC2107 promotional blurb. From Google we know
    • a Motorola M210 core
    • programmable PLL clock multiplier
    • 8K of RAM
    • 128K Flash
    • two UARTs
    • 8 edge-triggered interrupt pins
    • one SPI port
    • JTAG ‘OnCE’ ports
    • several timers including a watchdog
    • an ADC


    The M210 core is 32-bit RISC with 45 registers, 16-bit wide instructions fetched in a 4-stage pipeline and a 32-level interrupt controller (which many smartcard applications don't use).

    Its Flash is organised as eight individually-erasable blocks of 16Kbytes each, which allowed Gamma to self-program. New data was received via smartcard commands, decrypted, assembled into the required flash structures at an offset in RAM, then the blocks were erased and reflashed (that routine being guarted by a magic 'fix firmware' string to protect against accidental execution).

    The UARTs support 8/9-bit full duplex operation using an onchip 13-bit baud generator with 16x oversampling, framing and parity error checks. Whether its UARTs in the chip used by Gamma were enhanced to support ISO7816 mode I don't know (many modern USART silicon libraries do). In any case it appears Gamma doesn't use the hardware UART but bit-bangs the communication by software, as most other emulators do.

    I imagine the MM2107 included a system bootstrap ROM that's activated by a special reset sequence. Lots of processors of various lineage including 8051 (going way back to the Dallas secure processor), AVR and ARM offer this feature. That's how code is loaded onto virgin blanks with empty Flash, verified, and locked using code protection bits.

    Whether the Gamma's transport code is part of the system ROM protocol, or something the Gamma team included in their application, I'm not absolutely certain. I belileve it's part of the ROM protocol though because of the context in which Gamma makefile links debug_Transportkey.s.

    Others have studied the Gamma source much more closely than me, I've really only glanced at it, but it's obvious from the code that Gamma 'OS' was just one of several ATR personalities presented by the Gamma application, and that .GAM files are just updates containing provider specific information and keys, secured by a public key encrytion that only the Gamma application's private key can utilise. Perhaps the GAM contains the entire flash image rather than just keys, I haven't studied the code, but from memory the update switch case was only a few lines so it's possible that's what they did. That would make sense since it would've allowed updates to include algorithm tweaks. Either way the important thing to note is that the GAM update is applied by the Gamma application self-programming, rather than the erase and block writes being operated by an external tool (as with PIC & AVR) or using a generic M210 bootstrap ROM (as with several ARM chips).

    In that way the Gamma team protected their investment in algorithm reversal and provider-specific master key extraction. Others who obtained blank cards - of identical type to those used by Gamma team - couldn't utilise the .gam key update files, even with the Gamma source code (minus keys) being made available. Thus, knowing what processor the Gamma used won't assist piracy efforts. It's an interesting question historically but of no benefit to those who want to pirate pay tv.

    Additional commands were used to switch between Gamma ATR personalities, so that "unlock" scripts could be emailed to sellers/users to activate the Irdeto emulation mode at the last minute. That perhaps offered some legal cover in case Gammas were intercepted by authorities in transit.

  2. The Following 15 Users Say Thank You to gw1 For This Useful Post:

    + Show/Hide list of the thanked

    best4less (16-08-09),covert (12-08-09),dannyboi (18-04-10),evilbrian (12-08-09),Fernbay (12-08-09),Godzilla (12-08-09),hazman (14-08-09),malrose (12-08-09),OSIRUS (12-08-09),OzBlackKnight (12-08-09),Rocket (17-08-09),statesmanjeff (18-08-09),SystemRat (17-08-09),troyboy (12-08-09),z1gg33 (12-08-09)



Look Here ->
  • #2
    Junior Member
    Join Date
    Feb 2009
    Age
    52
    Posts
    49
    Thanks
    1
    Thanked 44 Times in 11 Posts
    Rep Power
    189
    Reputation
    176

    Default

    Fuming nitric acid reveals a standard 100 Pin (count the white pads) MMC2107. No Crypto. The bootloader is uploaded during manufacturing processes before being placed inside the smartcard package.



    650 page datasheet
    Last edited by fasulye; 14-08-09 at 08:49 PM. Reason: Link to datasheet

  • The Following 3 Users Say Thank You to fasulye For This Useful Post:

    best4less (16-08-09),OzBlackKnight (15-08-09),z1gg33 (14-08-09)

  • #3
    Senior Member gw1's Avatar
    Join Date
    Jan 2008
    Location
    Hobart
    Posts
    957
    Thanks
    49
    Thanked 608 Times in 213 Posts
    Rep Power
    268
    Reputation
    1901

    Default

    Thanks for that datasheet fasulye, I didn't have that.

    From my brief look at Gamma code it clearly utilises both 3DES and 512 bit RSA, calling des_ecb_crypt() and AEmodN_for_RSA() from hsoc01.c. The RSA certainly isn't a software emulation, indeed we see in hsoc01.h that the RSA unit is addressed at $d20000-d20270. As expected those addresses are shown as "unimplemented" in the MM2107 datasheet. That doesn't mean Gamma isn't using crypto, rather it means Gamma isn't using MM2107.

    Your photo is interesting, well done for producing it, it's much clearer than I could have obtained!

    However I maintain that Gamma isn't using MMC2107 but an enhanced version with crypto accelerator. Plenty of chips nowadays have RSA, the silicon requirement is small and cheap ( in 44-pin package gives you 512 bit RSA via SPI interface in 63mS for under $4 in 1-off quantity!). There's no question that the whole reason Irdeto switched to new platform for their V4.1 cards was to get fast RSA, and Gamma required the same. You sure as hell can't do it in real time without hardware acceleration.

    Looking at the MMC2107 datasheet, I think you may be right that a bootloader was programmed at the factory before the dies were mounted in their cards. I was surprised about that but it now seems probable. I doubt the factory was programming the actual Irdeto emulation code, for fairly obvious reasons, but rather a generic loader that Gamma team used to inject their application later.

    One thing that puzzles me is how they managed the supply decoupling. I assume they wired all the Vss pads together when mounting on the die, and all the Vdd together. But parts like this with onchip PLL are usually quite fussy about decoupling and prefer individual caps close to each Vss and Vdd. Obviously that's not an option for smartcard packaging unless integrated decoupling capacitors are used, which I've not seen. I was half expecting the die power routing to have been reworked for smartcard packaging. What power connections did you observe on the die?

    The other interesting thing about the power supply is the MMC2107 datasheet says it's designed for 2.7-3.6V. Yet I know plenty of people that run Gammas quite happily at 5V 6MHz without overheating, for certain. That further supports my view that the Gammas aren't actual MMC2107s but a derivative.

    And although this hasn't been discussed much, I suspect that there may be both 3V and 5V versions of Gamma card in existence. That sounds a bit hard to believe, I know, but some people found their Gammas definitely overheated unless they reduced supply to 3V, while others run fine at 5V. I heard rumours a long time ago of "later batches" of cards being produced to "solve the overheating problem". Those rumours might have been rubbish, but it's possible that early version of Gamma card was strictly 3V only but demand for cards that operate in 5V equipment (as most CAMs are) may have driven development of a 5V tolerant version.

    Who knows. Perhaps one day the story will be told, with enough detail to lay all the speculation to rest. In the meantime it's fun to guess what was done back then in those secret factories

  • The Following 3 Users Say Thank You to gw1 For This Useful Post:

    fasulye (16-08-09),jayt (08-03-10),OzBlackKnight (16-08-09)

  • #4
    Junior Member
    Join Date
    Feb 2009
    Age
    52
    Posts
    49
    Thanks
    1
    Thanked 44 Times in 11 Posts
    Rep Power
    189
    Reputation
    176

    Default

    You are correct with your theory about the gamma being a descendant of the MMC2107. Freescale never produced a m-core based platform with an embedded hardware Cryptography. The die picture is complete and there are no other interconnected dies or passive components.

    It is strongly believed that the gamma team commissioned the development of a custom solution.

  • #5
    Senior Member gw1's Avatar
    Join Date
    Jan 2008
    Location
    Hobart
    Posts
    957
    Thanks
    49
    Thanked 608 Times in 213 Posts
    Rep Power
    268
    Reputation
    1901

    Default

    Quote Originally Posted by fasulye View Post
    It is strongly believed that the gamma team commissioned the development of a custom solution.
    That seems probable. But the question that raises is, what on earth possessed them to choose MCore rather than, say, ARM (as )?

    If I were approaching a VLSI design house to produce a custom crypto smartcard, knowing that powerful pay tv companies would soon be trying to identify me, my philosophy would be:
    1. Choose an independent manufacturer who isn't contracted to major pay tv companies and who is beyond the reach of their subpoenas.
    2. Give them the feature/performance requirement (eg 8K SRAM, 100mS 512bit RSA, 3DES, RNG, 32-64K code flash, 2K NV data eeprom/flash, ISO7816 voltage & current constraints etc) but don't over-specify the implementation.
    3. Let them leverage the silicon libraries and expertise they already have, to minimise cost, development time and risk of teething problems.


    So the question is, who would choose MCore? Why would a VLSI house end up using MCore in the Gamma design when others like ARM are more widely used? Especially since there are several ARM impementations around with integrated crypto? The only possible reasons I can think of:
    • The house had successfully produced custom smartcards in the past, and of those designs the MCore one had the highest performance. Changing architecture without good reason would have been a needless risk.
    • The house couldn't or didn't want to license ARM for some reason, they'd identified crypto integration as the biggest risk, and they'd had more experience extending MCore than any other processor library, so using MCore was the safest way to mitigate the risk.
    • The Gamma had come across an MCore eval kit in his past for some reason, it was an embedded system he felt comfortable with, and so he (inappropriately) mentioned it in his functional specification document. The VLSI house took it as a design requirement without question.
    • The VLSI design house pays royalties on its libraries and MCore worked out cheaper than alternatives.
    • Maybe MCore offers some technical advantage over alternatives that I've missed?


    Only the first of those seems likely to me. What do others think?

  • The Following User Says Thank You to gw1 For This Useful Post:

    OzBlackKnight (16-08-09)

  • #6
    Senior Member Oscar's Avatar
    Join Date
    Jan 2008
    Posts
    656
    Thanks
    115
    Thanked 115 Times in 86 Posts
    Rep Power
    230
    Reputation
    524

    Default

    Brilliant post guys.
    Now I know why I fix TVs lol

  • #7
    Junior Member
    Join Date
    Feb 2009
    Age
    52
    Posts
    49
    Thanks
    1
    Thanked 44 Times in 11 Posts
    Rep Power
    189
    Reputation
    176

    Default

    Anonymity and secrecy would have been the driving constraint used in the selection of the VLSI house. Most like an existing design was reused or modified as the basis for the gamma. Hence why the die has the approximately 100 outer pads.

  • #8
    Senior Member gw1's Avatar
    Join Date
    Jan 2008
    Location
    Hobart
    Posts
    957
    Thanks
    49
    Thanked 608 Times in 213 Posts
    Rep Power
    268
    Reputation
    1901

    Default

    Yes, seeing all those pads was no surprise. It's not unusual for dies from DIL or PLCC packages to be embedded in smartcards as-is.

    For those who aren't aware, the processor inside Funcard is the same one found in AT90S8515/8535 - a 40 pin IC. The chip from the is mounted directly inside a smartcard without modification. The majority of the microcontroller's I/O and peripherals are still there on the chip, unconnected to the outside world and unused. It's fortunate that the very limited number of signals provided by ISO7816 are compatible with the AT90S8515 and sufficient for it to operate. The low cost of gold, silver and funcards is possible because they all utilise mass produced parts - unlike Gamma it seems.

    The AT90S8515 microcontroller package was never designed with ISO7816 in mind - it was crafted by Atmel to take market share from Intel's market-leading by packaging the fast and power efficient AVR processor in a form that was as with 8051 as possible. (Atmel's previous pitch at that market, the series, was code compatible with 8051 but boasted Flash EPROM which very few microcontrollers had at that time.) The AT90S8515 was a commercial hit and became cheap and widely adopted. Fortuitously for smartcard experimenters the AT90S8515 also happened to be a good fit for ISO7816.
    • single supply, 3-5V operation
    • Flash EPROM (that was one of Atmel's specialties)
    • 0-8MHz clock
    • low power consumption
    • open drain configurable I/O
    • onchip UART
    • onchip EEPROM
    • onchip oscillator & watchdog
    • active low reset (a change from the 8051, which had unusual polarity)
    • small and cheap


    About the only snag was flashing: the AT90S8515 required either a parallel interface or . ISO7816's spare AUX1 and AUX2 signals provided a tidy solution that made Funcard possible without .

    Like Gold and Silver, Funcards began life as circuit boards with retail plugged or soldered into them (and LEDs!) and only later were manufactured in plastic cards. There's more on that .



    Gamma however probably began life like :
    Last edited by gw1; 18-08-09 at 02:15 PM.

  • The Following 2 Users Say Thank You to gw1 For This Useful Post:

    dannyboi (18-04-10),OSIRUS (18-08-09)

  • #9
    Junior Member
    Join Date
    Mar 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    Quote Originally Posted by gw1 View Post
    From my brief look at Gamma code it clearly utilises both 3DES and 512 bit RSA, calling des_ecb_crypt() and AEmodN_for_RSA() from hsoc01.c. The RSA certainly isn't a software emulation, indeed we see in hsoc01.h that the RSA unit is addressed at -d20270. As expected those addresses are shown as "unimplemented" in the MM2107 datasheet. That doesn't mean Gamma isn't using crypto, rather it means Gamma isn't using MM2107.
    The DES, on the other hand, appears to probably be a software implementation. Does ? I wonder if it's vulnerable to power analysis...

    Quote Originally Posted by gw1 View Post
    So the question is, who would choose MCore? Why would a VLSI house end up using MCore in the Gamma design when others like ARM are more widely used?
    Because other cores are more widely used?

  • #10
    Premium Member agarol's Avatar
    Join Date
    Jan 2008
    Location
    A state of constant denial
    Posts
    331
    Thanks
    27
    Thanked 52 Times in 23 Posts
    Rep Power
    216
    Reputation
    331

    Default

    Quote Originally Posted by teal_finch View Post
    The DES, on the other hand, appears to probably be a software implementation. Does ? I wonder if it's vulnerable to power analysis...



    Because other cores are more widely used?
    Not sure why there is interest in this chip/card anymore. Most secrets about the card, processor and code are known now.

    The real mystery remains in relation to key management. It appears the Germans or whoever developed the gamma (and then subsequent versions) remain unwilling to disclose whether they derived or acquired the keysets that were used in those cards. Most if not all of the details are now useless because compromised cards have been removed from the card-pool.

    Cheers
    ag
    Energy is the father of creation

  • #11
    Senior Member omega99's Avatar
    Join Date
    Feb 2008
    Posts
    624
    Thanks
    53
    Thanked 55 Times in 40 Posts
    Rep Power
    225
    Reputation
    358

    Default

    can someone please turn the light on its dark in here!
    woteva

  • Similar Threads

    1. WTB:Socket AM3 / AM2+ / AM2 processor
      By harry88 in forum Buy Sell and Trade
      Replies: 1
      Last Post: 20-07-09, 07:26 PM
    2. AMD Processor for sale
      By cobra679 in forum Buy Sell and Trade
      Replies: 3
      Last Post: 28-03-09, 06:57 PM
    3. Processor recommendations
      By myf360f1 in forum PC Hardware and Printers (including 3D Printers)
      Replies: 9
      Last Post: 14-07-08, 09:55 AM
    4. [FS] P4 Motherboard and Processor
      By MaXiLeeCH in forum Buy Sell and Trade
      Replies: 6
      Last Post: 14-03-08, 09:41 PM

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •