Will There Be a new Emu For Ireland?

what difference ? as far as u dont have proper au (mk) keys?
N1
E1
N2
VK

These keys are for EMM decryption, this is not where your problem lies. The EMM will be getting decrypted correctly. However, when the keyroll code attempts to run, the emulator makes a mess of it as it fails to emulate a hardware register correctly.

edcase
 
I am going to test some cams now :proud:

Hi all
I've been testing.......

I have a copy of the /var/keys directory for each of the emu's listed on the v2 plugins download page

The dump was taken after about 3-5 mins after the camd was started

There are available to anyone who can be arsed to analyse them!

There are some interesting entries...... Several entries bear NO relationship to the much published fixed key (i.e. 00:B230)

Several list keys extremely close to the fixed key (each getting a DIFFERENT single BIT --as opposed to byte-- wrong)

I know nothing about the algorithms used to generate these keys, but I have a feeling that a programmatic solution may be viable

Write a routine that
1) reads the key from the file
2) changes each single bit in turn
3) checks if the changed key works

the number of permutations is realistically finite: 64

Is there anyone out there willing to assist?

Regards
Conor

p.s. n41 south dublin - dreamworldz v2 downloaded yesterday
procedure as follows:
The current dw image (as of yesterday 5Apr) was flashed on the box. default emu set to "None", my channel/bouquet info restored, IP set, and an image taken.
This image was repeatedly reflashed to the box, a new emu downloaded to box from plugins menu, started and /var/keys pulled to pc
The resultant /var/keys copies are available on request
C.
 
Last edited:
Some of the Cams are just plain wrong. They may be meant for a variation of the Nagra system where things get done slightly differently.

The bit checking thing is an interesting approach. If you examine the functioning of the actual keyroll though I suspect you could probably narrow it down to 8 possibilities maximum.

It really depends on whether they stick with fixed data offset changes or they change varying bytes. If they dont vary then you only have one possibility.

When comparing, remember to compare like for like. You cant compare the Rom7 keyrolls with Rom10 ones or sig swapped with non-sig swapped. Those Emm's do things slightly differently.
 
Some of the Cams are just plain wrong. They may be meant for a variation of the Nagra system where things get done slightly differently.

The bit checking thing is an interesting approach. If you examine the functioning of the actual keyroll though I suspect you could probably narrow it down to 8 possibilities maximum.

It really depends on whether they stick with fixed data offset changes or they change varying bytes. If they dont vary then you only have one possibility.

When comparing, remember to compare like for like. You cant compare the Rom7 keyrolls with Rom10 ones or sig swapped with non-sig swapped. Those Emm's do things slightly differently.

Hi

Herein lies my problem ..... a not particularly gifted amateur .... just looking at the symptoms and trying to understand that which is too complex to grasp from the outside

Point me to keyrolls
Point me to difference in the nagra systems

PLEASE!

Regards
Conor
 
I haven't looked into this properly yet but I recall from when I was messing around with setting up a DVBC card in my computer a few months back that the ROM7 key differed from the ROM10 key by only one character.

Sample key list prior to April 3rd:

NO KEYS ALLOWED

Presumably the new keyroll mechanism will mean that the keys differ by two characters now. If that's the case then you could get the correct key in only 2 attempts provided you have the ROM10 key as well as the ROM7 key.

Dummy key list after April 3rd:
NO KEYS ALLOWED

As you can see if the above if the keys differ by two values then the only possible solution to the problem is Red(3) + Black(D) or Blue(9) + Green(E) in the example above because we know for a fact that the keys we are given are both broken (Red + Green and Blue + Black) but between them they contain the solution. :)

So the correct ROM7 keys would be:

Either

NO KEYS ALLOWED
or

NO KEYS ALLOWED;
 
Last edited by a moderator:
Images taken from slim19198's guide to Manual key entry on DM500

The interesting bit is the image I've attached "dreamboxkeys(5).jpg". It's a screen grab of the keylist.txt file after the key roll on April 3rd. And the juicy bit is that it shows the 00 key for ROM7, ROM10 and ROM11 clearly.

Guess how many characters the ROM7 and ROM10 keys differ by?
Answer: 2

Guess how many characters the ROM7 and ROM11 keys differ by?
Answer: 2

Guess how many characters the ROM10 and ROM11 keys differ by?
Answer: 2

:cool:

The 00 keys:
Code:
You don't have permission to view the code content. Log in or register now.

Given three 00 keys I could build the correct ROM7 key in this instance immediately.

Key values in positions 1-9 were identical in all three keys.

Position 10
ROM11[00][10] = 6
ROM10[00][10] = 7
ROM7[00][10] = 7
=> The correct value is 7

Position 11
ROM11[00][11] = 2
ROM10[00][11] = 2
ROM7[00][11] = A
=> The correct value is 2

Position 12
ROM11[00][12] = 3
ROM10[00][12] = 2
ROM7[00][12] = 3
=> The correct value is 3

The corrected key was:

N 5E01 00 ********7233**** ; ROM 7

Only one character had to be changed to get the correct key and maybe it's just a coincidence but by comparing it against the ROM10 and ROM11 keys, took the guess work out of costructing the correct ROM7 key. So there we have it, now all we need to do is code it up and wait for the next key roll to test the theory further, but by the looks of this we have the solution without needing to get somebody to rewrite the EMUs.

:banana:

Shit - I didn't realise it's almost 4:30am already and I have to get up for work in three hours. Right I'm off to sneak into bed, I'll be back tomorrow at some stage.
 
Last edited by a moderator:
Good work (think Skeith pointed this out a couple of days ago.)

Don't post keys.
 
Is it OK to post FAKE keys

Hi (slightly off thread)

Moderators, is it OK to post fake keys to demonstrate a point?

The post should say that they're fake keys, of course!

Regards
Conor
 
this looks like great work. there are plenty of people waiting to see how you get on
 
Well they can wait! :nopity:

I have a major project deadline this week in work so there'll be plenty of late nights and the last thing I'll be doing is breaking out a Linux C/C++ compiler when I get home. Also the wife woke just after I posted the final messsage last night and to say she's not impressed with me at the moment is an understatement.

If somebody wants to code it up in the meantime I'll be happy to provide the algorithm.
 
Well they can wait! :nopity:

I have a major project deadline this week in work so there'll be plenty of late nights and the last thing I'll be doing is breaking out a Linux C/C++ compiler when I get home. Also the wife woke just after I posted the final messsage last night and to say she's not impressed with me at the moment is an understatement.

If somebody wants to code it up in the meantime I'll be happy to provide the algorithm.

Send me the algorithm, I'll see if i can get gcc to work on this platform....gulp!
does anyone have a link to build an image (which should include all the appropriate cross compiler setup info)?
under which menu should it go: blue (user scripts), or, yellow (like tuxbox commander)?

[you see, utterly un-gifted amateur!]

c.
 
Hi (slightly off thread)

Moderators, is it OK to post fake keys to demonstrate a point?

The post should say that they're fake keys, of course!

Regards
Conor

If the post clearly states that they are fake or made up keys then I dont see a problem. It may also help if you use obviously fake keys like -

0123456789ABCDEF

For your demonstrations.

or if showing something limited to only a few bytes then -

0000000000239F00

where the 00's are "dont care" or unused values.
 
I was PMd that keys were posted so I removed :)
didnt have tim to check if they were fake or not as I was at work
 
Images taken from slim19198's guide to Manual key entry on DM500

The interesting bit is the image I've attached "dreamboxkeys(5).jpg". It's a screen grab of the keylist.txt file after the key roll on April 3rd. And the juicy bit is that it shows the 00 key for ROM7, ROM10 and ROM11 clearly.

Guess how many characters the ROM7 and ROM10 keys differ by?
Answer: 2

Guess how many characters the ROM7 and ROM11 keys differ by?
Answer: 2

Guess how many characters the ROM10 and ROM11 keys differ by?
Answer: 2

:cool:

The 00 keys:
Code:
You don't have permission to view the code content. Log in or register now.

Given three 00 keys I could build the correct ROM7 key in this instance immediately.

Key values in positions 1-9 were identical in all three keys.

Position 10
ROM11[00][10] = 6
ROM10[00][10] = 7
ROM7[00][10] = 7
=> The correct value is 7

Position 11
ROM11[00][11] = 2
ROM10[00][11] = 2
ROM7[00][11] = A
=> The correct value is 2

Position 12
ROM11[00][12] = 3
ROM10[00][12] = 2
ROM7[00][12] = 3
=> The correct value is 3

The corrected key was:

N 5E01 00 ********7233**** ; ROM 7

Only one character had to be changed to get the correct key and maybe it's just a coincidence but by comparing it against the ROM10 and ROM11 keys, took the guess work out of costructing the correct ROM7 key. So there we have it, now all we need to do is code it up and wait for the next key roll to test the theory further, but by the looks of this we have the solution without needing to get somebody to rewrite the EMUs.

:banana:

Shit - I didn't realise it's almost 4:30am already and I have to get up for work in three hours. Right I'm off to sneak into bed, I'll be back tomorrow at some stage.

This is an interesting approach but a bit limited. I feel its actually far easier to just look at the actual keyroll code from the Emm, suss out whats its doing and then manually correct.

For instance, take the following representative decoded (but fake ;) ) Emm

Code:
You don't have permission to view the code content. Log in or register now.

Now, using data from Nagrafaq we can see how this Emm breaks down
The 1st byte is always a filter. In this case 3F means the Emm is meant for all cards. This filter is always followed by two bytes of provider Id Information.

Code:
You don't have permission to view the code content. Log in or register now.

The next byte, FA, is a nanocommand. Its a nasty one because its function is to tell the card to interpret all following information as executable code. Luckily we know that the processor is a modified 6805/ST7 core so we know how to turn the machine code back into pneumonic instruction codes. This gives -

Code:
You don't have permission to view the code content. Log in or register now.

Notice that the code is always disassembled from a base address of $0081. This is the fixed address of the cards EmmBuffer.

Ok, you can see from this that the code is loading some data from address $06. In this case, address $06 is a register rather than a memory location (all addresses below $20 can be treated as registers)

Registers are a little different than memory locations in that they are physically linked to and control hardware objects like timers, serial ports or interrupts etc. Because of this action only certain bits within the register may be readable or writable. Bits may also change as hardware status changes (ie, a bit may get set or cleared when there is some information in the serial receiver or a timer expires).

The next instruction, 'swapa', is fairly simple. It just swaps the nybbles of a byte around. So, if the accumulator contains F3 before then it will contain 3F afterwards.

after that, we have an 'and #$20'. This performs a logical AND operation on the accumulator with the constant value $20. A logical and operation compares two binary values and only gives a 1 bit result where the two corresponding input bits are also 1 bits.

ie.
72 = 0111 0010 in binary
ANDED WITH
20 = 0010 0000 in binary
GIVES
Res 0010 0000 in binary or $20 in hex.

The net result of this AND operation is to produce a result of $20 ONLY if the Accumulator had bit 5 set to 1. (bits numbered 76543210)

This kind of operation is called a mask. Its function is to mask out bits we aren't interested in. In this case we are only interested in bit 5 of the accumulator.

Because of the 'swapa' instruction, this is actually bit 1 from register $06. We have assumed that this bit reads as a logic 1 value

The next couple of instructions 'eor $AF' & 'sta $AF' perform an exclusive-or on the Accumulator with the contents of memory location $AF and then store the results back to location $AF.

Memory location $AF is actually a part of the Emm code. So here something in the Emm is being changed. A little bit of de-mangling going on perhaps ;)

Code:
You don't have permission to view the code content. Log in or register now.

An exclusive-or is another logical operation similar to the AND described above. In this case the ouptut of an exclusive-or bit is only one if bothe input bits are different. If the bits are the same then you get a 0 output bit

The data at address $AF is $24

ie.
20 = 0010 0000 in binary
XOR WITH
24 = 0010 0100 in binary
GIVES
Res 0000 0100 in binary or $04 in hex. The result is to flip bit 5 of the 2nd operand.

So, now we have -

Code:
You don't have permission to view the code content. Log in or register now.

The next section of code is very similar to that already shown above.

The sei & cli instructions disable & enable interrupts. This would likely be a bit of protection to stop any interrupts that may occur by manipulating this particular register from actually occuring.

blcr & bset instructions clear or set respective bits at a address location. So, 'bclr1,$06' would clear bit 1 of address $06 (reg6) whilst 'bset7,$06' would set bit 7.

The clever bit here is that you must remember that address $06 is a register. Setting or clearing a registers may not actually occur. What is being relied upon here is that these values aren't changing in the way you would expect simply by looking at the code !

I'll let you all think about that little bit of code and what it might do

Just to finish off, the last few bits of code -

Code:
You don't have permission to view the code content. Log in or register now.

returns processing back to the cards Emm processor. Placing the constant #$26 in the accumulator instructs the Emm processor to continue processing Nanocommands from Address $26 + $80 or $A6

If you look at $A6 then

Code:
You don't have permission to view the code content. Log in or register now.

you will see that it contains $83, this is a valid Nano. The rest of the Emm will read as

Code:
You don't have permission to view the code content. Log in or register now.

See NagraFaq for details of Emm Nano's
 
Last edited by a moderator:
Jeez Nozzer - I'm a relative newbie myself. :)

I only started playing with this stuff back in January and at that it was only for a few nights and weekends because her ladyship got a miffed that it was taking up so much of my time. I was trying to be creative regarding solving the problem without having to go near the Emm. Best not to mess with the internal workings of the system when I'm not too familiar with it is my motto.

My idea for the algorithm was as follows:

Read the lines from the key file.
Sort them based on the timestamp.
If the ROM7, ROM10 & ROM 11 key is available do the following:
Create a new blank ROM7 key. (NewROM7)
Copy the identical values in ROM10 and ROM11 to it.
Code:
You don't have permission to view the code content. Log in or register now.
When you reach a mismatch then you take the value that matches ROM7.
Code:
You don't have permission to view the code content. Log in or register now.
Do the same for the 01 key.
Append the two new generated keys to the Keyfile.txt and don't add any timestamp or rom identifier information.

For example:
Code:
You don't have permission to view the code content. Log in or register now.

By not adding the timestamp and rom information the keys will continue to work up until the next key roll even if the emu continues to pickup and write the wrong key to the key file.

This method is a dirty fix but it doesn't involve the mental gymnastics of interpreting the Emm. If it achieves nothing else it will encourage people like conorc to get investigate what's goes on inside the Dreambox which is a good thing.
 
OMG, that is the most info i have ever seen in one post :O

Excellent post nozzer, too bad nearly all of it was over my head :(
 
Back
Top