Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

BISS2 mode CA config

oscam-emu edited this page Apr 7, 2022 · 5 revisions

For BISS2, the newly introduced mode CA is also supported. In this mode, the control world (CW) is not constant, but changes over time. The new control words are found with the use of ECM and EMM packets transmitted along side the stream. Like in other crypto systems, ECM keys are used for finding new CWs, while EMM keys are used for finding new ECM keys.


Syntax for ECM Keys in SoftCam.Key

ECM keys in OSCam-Emu consist of two identifiers called original network id (or onid for short) and entitlement session id (or esid for short). In addition, they can have two different parities, "00" or "01". The actual key is 16 bytes long and is used for decrypting the control words via the AES128 algorithm.

For signaling BISS2 mode CA ECM keys, the new 'G' identifier is used with the following syntax:

G <onid><esid> <parity> <key>

Where:

onid    (2 bytes) :  Original network id (4 hex digits).
esid    (2 bytes) :  Entitlement session id (4 hex digits).
parity   (string) :  Can be '00' or '01'.
key    (16 bytes) :  The ECM key.

Examples:

G 00010020 00 11223344556677881122334455667788 ; ECM key
G 00010020 01 80706050403020108070605040302010 ; ECM key

Syntax for EMM Keys

BISS2 mode CA EMM keys are essentially RSA Private keys (with a length of 2048 bits). They are stored in external PEM files and loaded when OSCam-Emu starts. They should be placed in the same folder where the SoftCam.Key is and named like "biss2_private_XX.pem", with "XX" being a 2 digit number from 00 to 15. Currently a maximum of 16 different EMM keys is supported, but this number can be increased if necessary (in an future version).

EMM keys are stored internally in OSCam-Emu and are not saved in SoftCam.Key. The content of the PEM file (the actual key) is not visible to the user, since there is no need for that.

For each EMM key a unique 8 byte identifier is calculated. The identifier is called entitlement key id (ekid for short - not to be confused with the esid used in ECM keys). The ekid is present in the EMM packets and determines which EMM key was used for encrypting (and thus selected for decrypting) each ECM packet.

All available EMM/RSA keys are displayed to the user via their corresponding ekid. Loaded keys can be found under the Emu reader entitlements list in the webif.