fileChecksum in "Photo Details.csv" from iCloud Photos

If you requested a copy of your data from privacy.apple.com, and like me, you did it to download your photos from iCloud you may have wondered what is the field fileChecksum contained along other metadata of your media in the files "Photo Details.csv".


It took a bit, but this is what I found out.

Please, note that some of the details below are based on assumptions.


The fileChecksum is actually called MMCS Hash, most likely from MobileMe Cloud Storage / MobileMe Chunk Storage / MobileMe Chunking Service, the backend that Apple introduced back in 2008, the predecessor of iCloud.

It is a content-addressable algorithm (it depends only on the file’s raw bytes, not on metadata) based on chunking (the file is split into chunks, each chunk is hashed) and aggregation (these hashes are aggregated to form a digest) that produces a stable hash used for deduplication and integrity verification during cloud synchronization.


To conclude, this algorithm is implemented inside the Private Framework CoreMediaStream (MS).

Here is a snippet I wrote to compute the hash of any file:


// MSMMCSHashForFileAtPath.m
#import <Foundation/Foundation.h>

extern NSData *MSMMCSHashForFileAtPath(NSString *path, CFErrorRef *errorOut);

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        if (argc != 2) {
            fprintf(stderr, "usage: %s /path/to/file\n", argv[0]);
            return 2;
        }
        NSString *path = [NSString stringWithUTF8String:argv[1]];

        NSData *digest = MSMMCSHashForFileAtPath(path, NULL);
        if (!digest) {
            fprintf(stderr, "MSMMCSHashForFileAtPath returned NULL\n");
            return 1;
        }

        const unsigned char *bytes = digest.bytes;
        NSUInteger len = digest.length;
        printf("Hex:\t");
        for (NSUInteger i = 0; i < len; i++) printf("%02x", bytes[i]);
        printf("\n");

        NSString *b64 = [digest base64EncodedStringWithOptions:0];
        printf("Base64:\t%s\n", [b64 UTF8String]);
    }
    return 0;
}

/*
clang -o MSMMCSHashForFileAtPath \
  MSMMCSHashForFileAtPath.m \
  -F /System/Library/PrivateFrameworks \
  -framework CoreMediaStream \
  -framework Foundation

./MSMMCSHashForFileAtPath "path/to/file"
*/

Posted on Sep 26, 2025 3:41 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 27, 2025 4:40 AM

How do we use this new knowledge?

3 replies

Sep 29, 2025 3:49 AM in response to LD150

We can do this to achieve the same as Apple does: data deduplication and integrity verification.

Since we can assume the data is already deduplicated, we can use this only to ensure the data remains intact.

Finally, it provides a way to uniquely identify media independently of its filename and thus associate its metadata.


This answers the questions:


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

fileChecksum in "Photo Details.csv" from iCloud Photos

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.