ENCRYPTING DOCUMENTS
From the Office blog: a great way to avoid a security breach is to click the Office Button (the orb in the upper left hand corner of Word 2007), click Prepare, click Encrypt Document, and enter your password.
The nitty-gritty details from David LeBlanc’s Web Log:
Let’s start with the worst of it – XOR. You may note that I consistently refused to ever say “XOR encryption”, preferring the more accurate “XOR obfuscation”. Not only is it the worst way to protect a document, but it was horrible to try and explain. We did all sorts of silly things to make this hard to figure out, it did nearly nothing to actually protect the data, but it sure was no fun to try and document in a normative style. I believe this obfuscation dates back to around 1994. Here’s some pseudo-code to show you the sheer horror of it all – this is from one of the two password verifier approaches:
FUNCTION CreatePasswordVerifier_Method1
PARAMETERS Password
RETURNS 16-bit unsigned integer
DECLARE Verifier AS 16-bit unsigned integer
DECLARE PasswordArray AS array of 8-bit unsigned integers
SET Verifier TO 0×0000 SET PasswordArray TO (empty array of bytes)
SET PasswordArray[0] TO Password.Length
APPEND Password TO PasswordArray
FOR EACH PasswordByte IN PasswordArray IN REVERSE ORDER
IF (Verifier BITWISE AND 0×4000) is 0×0000
SET Intermediate1 TO 0
ELSE
SET Intermediate1 TO 1
ENDIF
SET Intermediate2 TO Verifier MULTIPLED BY 2
SET most significant bit of Intermediate2 TO 0
SET Intermediate3 TO Intermediate1 BITWISE OR Intermediate2
SET Verifier TO Intermediate3 BITWISE XOR PasswordByte
ENDFOR
RETURN Verifier BITWISE XOR 0xCE4B
END FUNCTION
If this makes sense to you, and you want to know kre, click either of the links above.
Leave a Reply