none
Leaf Node Object Data hashing RRS feed

  • Question

  • Hi

    MS-FSHTTPD spec 2.2.3.1 says

    Data Hash (variable): A byte array that specifies the data hash.

    However it's unclear what data should be used to calculate hash, also hash function is not specified too.

    Friday, May 18, 2018 9:24 AM

Answers

  • Hi Kirill Paliy,

    While working on pseudo code documenting the XOR Hash algorithm, we discovered that sample code containing the specific XOR Hash algorithm was made available. The sample code is meant for use with OneDrive, however the XOR Hash algorithm is the same as used in MS-FSSHTTP to calculate the Leaf Node Data Hash. 

    The Sample is available for you to leverage in our own implementation. The Sample can be found at: Sample code to generate the OneDrive Quick XOR Hash value for a file. The primary function to review is HashCore. 

    The sample should help unblock you with respect to understanding the XOR Hash algorithm. However, we will be updasting the MS-FSSHTTP specifications to include an appropriate pseudo code definition of the XOR Hash algorithm as well. 

    Will Gregg | open specifications

    • Marked as answer by Kirill Paliy Wednesday, June 13, 2018 6:46 AM
    • Unmarked as answer by Kirill Paliy Wednesday, June 13, 2018 8:32 AM
    • Marked as answer by Kirill Paliy Wednesday, June 13, 2018 8:49 AM
    Wednesday, June 13, 2018 1:48 AM
    Moderator

All replies

  • Hello Kirill Paliy:

    Thank you for your inquiry about Microsoft Office Specifications. We have created an incident for investigating this issue. One of the Open specifications team member will contact you shortly.

    Thanks.


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Friday, May 18, 2018 3:41 PM
  • Hello Kirill Paliy,

    Thank you for raising your question regarding the Data Hash variable of the Leaf Node Object in MS-FSSHTTPD. 

    I will be investigating your question and let you know what I determine.

    Will Gregg | open specifications

    Saturday, May 19, 2018 3:39 AM
    Moderator
  • Hi

    It's been two weeks, any estimate when my question will be addressed?

    Friday, June 1, 2018 3:03 PM
  • Hi Kirill Paliy,

    I should have the results of my investigation available in a few business days for you. 

    Will Gregg | open specifications.

    Sunday, June 3, 2018 4:18 PM
    Moderator
  • Hi

    It's been another week, any update?

    Monday, June 11, 2018 5:34 AM
  • Hi Kirill Paliy,

    Thanks for you patience as this is getting tracked down. I apologize that this is taking so long. There were a number of complicated issues between the specification and the product functionality that we've narrowed down.

    As you already know the algorithm for calculating the Data Hash of a Leaf Node Object is not referenced in the specification. We are working with the owning product team to address the issue, and the algorithm will be appropriately documented in a future release of the specification.

    In the mean-time. The data used to in the algorithm to calculate the Data Hash is the actual data contained within the Leaf Node.

    The algorithm itself is a somewhat straight forward XOR calculation; however the specific documentation description of the algorithm is currently being reviewed and I should be able to post you the explanation tomorrow, upon completion of the review.

     Will Gregg | open specifications

    Tuesday, June 12, 2018 6:09 AM
    Moderator
  • Hi Kirill Paliy,

    While working on pseudo code documenting the XOR Hash algorithm, we discovered that sample code containing the specific XOR Hash algorithm was made available. The sample code is meant for use with OneDrive, however the XOR Hash algorithm is the same as used in MS-FSSHTTP to calculate the Leaf Node Data Hash. 

    The Sample is available for you to leverage in our own implementation. The Sample can be found at: Sample code to generate the OneDrive Quick XOR Hash value for a file. The primary function to review is HashCore. 

    The sample should help unblock you with respect to understanding the XOR Hash algorithm. However, we will be updasting the MS-FSSHTTP specifications to include an appropriate pseudo code definition of the XOR Hash algorithm as well. 

    Will Gregg | open specifications

    • Marked as answer by Kirill Paliy Wednesday, June 13, 2018 6:46 AM
    • Unmarked as answer by Kirill Paliy Wednesday, June 13, 2018 8:32 AM
    • Marked as answer by Kirill Paliy Wednesday, June 13, 2018 8:49 AM
    Wednesday, June 13, 2018 1:48 AM
    Moderator
  • Hi

    I have compiled and tried c# code you provided, however result does not match one I see in actual exchange captured by Fiddler. Most probably I use incorrect input data, could you please clarify what part of Leaf Node data should be used? Whole Leaf Node contains hash I tried to calculate so I guess something has to be excluded to get correct result. If necessary, I can email Fiddler response and screenshot.

    edit: It seems that data used in calculation is "data" field of blob reference, which is referred via ObjectExtendedGUIArray by current leaf node's parent. If it sounds unclear and you'll need clarification before adding to documentation, I can provide example with explanation.

    Also signature header (0x29 in case of 20-byte hash) is added prior to calculated hash.

    Wednesday, June 13, 2018 8:35 AM