Does NTFS store the hash or CRC32 of every inode/file, how to acesss it?












0















I know how to read a file, pass these bytes to a hashing algorithm such as MD5SUM, SHA256 or CRC32, and get the hash.



Here I'm asking something slightly different:



Each time we write/modify a file on a NTFS partition, does it re-compute a hash or CRC32 and store this information in the NTFS metadata / FAT / MFT (Master File Table) (I don't remember the exact name)?



Note: the important thing is that I just want to read the stored hash/CRC stored in the filesystem (i.e. read a few bytes, should be a few milliseconds maximum), and not recompute the hash (that would take many seconds for a 10 GB file).





If so, how to access this CRC or hash for a specific file, using Python? Is there something like:



import ntfsutil
ntfsutil.getCRC('d:/big50GBfile.dat') # done in < 10 ms









share|improve this question


















  • 1





    No.

    – user2357112
    Nov 24 '18 at 11:06











  • @user2357112 So the only way is to re-compute the hash/checksum each time I need it? NTFS cannot be configured to store checksums? PS: prime number sequence in your pseudo (nearly), is it on purpose? :)

    – Basj
    Nov 24 '18 at 11:41













  • NTFS doesn't do file checksums. (Also, the 2 3 5 7 11 thing was pure luck, but it's part of the reason I never changed my default username.)

    – user2357112
    Nov 24 '18 at 18:36











  • You could cache the checksum and corresponding last-write timestamp in an alternate data stream, e.g. "big50GBfile.dat:md5". This "md5" stream will be lost if the file is copied to a file system that doesn't support named streams (e.g. FAT32).

    – eryksun
    Nov 25 '18 at 1:51











  • @eryksun Wow, this is the first time I hear about streams, very cool! howtogeek.com/howto/windows-vista/…. For future ref: notepad c:test.txt:secret will create a stream named secret! Funny that this is so rarely used...

    – Basj
    Nov 25 '18 at 11:12


















0















I know how to read a file, pass these bytes to a hashing algorithm such as MD5SUM, SHA256 or CRC32, and get the hash.



Here I'm asking something slightly different:



Each time we write/modify a file on a NTFS partition, does it re-compute a hash or CRC32 and store this information in the NTFS metadata / FAT / MFT (Master File Table) (I don't remember the exact name)?



Note: the important thing is that I just want to read the stored hash/CRC stored in the filesystem (i.e. read a few bytes, should be a few milliseconds maximum), and not recompute the hash (that would take many seconds for a 10 GB file).





If so, how to access this CRC or hash for a specific file, using Python? Is there something like:



import ntfsutil
ntfsutil.getCRC('d:/big50GBfile.dat') # done in < 10 ms









share|improve this question


















  • 1





    No.

    – user2357112
    Nov 24 '18 at 11:06











  • @user2357112 So the only way is to re-compute the hash/checksum each time I need it? NTFS cannot be configured to store checksums? PS: prime number sequence in your pseudo (nearly), is it on purpose? :)

    – Basj
    Nov 24 '18 at 11:41













  • NTFS doesn't do file checksums. (Also, the 2 3 5 7 11 thing was pure luck, but it's part of the reason I never changed my default username.)

    – user2357112
    Nov 24 '18 at 18:36











  • You could cache the checksum and corresponding last-write timestamp in an alternate data stream, e.g. "big50GBfile.dat:md5". This "md5" stream will be lost if the file is copied to a file system that doesn't support named streams (e.g. FAT32).

    – eryksun
    Nov 25 '18 at 1:51











  • @eryksun Wow, this is the first time I hear about streams, very cool! howtogeek.com/howto/windows-vista/…. For future ref: notepad c:test.txt:secret will create a stream named secret! Funny that this is so rarely used...

    – Basj
    Nov 25 '18 at 11:12
















0












0








0








I know how to read a file, pass these bytes to a hashing algorithm such as MD5SUM, SHA256 or CRC32, and get the hash.



Here I'm asking something slightly different:



Each time we write/modify a file on a NTFS partition, does it re-compute a hash or CRC32 and store this information in the NTFS metadata / FAT / MFT (Master File Table) (I don't remember the exact name)?



Note: the important thing is that I just want to read the stored hash/CRC stored in the filesystem (i.e. read a few bytes, should be a few milliseconds maximum), and not recompute the hash (that would take many seconds for a 10 GB file).





If so, how to access this CRC or hash for a specific file, using Python? Is there something like:



import ntfsutil
ntfsutil.getCRC('d:/big50GBfile.dat') # done in < 10 ms









share|improve this question














I know how to read a file, pass these bytes to a hashing algorithm such as MD5SUM, SHA256 or CRC32, and get the hash.



Here I'm asking something slightly different:



Each time we write/modify a file on a NTFS partition, does it re-compute a hash or CRC32 and store this information in the NTFS metadata / FAT / MFT (Master File Table) (I don't remember the exact name)?



Note: the important thing is that I just want to read the stored hash/CRC stored in the filesystem (i.e. read a few bytes, should be a few milliseconds maximum), and not recompute the hash (that would take many seconds for a 10 GB file).





If so, how to access this CRC or hash for a specific file, using Python? Is there something like:



import ntfsutil
ntfsutil.getCRC('d:/big50GBfile.dat') # done in < 10 ms






python windows filesystems ntfs ntfs-mft






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 24 '18 at 10:06









BasjBasj

6,17632106233




6,17632106233








  • 1





    No.

    – user2357112
    Nov 24 '18 at 11:06











  • @user2357112 So the only way is to re-compute the hash/checksum each time I need it? NTFS cannot be configured to store checksums? PS: prime number sequence in your pseudo (nearly), is it on purpose? :)

    – Basj
    Nov 24 '18 at 11:41













  • NTFS doesn't do file checksums. (Also, the 2 3 5 7 11 thing was pure luck, but it's part of the reason I never changed my default username.)

    – user2357112
    Nov 24 '18 at 18:36











  • You could cache the checksum and corresponding last-write timestamp in an alternate data stream, e.g. "big50GBfile.dat:md5". This "md5" stream will be lost if the file is copied to a file system that doesn't support named streams (e.g. FAT32).

    – eryksun
    Nov 25 '18 at 1:51











  • @eryksun Wow, this is the first time I hear about streams, very cool! howtogeek.com/howto/windows-vista/…. For future ref: notepad c:test.txt:secret will create a stream named secret! Funny that this is so rarely used...

    – Basj
    Nov 25 '18 at 11:12
















  • 1





    No.

    – user2357112
    Nov 24 '18 at 11:06











  • @user2357112 So the only way is to re-compute the hash/checksum each time I need it? NTFS cannot be configured to store checksums? PS: prime number sequence in your pseudo (nearly), is it on purpose? :)

    – Basj
    Nov 24 '18 at 11:41













  • NTFS doesn't do file checksums. (Also, the 2 3 5 7 11 thing was pure luck, but it's part of the reason I never changed my default username.)

    – user2357112
    Nov 24 '18 at 18:36











  • You could cache the checksum and corresponding last-write timestamp in an alternate data stream, e.g. "big50GBfile.dat:md5". This "md5" stream will be lost if the file is copied to a file system that doesn't support named streams (e.g. FAT32).

    – eryksun
    Nov 25 '18 at 1:51











  • @eryksun Wow, this is the first time I hear about streams, very cool! howtogeek.com/howto/windows-vista/…. For future ref: notepad c:test.txt:secret will create a stream named secret! Funny that this is so rarely used...

    – Basj
    Nov 25 '18 at 11:12










1




1





No.

– user2357112
Nov 24 '18 at 11:06





No.

– user2357112
Nov 24 '18 at 11:06













@user2357112 So the only way is to re-compute the hash/checksum each time I need it? NTFS cannot be configured to store checksums? PS: prime number sequence in your pseudo (nearly), is it on purpose? :)

– Basj
Nov 24 '18 at 11:41







@user2357112 So the only way is to re-compute the hash/checksum each time I need it? NTFS cannot be configured to store checksums? PS: prime number sequence in your pseudo (nearly), is it on purpose? :)

– Basj
Nov 24 '18 at 11:41















NTFS doesn't do file checksums. (Also, the 2 3 5 7 11 thing was pure luck, but it's part of the reason I never changed my default username.)

– user2357112
Nov 24 '18 at 18:36





NTFS doesn't do file checksums. (Also, the 2 3 5 7 11 thing was pure luck, but it's part of the reason I never changed my default username.)

– user2357112
Nov 24 '18 at 18:36













You could cache the checksum and corresponding last-write timestamp in an alternate data stream, e.g. "big50GBfile.dat:md5". This "md5" stream will be lost if the file is copied to a file system that doesn't support named streams (e.g. FAT32).

– eryksun
Nov 25 '18 at 1:51





You could cache the checksum and corresponding last-write timestamp in an alternate data stream, e.g. "big50GBfile.dat:md5". This "md5" stream will be lost if the file is copied to a file system that doesn't support named streams (e.g. FAT32).

– eryksun
Nov 25 '18 at 1:51













@eryksun Wow, this is the first time I hear about streams, very cool! howtogeek.com/howto/windows-vista/…. For future ref: notepad c:test.txt:secret will create a stream named secret! Funny that this is so rarely used...

– Basj
Nov 25 '18 at 11:12







@eryksun Wow, this is the first time I hear about streams, very cool! howtogeek.com/howto/windows-vista/…. For future ref: notepad c:test.txt:secret will create a stream named secret! Funny that this is so rarely used...

– Basj
Nov 25 '18 at 11:12














0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457086%2fdoes-ntfs-store-the-hash-or-crc32-of-every-inode-file-how-to-acesss-it%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457086%2fdoes-ntfs-store-the-hash-or-crc32-of-every-inode-file-how-to-acesss-it%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen