freeMXF.org

Open discussion about freeMXF.org tools and MXF in general
It is currently Mon Sep 21, 2020 1:09 pm
Board index » MXF Categories » freeMXF.org Tools



Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author
Search for:
Message

Offline
Rookie

Joined: Thu Feb 09, 2006 8:55 am
Posts: 4

Post Posted: Thu Feb 09, 2006 9:05 am 
Top  
I find there is a tool called mxfcrypt that do encrypt and decrypt mxf file,
but now I want to do encrypt and make mxf at one time.
I had looked at src in short times,but I did not find a visible way to do that.
so , I need some tips,thanks !

 Profile  

Offline
Insider

Joined: Thu Apr 15, 2004 10:39 am
Posts: 198
Location: Scotland

Post Posted: Thu Feb 09, 2006 2:49 pm 
Top  
This is an area where a little work is required in the library to make it easier.

At the moment I would recommend that you build a new class that is derived from EssenceSource and does the encrypting work.

This new class would take a pointer to the plantext source as a parameter to its constructor. And this new encrypting-source is what you use to build a BodyStream for the file.

Each call to GetEssenceData() would pull a new chunk of data from the plaintext source (using its GetEssenceData method), encrypt it and then pass the result out.

If a call is made to GetEssenceDataSize() one of two things needs to happen - either the size needs to be calculated from a call to the plaintext GettEssenceDataSize (plus the encryption overhead), or the chunk actually needs to be encrypted and stored, passing out the size. The next call to GetEssenceData can return this stored version.

Does this help?

 Profile WWW  

Offline
Rookie

Joined: Thu Feb 09, 2006 8:55 am
Posts: 4

Post Posted: Fri Feb 10, 2006 1:40 am 
Top  
I also think it is a better idea!

 Profile  

Offline
Board User

Joined: Wed Feb 15, 2006 11:23 am
Posts: 6

Post Posted: Wed Feb 15, 2006 11:25 am 
Top  
Hello

what is the format of the input key file to encrypt?

Thibault

 Profile  

Offline
Insider

Joined: Thu Apr 15, 2004 10:39 am
Posts: 198
Location: Scotland

Post Posted: Wed Feb 15, 2006 6:09 pm 
Top  
The format is 32 hex digits (a 128-bit number in hex)

The filename is also a 128-bit number as hex digits in the format:

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

An easy way to generate these files id using the MXFGUI program that is in the Win32 binaries file in the latest release (0.6.0-Beta)

 Profile WWW  

Offline
Board User

Joined: Wed Feb 15, 2006 11:23 am
Posts: 6

Post Posted: Wed Feb 15, 2006 6:24 pm 
Top  
Are MXFCrypt resulting mxf files really MXF specifications compliant?

Thibault

 Profile  

Offline
Board User

Joined: Wed Feb 15, 2006 11:23 am
Posts: 6

Post Posted: Wed Feb 15, 2006 6:29 pm 
Top  
Why is it the key filename that is used and not the key?
What is the aim difference between the key and its filename?

 Profile  

Offline
Insider

Joined: Thu Apr 15, 2004 10:39 am
Posts: 198
Location: Scotland

Post Posted: Thu Feb 16, 2006 1:47 pm 
Top  
This is to do with the way that dCinema do thier key transfer.

Each compressed file contains a 128-bit GUID that is carried in the encrypted file to identify the key. This is publicly visible.

This 128-bit GUID is used to "look-up" the decode key. The decode key is secret and is transmitted to the decoder via a seperate channel and stored in a secure database.

Some of the current dCinema software tools allow the keys to be extracted into files with the filename derived from the 128-bit key identifier (the GUID).

MXFCrypt builds a matching filename from the publicly visible GUID in the encrypted file, then tries to locate a key file holding the matching secret key.

Is this at all clear?

 Profile WWW  

Offline
Board User

Joined: Wed Feb 15, 2006 11:23 am
Posts: 6

Post Posted: Thu Feb 16, 2006 3:35 pm 
Top  
Ok that is clear for the key. Thanks.

Is MXFCrypt used in commercial tools or is it experimental?
Is MXFCrypt really compliant to D-Cinema S423M Specifications?
Are the Universal keys of encrypted essences packets replaced or is there a KLV sublayer as described in DCinema specifications?
What are the D-Cinema tools you speak about? Do you work on one?

Thibault

 Profile  

Offline
Insider

Joined: Thu Apr 15, 2004 10:39 am
Posts: 198
Location: Scotland

Post Posted: Thu Feb 16, 2006 3:39 pm 
Top  
It should be complient with the latest version (but it is not yet finalized!)

There is some MXFLib code being used for real in digital cinema products, but I am not able to say more :wink:

 Profile WWW  

Offline
Board User

Joined: Wed Feb 15, 2006 11:23 am
Posts: 6

Post Posted: Fri Feb 24, 2006 5:20 pm 
Top  
How the current available MXFCrypt component deals with triplets?:

as DC spec:
KLV => K’L’V’
with V’ = KL E(V)
then
KLV => K’L’ KL E(V)

Or
KLV => KL E(V)

Or
KLV => KL' E(V)

Or
KLV => K'L' E(V)

 Profile  

Offline
Insider

Joined: Thu Apr 15, 2004 10:39 am
Posts: 198
Location: Scotland

Post Posted: Sun Feb 26, 2006 2:54 pm 
Top  
It should be exactly the same as the DC spec where:

KLV -> K'L'V'

Where: V' is a variable length pack containing the K and L values from the original KLV as well as the encrypted V. It also contains a number of other items such as the Context ID and the valeu of Plaintext Offset. It also optionally contains hashing values.

 Profile WWW  

Offline
Board User

Joined: Wed Feb 15, 2006 11:23 am
Posts: 6

Post Posted: Tue Mar 28, 2006 3:56 pm 
Top  
When I read a MXf decrypted file (result of mxfcrypt used as file descrambler) with metaglue mxffixer, I have a structural error: "Metadata in partition at 0xffffffffffffffff contains no Preface set". This error seems to be the cause of rejection by our video server. What this error means and how can I fix it?

thanks for your help

thibault

 Profile  

Offline
Rookie

Joined: Wed Mar 29, 2006 1:30 pm
Posts: 4

Post Posted: Wed Mar 29, 2006 1:49 pm 
Top  
IMHO, the GCWriter::AddSystemData is the right place to start with the encryption.

Actually, I was investigating the the mxfcrypt.cpp for the right entry point for the MPEG-Encryption. Then I saw the discussion about MPEG->EncryptedMXF here. The suggestion is to use the EssenceSource for the encryption. Well, I've got a couple of discrepancies with my previouse experience with MXFLib:

1) actual job for creation and writing of the KLV is done in GCWriter::AddSystemData. Shouldn't encryption be done somewhere in this method? Otherwise I'm expected to make setting of K and other thing somewhere in the EssenceSource. IMHO, the EssenceSouce should only know the source, and nothing extra from the MXF.
As I see, the CGWriter do not expect any KL from the EssenceSource. Neither can he recognize, whether the passed essence is encrypted or not.

2) Why is advice given to make encryption with EssenceSource, if the encryption is done with Encrypt_GCReadHandler? I would expect some kind of "reuse". :roll:

thank you for clarifications.

Matt Beard wrote:
This is an area where a little work is required in the library to make it easier.

At the moment I would recommend that you build a new class that is derived from EssenceSource and does the encrypting work.

This new class would take a pointer to the plantext source as a parameter to its constructor. And this new encrypting-source is what you use to build a BodyStream for the file.

Each call to GetEssenceData() would pull a new chunk of data from the plaintext source (using its GetEssenceData method), encrypt it and then pass the result out.

If a call is made to GetEssenceDataSize() one of two things needs to happen - either the size needs to be calculated from a call to the plaintext GettEssenceDataSize (plus the encryption overhead), or the chunk actually needs to be encrypted and stored, passing out the size. The next call to GetEssenceData can return this stored version.

Does this help?

 Profile  

Offline
Insider

Joined: Thu Apr 15, 2004 10:39 am
Posts: 198
Location: Scotland

Post Posted: Thu Mar 30, 2006 3:09 pm 
Top  
tbegin wrote:
When I read a MXf decrypted file (result of mxfcrypt used as file descrambler) with metaglue mxffixer, I have a structural error: "Metadata in partition at 0xffffffffffffffff contains no Preface set". This error seems to be the cause of rejection by our video server. What this error means and how can I fix it?

thanks for your help

thibault


Can you send me a small decrypted MXF file that shows this error? It would also help to have a copy of the encrypted file and the key file.

What version of the software are you using?

 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

Jump to:  


Who is online

Users browsing this forum: No registered users and 13 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group :: Style based on FI Subice by phpBBservice.nl :: All times are UTC