Thanks for your response, let me tell you in brief that actually at
which point I am getting the problem. I am giving you an example of a
file. In this file:
Open(user) password: abc
Password algorithm: 256 bit AES
/R :   6
/U:F42EC3CF547F226A4D6FE84EB19F83E8E2B9416E603D8C5120E53F6A1A774BE285409545F6DB0FEA34606D11D0A012AF
/UE : 18D370D5942D6BB4A2E29EBCB447C904D45BED033F705C5CA9EB1B47E0817ABB95
/V : 5
Now my algorithm  which I have to follow is:
To understand the algorithm below, it is necessary to treat the O and
U strings in the Encrypt dictionary
as made up of three sections. The first 32 bytes are a hash value
(explained below). The next 8 bytes are
called the Validation Salt. The final 8 bytes are called the Key Salt.

1. The password string is generated from Unicode input by processing
the input string with the SASLprep
(IETF RFC 4013) profile of stringprep (IETF RFC 3454), and then
converting to a UTF-8 representation.

2. Truncate the UTF-8 representation to 127 bytes if it is longer than
127 bytes.
3. Test the password against the user key by computing the SHA-256
hash of the UTF-8 password
concatenated with the 8 bytes of user Validation Salt. If the 32 byte
result matches the first 32 bytes of
the U string, this is the user password.
Now what I am doing :
1.      User password(Ascii value): 616263    (abc)
2.      After processing it through SaslPrep output is same:
3.      Concatenating user password with validaition salt the input String
: 61626385409545F6DB0FEA
4.      Now I computed SHA256 hash of the above string and output is:
f1bd74e34fbacc88b60cb1bbcaf64f88cb6159b29ccc5e0f25602aae48358eb3
5.      But this output does not match  with first 32 bytes of U string as
mentioned above.


I have followed steps as defined in algorithm.
Can you tell where I have done mistake?

Thanks


On Wed, Aug 24, 2011 at 10:44 PM, Leonard Rosenthol <[email protected]> wrote:
> Depends on what the input is.  For simple ASCII/ISO-Latin-1, it should be
> the same.  Even for some sets of CJK, it will be the same.
>
> If this doesn't make sense, you need to read up on Unicode encodings.
>
> Leonard
>
> On 8/24/11 6:33 AM, "Aashish Dev" <[email protected]> wrote:
>
>>Waiting for your response , I am stuck in my project . Will you please
>>help me out of it..?  In my project I want to process  usernames and
>>passwords using SaslPrep profile of StringPrep . I have googled and
>>found that Libidn (library by GNU) has implemented SASLprep profile of
>>stringprep. Do you have any idea regarding this?
>>Can you give an example what will be output of string after being
>>processed using SASLPrepAlogorithm?
>>
>>If you can help me out of it.  I will be really grateful to you.
>>                                                       Thanks,
>>
>>
>>On Tue, Aug 23, 2011 at 9:51 AM, Aashish Dev <[email protected]>
>>wrote:
>>> Hiiiiii leonard,
>>>                           Will you please give me an example of those
>>> RFC algorithm so that i can understand them properly. I have written a
>>> code following all the steps of those algorithms but the output is
>>> same as the input of those algorithms. So i want to check it out that
>>> am i on the right way or not.
>>>                                                     Thanks
>>> SamDev
>>>
>>>
>>>
>>> On Mon, Aug 22, 2011 at 8:54 PM, Leonard Rosenthol <[email protected]>
>>>wrote:
>>>> I would recommend reading those two IETF RFCs - they have all the
>>>>details.
>>>>
>>>>
>>>> On 8/22/11 2:17 AM, "sam_dev" <[email protected]> wrote:
>>>>
>>>>>Hiii ,
>>>>>                          I need your help regarding pdf password
>>>>>decryption. I have done the decryption of 128 bit RC4 and 128 bit AES
>>>>>passowrd security but now I have to decrypt the 256 bit password
>>>>>security.
>>>>>As according to the ISO 32000:1 document, Algorithm 3.2a Computing an
>>>>>encryption key, I am not able to understand its first step:
>>>>>
>>>>>
>>>>>1. The password string is generated from Unicode input by processing
>>>>>the
>>>>>input string with the SASLprep
>>>>>(IETF RFC 4013) profile of stringprep (IETF RFC 3454), and then
>>>>>converting
>>>>>to a UTF-8 representation.
>>>>>
>>>>>
>>>>>In this i am not able to understand anything about SASLprep profile of
>>>>>stringprep. If anyone can please explain me something about it. I will
>>>>>be
>>>>>really grateful to him/her.
>>>>>                                        Thanks
>>>>>DevSam
>>>>>
>>>>>--
>>>>>View this message in context:
>>>>>http://itext-general.2136553.n4.nabble.com/256-bit-AES-algorithm-pdf-pa
>>>>>ssw
>>>>>ord-decryption-tp3759415p3759415.html
>>>>>Sent from the iText - General mailing list archive at Nabble.com.
>>>>>
>>>>>-----------------------------------------------------------------------
>>>>>---
>>>>>----
>>>>>uberSVN's rich system and user administration capabilities and model
>>>>>configuration take the hassle out of deploying and managing Subversion
>>>>>and
>>>>>the tools developers use with it. Learn more about uberSVN and get a
>>>>>free
>>>>>download at:  http://p.sf.net/sfu/wandisco-dev2dev
>>>>>_______________________________________________
>>>>>iText-questions mailing list
>>>>>[email protected]
>>>>>https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>>>
>>>>>iText(R) is a registered trademark of 1T3XT BVBA.
>>>>>Many questions posted to this list can (and will) be answered with a
>>>>>reference to the iText book: http://www.itextpdf.com/book/
>>>>>Please check the keywords list before you ask for examples:
>>>>>http://itextpdf.com/themes/keywords.php
>>>>
>>>>
>>>>
>>>>------------------------------------------------------------------------
>>>>------
>>>> uberSVN's rich system and user administration capabilities and model
>>>> configuration take the hassle out of deploying and managing Subversion
>>>>and
>>>> the tools developers use with it. Learn more about uberSVN and get a
>>>>free
>>>> download at:  http://p.sf.net/sfu/wandisco-dev2dev
>>>> _______________________________________________
>>>> iText-questions mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>>
>>>> iText(R) is a registered trademark of 1T3XT BVBA.
>>>> Many questions posted to this list can (and will) be answered with a
>>>>reference to the iText book: http://www.itextpdf.com/book/
>>>> Please check the keywords list before you ask for examples:
>>>>http://itextpdf.com/themes/keywords.php
>>>>
>>>
>>
>>--------------------------------------------------------------------------
>>----
>>EMC VNX: the world's simplest storage, starting under $10K
>>The only unified storage solution that offers unified management
>>Up to 160% more powerful than alternatives and 25% more efficient.
>>Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
>>_______________________________________________
>>iText-questions mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>>iText(R) is a registered trademark of 1T3XT BVBA.
>>Many questions posted to this list can (and will) be answered with a
>>reference to the iText book: http://www.itextpdf.com/book/
>>Please check the keywords list before you ask for examples:
>>http://itextpdf.com/themes/keywords.php
>
>
> ------------------------------------------------------------------------------
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a 
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples: 
> http://itextpdf.com/themes/keywords.php
>

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to