Steve's Digicams Forums

Steve's Digicams Forums (
-   General Discussion (
-   -   Nikon encrypts WB Metadata in D2X and D2Hs RAW files (

JimC Apr 19, 2005 12:54 PM

--- EDIT---

Since information has surfaced to indicate that Nikon is not the only one encrypting at least some portions of their RAW files, I am moving this thread from the Nikon Digital SLR Forum to the General Forum

--- END EDIT---

For those of you that have not heard, Nikon has decided to encrypt the White Balance information contained in the D2X and D2Hs .NEF files.

You can see an article concerning this issue here:

David Coffin, the author of dcraw.c, has already cracked the encryption for these models and has released updated versions of dcraw.c and parse.c.

For more information concerning dcraw.c, see

Thomas Knoll, Chief Engineer for Adobe Camera Raw and the original author of Photoshop (along with his brother John Knoll)is fully aware of David Coffin's crack of this encryption.

So, barring any legal issues, Adobe does now have the information needed to decrypt this information if they decide to do so (at least for now).

But,what will Nikon do next?

Sue Dave Coffin? Push firmware and software updates to break dcraw? Use a different encryption for future cameras?

In a year's time, dcraw.c might contain hundreds of lines of decryption tables for all the newer Nikon cameras (and any product using David's decryption algorithms would have to do the same thing).


PeterP Apr 19, 2005 1:09 PM

I just can't understand why Nikon would want to encrypt information in their raw files.

Unless they want to be the only ones making software to process them, and I have used Nikon Capture software, it is junk compared to the code made by professional software writer's. Nikon makes great hardware and optics, they should stick with that.
I guess it is one way to force people to use your software if you can't write decent code.

IMHO: if they manage to keep the secret of their raw files from others it will make using their cameras more of a chore. Give people another good reason to switch to Canon ::angry: .


JimC Apr 19, 2005 1:24 PM

PeterP wrote:

I just can't understand why Nikon would want to encrypt information in their raw files.
Nikon is not the first... Sony decided to enrypt the data in the RAW files generated by the DSC-F828 (and David managed to crack this encryption, too).


Unless they want to be the only ones making software to process them, and I have used Nikon Capture software, it is junk compared to the code made by professional software writer's. Nikon makes great hardware and optics, they should stick with that.

IMHO: if they manage to keep the secret of their raw files from others it will make using their cameras more of a chore. Give people another good reason to switch to Canon :) .
Make no mistake about it. RAW files are reverse engineered by those wanting to produce software to convert them (even those without any encryption).

Manufacturers (and I'm not just talking about Nikon), don't publish the format of their RAW files to the public. Software engineers wanting to convert RAW files have to do it the hard way (and thanks to people like David Coffin that have reverse engineered these formats, we have third party RAW conversion tools for many camera models).

PeterP Apr 19, 2005 1:30 PM

True, most (any?) manfacturers don't publish the format of their RAW files but most don't go out of their way to encrypt the data.

Figures Sony would have tried that as well, probably got the idea from trying to protect their playstationgames. :blah:

Sounds like they nikon/sony are not fond of the DNG format idea :blah:


JimC Apr 19, 2005 1:36 PM

PeterP wrote:

Sounds like they nikon/sony are not fond of the DNG format idea :blah:

Actually, here is what David Coffin had to say about DNG in December 2004 (and I have Dave's permission to quote him):

David Coffin Wrote:

I think Adobe's DNG idea is well-intentioned, but suffers from two serious flaws:

First, why would camera makers want to change their raw formats? Compatibility leads to commoditization,and that leads to competition based on price alone. Great for consumers, terrible for producers.

Second, this format cannot anticipate innovations that haven't happened yet. When new sensors appear, the standard must be updated, along with the software that implements it.

There is only one way to guarantee that a digital archive will be readable in fifty years. For any non-text files, it must include decoding software as human-readable source code. If the decoder is written in a language other than C, it would be prudent to include an interpreter for that language, written in C.

Dcraw already fills this role. When the first DNG camera is available, dcraw.c will support it as one more raw format among many.
BTW, dcraw.c does now support DNG.


Dcraw users,

After four months of work, dcraw 7.00 is available for download at . It's a major rewrite:

* Not only is Adobe DNG now supported, the entire codepath has been redesigned for it. Adobe's XYZ->CAM matrices allow color science to replace black magic, whether decoding DNG or the original raw files.

* The Foveon-related code has been completely rewritten to give realistic colors under all light sources.

The license has changed. The new Foveon code is under the GPL license, so authors of closed-source applications may need to pay me to use it. The rest is under my old free-for-all license. See dcraw.c for details.

My future plans are:

* Adding support for SMaL-based thin cameras ( ) Currently these cameras are completely useless without Windows.

* Improving camera white balance support, first for Canon, then Nikon, and maybe others.
Dave Coffin 3/9/2005

DBB Apr 20, 2005 3:52 PM

Well, I must say, the information posted here led me to cancel my order for a D2x. Before doing so I called Nikon to scream incoherently at them :-)

For what it's worth, they tell me that the next release of Adobe's RAW importer WILL support the D2x Raw format.

So, I didn't cancel the order...


JimC Apr 20, 2005 4:07 PM

It really wasn't a question of supporting the D2x RAW format. It was a question of being able to legally decrypt the White Balance information stored in the RAW format (so if you wanted to use the camera's white balance settings for converting your images, you could).

That's the issue (can Adobe legally decrypt the white balance information, or do they have to release RAW conversion for these models without this feature).

Some third party vendors of RAW conversion software have already indicated that they will decode this data. I have not yet seen this announcement from Adobe (although I haven't looked at the latest news on this issue yet today).

In any event, there are a lot of angry Nikon customers (and potential Nikon customers) screaming about this issue right now. ;-)

DBB Apr 20, 2005 5:54 PM

I know nothing, and less with each passing year...

Certainly if they force me to use THEIR software to view MY images, anger is understandable...:-)

and it appears that further updates will require the new version of PS...


PeterP Apr 20, 2005 11:02 PM

Dang, another 160$ grab from Adobe to stay current with CS2 :mad:

I am still trying to get a grip on all the original CSoffers.


JimC Apr 23, 2005 9:12 AM

Nikon responded to this issue yesterday, issuing an advisory about it.

Here it is for those that haven't seen it yet:

NIKON ADVISORY - April 22, 2005

The Nikon D2X professional Digital Single Lens Reflex camera has received widely positive acclaim for its overall performance and image processing quality. Recently, speculative statements which appear to be based on misunderstandings and misinformation about the D2X camera's "encryption" of certain white balance data have propagated on the internet.

The purpose of this advisory is to clarify this matter with facts and explanations.

The Nikon D2X is capable of producing high quality images that can be saved in a variety of file formats, including the proprietary Nikon Electronic Format (NEF), standard TIFF and several levels of standard JPEG compressed files.

The NEF, a Nikon proprietary raw file design, was introduced with the Nikon D1 Camera and Nikon's original Capture software. The combination of Nikon camera, in-camera image processing, NEF file format and in-computer image processing with original Nikon Capture software was developed as a system that faithfully saved image files that represent the camera settings made manually or automatically by the photographer at the time a picture was taken.

Nikon's preservation of its unique technology in the NEF file is employed as an action that protects the uniqueness of the file. At the same time, Nikon makes available a software developer kit (SDK) that, when implemented appropriately, enables a wide range of NEF performance, including white balance, for Nikon photographers and their productive use of the NEF file.

Since the inception of the system, Nikon has always provided photographers with choices about how they might use the system's performance and enjoy high quality images. Nikon's choices for opening and processing NEF files have been and continue to include:
  • Nikon Capture software [/*]
  • Plug-in for Adobe's Photoshop [/*]
  • Nikon PictureProject software [/*]
  • Nikon View software [/*]
  • Availability of Nikon Software Developer Kit (SDK) and the software that has been developed using the SDK
Through use of the Nikon Software Developer Kit, authorized developers can produce software by applying creative concepts to their implementation and adding capabilities to open Nikon's NEF file and use NEF's embedded Instructions and Nikon's Libraries. Nikon photographers reap benefits from independent developers' approaches, because it allows the photographer to open and process their NEF images.

After a developer's software is created using the Nikon SDK, a NEF file can be opened, edited in either TIFF or JPEG format, and then saved in formats available in the developers' software. This process has been available since the first Nikon SDK for NEF.

With each introduction of a new Nikon digital Single Lens Reflex model, Nikon updates the available SDK selection to provide new information; this is the situation with the D2X, D2Hs and D50 models. As stated above, application for the Nikon SDK is possible for bona fide software companies that send Nikon a written application for the SDK. Once approved, the SDK is provided to the developer at no charge and they are authorized to use it.

Nikon has provided its confidential SDK software to many software developers. With the Nikon SDK, developers may design excellent and creative compatibility between the NEF and their software, all without compromising the integrity of the NEF's original concept, and ensuring that work done by the photographer during the picture taking process can be incorporated into the rendering of the image.

The trilogy of performance, from Camera-to-NEF-to-Capture, has evolved though several generations of Nikon Digital SLR models, improving along the way. As a proprietary format, Nikon secures NEF's structure and processing through various technologies. Securing this structure is intended for the photographer's benefit, and dedicated to ensuring faithful reproduction of the photographer's creative intentions through consistent performance and rendition of the images. Discussions propagated on the internet suggesting otherwise are misinformed about the unique structure of NEF.

Nikon's Camera System, NEF and Capture software are a tightly knit system, and they are all developed through the cooperative efforts of Nikon's design teams, and this collaboration results in achieving the highest image quality.

Nikon strives to provide photographers with excellent picture taking performance, compatible Nikon in-system image processing performance and by extension, compatibility with additional software developers' products, with the ultimate goal of delivering a high level of integrity for a photographer's creative vision.

Nikon continues to welcome dialogue with bona fide software developers.

All times are GMT -5. The time now is 10:53 AM.