If anyone understands the ins and outs of RAW, it's Dave Coffin, he has reverse engineered the RAW formats of almost every digital camera on the market and provides his code (dcraw.c) freely for anyone to use. He recently posted a note on his web page pointing out that the encryption of metadata (in the current Nikon vs. Adobe situation) is nothing new and that it's fairly common for manufacturers to apply some kind of protection to their RAW formats. We decided to ask him some of the questions this information raises and also those which have been asked by our readers.
From Dave's page (talking about metdata encryption):
A note about metadata encryption
A firestorm of controversy recently erupted when Thomas Knoll of Adobe accused Nikon of encrypting the white balance data in the D2X and D2Hs cameras, thus preventing Adobe from fully supporting these cameras.
I cracked this encryption on April 15, and updated dcraw.c and parse.c on April 17. So "dcraw -w" now works correctly with all Nikon cameras.
This is not a new problem. Phase One, Sony, Foveon, and Canon all apply some form of encryption to their RAW files. Dcraw decodes them all -- you can easily find decryption code by searching for the ^ operator.
Compression is not encryption. Phase One and Sony do encryption only. Kodak does compression only. Canon, Nikon, and Foveon compress the image data and encrypt some of the metadata.
dpreview.com interview with Dave Coffin
We decided to try and get a bit more background to this and conducted a brief interview with Dave to discuss his work and the encryption / obfuscation of RAW data. It seems clear to us that while it's a concern that manufacturers are making it harder for the RAW decoders, this isn't something new and certainly (not at the moment at least) nothing that can't be cracked.
1. Can you just give us a short history of dcraw and how it got started?
It started in February 1997, when I bought a Canon PowerShot 600. Decoding the RAW data was more difficult than I had expected, knowing nothing about filter arrays, colorspace conversion, etc. But in August 1997, I found a decent interpolation technique, and finally was able to create images comparable in quality to Canon's.
Word slowly spread, and people asked me to do other cameras, sending me sample images to decode. I added support for the PowerShot A5 in May 1999 and the PowerShot A50 and Pro70 in May 2000.
In late September 2001, after months of effort, I finally figured out the lossless compression algorithm used by the PowerShots Pro90, G1, G2, S30, S40, and EOS D30/D60 cameras.
I solved the Canon EOS-1D on Jan 28, 2002 and the Nikon compressed NEF format on March 24, 2002. Olympus ORF format is not compressed, so it's much easier to decode.
On November 19, 2002, I was laid off. During that month, I added nineteen Kodak cameras, the PowerShot G3/S45, the Canon EOS-1DS, the Fuji S2, and the Minolta DiMAGE 7. In early December, I replaced the whole color-interpolation system, yielding sharper images for all cameras.
On December 10, I attacked the Sigma SD9. I solved the compression algorithm on December 31, then spent another six weeks constructing a Foveon-specific interpolation routine to enhance color and reduce noise.
2. As we know none of the manufacturers openly document their RAW formats, how long does it typically take for you to reverse-engineer a format?
It can take minutes or months, depending on the complexity of the format.
3. Are you ever concerned about the legal implications of reverse-engineering proprietary file formats?
If anyone sued me, I'd be the biggest free software hero since Jon Johanson. It's better for the camera makers to ignore me and hope I lose interest.
4. I take it that reverse-engineering the metadata out of the RAW file is just as complicated (if not more so) than the actual sensor data itself, is this correct?
Yes, the metadata is much more complicated. That's why dcraw reads only metadata necessary to decode the image, and ignores the rest.
5. Which RAW format was the first you worked on which showed signs of having its metadata deliberately encrypted / obsfuscated? Can you give us examples of other formats which have been made 'hard to decode' by the manufacturers?
The Canon PowerShot G6, S60, S70, and Pro1 apply a trivial XOR to the metadata related to color balance. Phase One encrypts the entire image in a slightly more complicated way.
6. I understand that Sony's SRF file format is encrypted, does this include the actual RAW data or just metadata?
Both are encrypted with a hard cipher. My sony_clear program decrypts the entire SRF file.
7. Do you believe manufacturers are doing this to protect their own RAW converters or simply as a method of compressing the metadata?
Encryption is not compression. XOR'ing cleartext with a key does not change the size of a file -- it only makes the contents harder to read.
8. It's clear that many photographers are concerned over the current situation between Adobe and Nikon because they feel it may be an indicator of worse to come (harder encryption, more 'locking down' of file data). So is this a storm in a teacup or a sign of more to come?
Photographers have reason to feel scared. Not being computer hackers, they feel powerless to stop Nikon from asserting property rights over their images.
I'm not so worried. Whatever scheme Nikon tries next, I'll just reverse-engineer it.
9. Is there a place for a standard 'Open' RAW format or does that raise too many issues to do with the sharing of proprietary image processing between competitive manufacturers?
Adobe Digital Negative (DNG) is a great format -- I totally redesigned dcraw for maximum DNG compatibility. But you won't see much enthusiasm from the camera makers. This Joel essay explains why:
Photoshop and digital cameras are complements. Adobe wants to commoditize the digital camera, and the camera makers want to stop them.
10. Manufacturers (Canon for example) claim that only they know how to use the RAW data - along with their knowledge of the sensor's characteristics - to squeeze the best possible quality out of their cameras. Our tests indicate this often isn't the case, with 3-rd party converters often getting better results. Is there any advantage a manufacturer might have when producing a RAW converter?
Whatever advantage the manufacturer has, it disappears when a camera reaches the market. Then anyone is free to buy the camera, shoot test patterns, and analyze the RAW data.
11. Are you aware of significant differences in the way the various manufacturer's converters process RAW files, as we see huge differences in the quality of output, or are they all basically the same thing, just some better optimized?
I don't know -- I usually trace the manufacturer's code just far enough to extract the RAW data.
12. How raw is a RAW file, are there any formats in which the sensor data has actually been modified before it's recorded?
Some Nikon cameras have gaps or spikes in the raw histogram, indicating that the colors were multiplied before being saved to the RAW file. Most cameras leave the RAW data alone, and write color multipliers into the metadata.
|Waffles with fruits by Coolinarka|
from Food photography (desserts)
|Vestrahorn Frozen Reflection by Will B Milner|
from Ice cold
Google has updated its Photos mobile apps to support the recently announced service for creating and printing physical photo books.
Europeana Photography is a new online image archive that includes more than 2 million historical photographs from European collections in 34 countries, covering the first 100 years of photography. Read more
Manufacturers love to state CRI (color rendering index) numbers to prove that their LED lights will provide great color, but a single CRI score doesn't tell the whole story.
NASA's Juno spacecraft is sending back its first images from Jovean orbit, and they're beautiful. Read more
We got our hands on the first zoom lens available for Fujifim's new digital medium format system. Check out the samples
As summer really gets going over here in the Northern hemisphere, the team at Imaging Resource has put together a list of the best cameras for backpacking.
The Ukrainian Parliament banned statues of Lenin in 2015. Two years later, the monuments no longer adorn public buildings or stand watch over town squares, but they're still there.
If you had to choose one camera to bring along for the ultimate West coast road trip, what would it be? DPR's Sam Spencer choose the X100F. Read more
The a9 boasts impressive capability. As more examples of it in practice pour in, Sony's claims hold up. Watch the a9 track and maintain focus on a rapidly approaching basketball.
Last week, more than a million tonnes of Californian coastline slid into the ocean, taking part of Highway 1 with it. Check out the remodeling in photos taken before and after the landslide.
Even after eighteen months of reviewing the latest, greatest, shiniest and must-buy-me-est new gear, DPReview staffer Carey Rose has continued to use older DSLR cameras for his freelance work. But now, that might be changing. Read more
Sony is the world's leading mirrorless camera brand but remains third for ILCs overall, it's said in a presentation to investors. A focus on high value cameras and lenses should boost operating income, it says. Read more
It's nicknamed the 'Cycloptic Mustard Monster,' and is a 3D printed medium format camera. Read more
The new NanGuang LED lights are battery powered and come with accessories including filters and diffusers.
Have you been telling yourself, "Hey, I really need one of those 8K displays?" A video about Dell's new 8K monitor shows you what to expect. Is it really that much better?
Tamara Lackey, a Nikon ambassador USA and pro shooter, discusses embracing self-consciousness as a means of connecting with subjects.
There's a new Spiderman movie coming out and the poster been generating a lot of online chatter. Mostly about how it looks like the creation of a fevered teenager that just discovered Photoshop.
An honest defense of the system's merits, with photos as proof.
Copyright disputes are no fun at all. 'Binded' is a new startup that aims to simplify the process of registering - and enforcing - copyright for photographers. Read more
Not everyone wants to pay a premium for a long zoom camera. Thankfully, there are many reasonably priced cameras available, though they won't offer the same image quality as enthusiast models. In this updated roundup we look at big zoom cameras with more consumer-friendly price tags. Read more
Think Tank Photo has updated two of its popular bag lines with improvements to functionality. Read more
We’ve all seen Bob Jackson’s Pulitzer Prize winning photo, but there's another.
The sample footage looks good.
It will automatically pick the best camera settings depending on shooting conditions. It even promises enhanced functionality for your camera, like exposure and focus stacking. It already supports many cameras from Canon, Fuji, Nikon and Sony. Read more
As if $13,950 wasn’t enough to pay for a special edition lens, the Leica Store in San Francisco is offering a prototype of said lens for $24,995. Read more
Make those old photos disappear without deleting them forever.
Firmware updates enable 10 fps shooting with adapted A-mount lenses, and faster startup times and better compatibility for 20 fps shooting when using native lenses on the a9.
Fujifilm has released firmware updates for its camera models X-T2, X-Pro2, GFX 50s, X-T20, X100F and X-T1 and updates to three of its software products.
A 22 year-old Romanian photographer uses his DJI Phantom 4 drone to capture unique perspectives of the city where he now lives.
What's it like to ride the waves with champion surfer Kelly Slater? This VR video from Teton Gravity Research gives you a taste.