Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-12-2011, 09:33 PM
samdev samdev is offline Method for Password Encryption in word 2010 Windows XP Method for Password Encryption in word 2010 Office 2010 32bit
Novice
Method for Password Encryption in word 2010
 
Join Date: Dec 2011
Posts: 5
samdev is on a distinguished road
Default Method for Password Encryption in word 2010

Hello,


I am working on open password encryption of word 2010. i have got the way of encryption for office 2007. While surfing on internet i found that office 2010 is using SHA1 and AES 128 for its encryption but there is a little bit difference in encryption algorithm for office 2010. Is there anyone who can help me in solving this problem. I will be really thankful to him\her.

Thanks,

samdev
Reply With Quote
  #2  
Old 12-13-2011, 01:48 AM
macropod's Avatar
macropod macropod is offline Method for Password Encryption in word 2010 Windows 7 64bit Method for Password Encryption in word 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,595
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi samdev,

The available encryption algorithms to use with Office depend on the algorithms that can be accessed through the APIs in the Windows operating system. Office 2010, in addition to maintaining support for Cryptography API (CryptoAPI), also includes support for CNG (CryptoAPI: Next Generation), which was first made available in the 2007 Microsoft Office system with Service Pack 2 (SP2). See: http://technet.microsoft.com/en-us/l.../cc179125.aspx
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 12-13-2011, 10:52 PM
samdev samdev is offline Method for Password Encryption in word 2010 Windows XP Method for Password Encryption in word 2010 Office 2010 32bit
Novice
Method for Password Encryption in word 2010
 
Join Date: Dec 2011
Posts: 5
samdev is on a distinguished road
Default

Hii MACROPOD,

Thanks for your reply, I know, Office 2010 is using CryptoAPI. I want to know that Microsoft is using an algorithm for its password encryption in office 2007. Microsoft has updated its algorithm for office 2010 for increasing its security. I have got the algorithm but i think its not proper algorithm(something is missing), just an overview of encryption steps.Can you please help me out regarding this encryption steps problem. Any type of your help is truely welcomed.
Reply With Quote
  #4  
Old 12-13-2011, 11:33 PM
macropod's Avatar
macropod macropod is offline Method for Password Encryption in word 2010 Windows 7 64bit Method for Password Encryption in word 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,595
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi samdev,

As the article says, the encryption algorithm is not in Word but in the Windows OS. Therefore, it is not correct to say:
Quote:
Microsoft has updated its algorithm for office 2010
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 12-14-2011, 12:57 AM
samdev samdev is offline Method for Password Encryption in word 2010 Windows XP Method for Password Encryption in word 2010 Office 2010 32bit
Novice
Method for Password Encryption in word 2010
 
Join Date: Dec 2011
Posts: 5
samdev is on a distinguished road
Default

Hii MACROPOD,
Thanks for your response, I think you are getting me wrong, I am trying to decrypt the password using default setting of security in office 2010. During surfing on internet what i have got is that Windows is used only for change of security settings for password through registry keys. But in both cases encryption algorithm steps are same.
Reply With Quote
  #6  
Old 12-14-2011, 01:25 AM
macropod's Avatar
macropod macropod is offline Method for Password Encryption in word 2010 Windows 7 64bit Method for Password Encryption in word 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,595
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi samdev,
Quote:
Originally Posted by samdev View Post
Hii MACROPOD,
I am trying to decrypt the password using default setting of security in office 2010. During surfing on internet what i have got is that Windows is used only for change of security settings for password through registry keys. But in both cases encryption algorithm steps are same.
AFAIK, the password is not stored in the document under any of the secure encryption algorithms, though I believe it may have been in some of the earlier (eg 1990-1999) Word versions. If I am correct about that, you won't be able to decrypt the password; rather, the password provides the key to decrypt the document. If all you want to do is to open a password-protected document via code, all you need is some vba code like:
Code:
Documents.Open FileName:="Document name & path", _
PasswordDocument:="Password for opening the document", _
WritePasswordDocument:="Password for saving changes to the document"
You don't need to know anything about the encryption algorithm used for the encryption; a token representing the type of encryption will be stored in the document. Any tokens used by Word 2007 will also be used by Word 2010. As per the article in the MS link, a Word 2010 document may have some different tokens to represent the new encryption methods, but the old ones will be the same.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 12-14-2011, 08:51 PM
samdev samdev is offline Method for Password Encryption in word 2010 Windows XP Method for Password Encryption in word 2010 Office 2010 32bit
Novice
Method for Password Encryption in word 2010
 
Join Date: Dec 2011
Posts: 5
samdev is on a distinguished road
Default

Hii MACROPOD,
As you said:
Quote:
rather, the password provides the key to decrypt the document. If all you want to do is to open a password-protected document via code,
yes I think there is a salt value in the word document, Which is used for encryption or decryption of password. All this encryption or decryption uses an algorithm which is defined in [MS- OFFCRYPTO] document. But i think something is missing in encryption section of this document.If you know anything about it then your help is appreciated.

Thanks.
Samdev
Reply With Quote
  #8  
Old 12-14-2011, 09:04 PM
macropod's Avatar
macropod macropod is offline Method for Password Encryption in word 2010 Windows 7 64bit Method for Password Encryption in word 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,595
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by samdev View Post
All this encryption or decryption uses an algorithm which is defined in [MS- OFFCRYPTO] document. But i think something is missing in encryption section of this document.
The latest update to the Office Document Cryptography Structure Specification [MS-OFFCRYPTO] is version 2.05, which was released on 23 july 2010. You can download a copy from: http://msdn.microsoft.com/en-us/library/cc313071.aspx. I'd be surprised if anything was missing. If you suspect that is the case, Id suggest contacting Microsoft directly.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 01-04-2012, 09:58 PM
samdev samdev is offline Method for Password Encryption in word 2010 Windows XP Method for Password Encryption in word 2010 Office 2010 32bit
Novice
Method for Password Encryption in word 2010
 
Join Date: Dec 2011
Posts: 5
samdev is on a distinguished road
Default

I have already gone through MS-OFFCRYPTO. But I have some problems:

As according to section : 2.3.4.11 and 2.3.4.12

1) In case of generating encryption Key,

The initial password hash is generated as the following.

H0 = H(salt + password)

The salt used MUST be generated randomly. The hash is then iterated using the following approach:

Hn = H(iterator + Hn-1)

Where iterator is an unsigned 32-bit value which is initially set to 0x00000000, and is then incremented monotonically on each iteration until PasswordKey.spinCount iterations have been performed. The value of the iterator on the last iteration MUST be one less than PasswordKey.spinCount.

The final hash data which is used for an encryption key is then generated using the following method:

Hfinal = H(Hn + block_key)

Where block_key represents an array of bytes used to prevent two different blocks from encrypting to the same cipher text.

2) In case of Initialization vector: another block key is used.

IV= Salt key+Block key.

i) Are the both block keys same or different ?

ii) From where I can get the block keys ?



Can anyone please help me out of this problem. Your help is heartly appreciated.

Thanks,

SamDev
Reply With Quote
  #10  
Old 01-04-2012, 10:32 PM
macropod's Avatar
macropod macropod is offline Method for Password Encryption in word 2010 Windows 7 64bit Method for Password Encryption in word 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,595
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi samdev,

You might be able to find out by posting on:
MSDN (http://social.msdn.microsoft.com/For...gory/officedev); or
MS TechNet (http://social.technet.microsoft.com/...ry/officeitpro)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
aes 128, password encryption, sha1

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
ms word 2010 file opening password prateek1108 Office 0 11-30-2011 03:40 AM
Method for Password Encryption in word 2010 Is there a Microsoft Word Form Method That Restricts Placement, Length, and Spell Che petec Word 10 09-25-2011 08:41 AM
Method for Password Encryption in word 2010 Still I donít know the professional method to have the caption next to the Equation! Jamal NUMAN Word 2 04-17-2011 06:05 PM
Method for Password Encryption in word 2010 Encryption XOR - any errors??? Word Doc Word 1 10-08-2009 12:57 AM
Retrict Method Condition markp Outlook 0 12-22-2005 05:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2022 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft