Welcome to OpenXML Developer Sign in | Join | Help

modifyVerifier

Last post 07-10-2008, 2:54 PM by anonym. 2 replies.
Sort Posts: Previous Next
  •  07-10-2008, 5:44 AM 3452

    modifyVerifier

    4.3.1.17  modifyVerifier (Modification Verifier)

    Anybody knows how exactly is hash calculated?

    Given password, how output from pre-processing step is appended with salt and if there is any operation inside spin count loop.

    Anyone here able to write pseudo-code?
  •  07-10-2008, 12:26 PM 3454 in reply to 3452

    Re: modifyVerifier

    have you looked at the 'Office Open XML Part 4 - Markup Language Reference_final' document. I looked up the tag, and in that section is information to answer all of your questions, but ill go over them real quick.


    how is hash calculated: You define the specific algorithm used by the generating application in the attribute named 'cryptAlgorithmSid'  (Cryptographic Hashing Algorithm). There is a table in the reference documnet that has mappings from a given int value to the algorithm used for example cryptAlgorithmSid=4 means that it uses the SHA-1 algorithm.

    Salt: 'saltData' is the attribute that lets you define what salt gets added to the user provided     password before hashing.
        "
    Specifies the salt which was prepended to the user-supplied password before it was hashed using the hashing algorithm defined by the preceding attribute values to generate the hashData attribute, and which shall also be prepended to the user-supplied password before attempting to generate a hash value for comparison. "(from reference doc)


    spin count: "
    Specifies the number of times the hashing function shall be iteratively run (using each iteration's result as the input for the next iteration) when attempting to compare a user-supplied password with the value stored in the hashData attribute" (from reference doc)

    there is a link to the reference documents on the ooxmldeveloper homepage.
  •  07-10-2008, 2:54 PM 3456 in reply to 3454

    Re: modifyVerifier

    sure I checked - as you can see chapter number (4.3.1.17) in my first post...

    Anyway - I am not sure specification is correct/clear regarding this algorithm.

    I have all bits and pieces working:
    - SHA-1 (seems to be always used)
    - base64 decoding and encoding
    - pre-processing algorithm is ok (Excel 2007 uses low 2 bytes of result for checking validity of given password)

    I have tried append/perpend salt, reversed and non-reversed output from pre-hashing, append as hex string, use clear password with salt ... many different permutations ... but I was unable to re-generate correct hash value.

    I am afraid only someone with access to source code can give me correct answer... or someone more lucky than I am...
View as RSS news feed in XML