How does Excel's worksheet password protection work

前端 未结 5 1854
星月不相逢
星月不相逢 2020-12-03 01:42

This code has been floating around the net for quite a few years - it\'s apparently able to provide a password for decrypting an excel spreadsheet that you don\'t know the p

5条回答
  •  盖世英雄少女心
    2020-12-03 02:35

    Just a guess, but it looks to me like Excel tests if the password is valid by running it through some sort of hash function which produces a pretty small range of results and compares it with the hashed value stored.

    Presumedly what this function is doing is testing all those values until it finds one that works. Judging by the values used, the hash function produces 2^11*(126-31) different values, all of which can be produced by the values generated in this code.

    My analysis assumes this routine works. I haven't tested it.

提交回复
热议问题